谷歌浏览器永久去除腾讯视频水印

直播视频必备!我也是别人博客看见的,但是他的知识一次性,换级的时候还是会出来,我拿来改了下!不废话·直接上代码!

  1. 新建一个文件夹
  2. 新建文件:manifest.json
    {
      "manifest_version": 2,
      "name": "腾讯视频去除水印",
      "version": "0.0.1",
      "description": "解决腾讯视频爬虫出现水印的现象,进入谷歌后自动执行去除水印.",
      "author": "Lux",
      "content_scripts": [
       {
         "matches": ["https://v.qq.com/x/cover/*"],
         "run_at": "document_end",
         "js": ["advertising.js"],
         "all_frames": true
       }
       ]
    }
    

     

  3. 新建文件:advertising.js
    setInterval(function(){
    	console.log("插件正在清理水印中!")
    	fn();
    }, 1000);
    var thread = function () {
        var nowTime = 0,
            maxTime = 15;
        var threadArr = [];
        
        this.addThread = function (fn) {
            threadArr.push(fn)
        }
        this.start=function () {
            doingThread();
        }
        var doingThread = function () {
            if (threadArr.length > 0) {
                if (nowTime < maxTime) {
                    let now = new Date().getTime();
                    var method = threadArr[0];
                    method();
                    threadArr.splice(0, 1);
                    let nowNew = (new Date().getTime() - now);
                    nowTime += nowNew;
                    doingThread();
                } else {
    		        nowTime=0;
                    setTimeout(doingThread, 1);
                }
            }else {
                setTimeout(doingThread,100)
            }
        }
    }
    var fn = function () {
        img = document.querySelectorAll('img.txp_waterMark_pic')
        if (img.length == 1){
    	img.forEach(function(a){a.remove()});
    	return true;
        }
        else{
    	console.log('not img');
    	return false
        }
    }
    
    var thread = new thread();
    thread.start()
    try{
        for (let i = 0; i < 1000000; i++) {
        	thread.addThread(function () {
                if (fn()){throw 'jumpout';}
            })
        }
    }catch(e){}
    

     

  4. 打开谷歌浏览器-右脚上三个点更多工具-扩展程序

  5. 进入扩展程序,右上角必须是开发者模式,然后点击左边的加载已解压的程序,选择刚刚新建的文件夹,确定 over!!!

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

神奇的饭团

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值