日期:2014-05-16 浏览次数:20605 次
今天用Chrome调试脚本,发现加载了以下脚本内容:
/* 电脑管家chrome 广告过滤 */ var GJAD_CS = { elemhideElt : null, setElemhideCSSRules: function (selectors) { if (GJAD_CS.elemhideElt && GJAD_CS.elemhideElt.parentNode) GJAD_CS.elemhideElt.parentNode.removeChild(GJAD_CS.elemhideElt); if (!selectors) return; GJAD_CS.elemhideElt = document.createElement("style"); GJAD_CS.elemhideElt.setAttribute("type", "text/css"); // Try to insert the style into the <head> tag, inserting directly under the // document root breaks dev tools functionality: // http://code.google.com/p/chromium/issues/detail?id=178109 (document.head || document.documentElement).appendChild(GJAD_CS.elemhideElt); var elt = GJAD_CS.elemhideElt; // Use a local variable to avoid racing conditions function setRules() { if (!elt.sheet) { // Stylesheet didn't initialize yet, wait a little longer window.setTimeout(setRules, 0); return; } elt.innerText = selectors; } setRules(); }, QueryCss: function() { var query_param={ "url": window.location.href }; chrome.extension.sendRequest({cmd: "query_css", json: JSON.stringify(query_param)}, function(response) { if (response && response.selectors != "") { GJAD_CS.setElemhideCSSRules(response.selectors); } }); }, }; GJAD_CS.QueryCss();左键单击浏览器右上角的电脑管理图标
都是未开启状态,怎么还会加载那些脚本文件呢!
右键单击浏览器右上角的电脑管理图标,管理
把“已启用”前的勾去掉
再刷新需要调试的页面,“Content scripts”中的脚本都不见了。
成功禁止Chrome加载电脑管家广告过滤脚本代码。