我在网站顶部找到了该脚本:
<script type="text/javascript" >
function Ext_Detect_NotInstalled(ExtName,ExtID) {
}
function Ext_Detect_Installed(ExtName,ExtID) {
alert("We have found unwanted extension. Please contact support")
window.location = "logout.php"
}
var Ext_Detect = function(ExtName,ExtID) {
var s = document.createElement('script');
s.onload = function(){Ext_Detect_Installed(ExtName,ExtID);};
s.onerror = function(){Ext_Detect_NotInstalled(ExtName,ExtID);};
s.src = 'chrome-extension://' + ExtID + '/captured.js';
document.body.appendChild(s);
}
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
function displayErrorAndLogout() {
alert("Please use chrome browser to view the content");
window.location = "logout.php"
}
if (is_chrome==true)
{
window.onload = function() { Ext_Detect('Chrome','ngpampappnmepgilojfohadhhmbhlaek');};
} else {
is_chrome = navigator.userAgent.toLowerCase().indexOf('crios') > -1;
if (is_chrome == false){
if (detectIE()){
displayErrorAndLogout()
}
if (navigator.userAgent.indexOf('UCBrowser') > -1) {
displayErrorAndLogout()
}
此脚本检查Internet下载管理器扩展,并弹出注销消息。 是否可以使用Greasemonkey删除或更改此内联Java脚本?
答案 0 :(得分:0)
如果要禁用Chrome插件的检查,这很简单:脚本为onload
分配了一个功能,因此,如果您仅向onload
分配其他内容,Ext_Detect
将永远不会运行,并且您的扩展程序也不会被检测到:
window.onload = () => null;
不幸的是,检查crios
和UCBrowser
并运行detectIE
的另一部分是同步运行的 ,大概是在页面加载开始时,用户脚本无法可靠地在页面加载开始时运行,因此尽管您可以使用@run-at document-start
进行尝试,但行为可能无法改变:displayErrorAndLogout
在分配给{{1}之前先调用alert
},因此如果您这样做是为了使window.location
抛出错误,则位置将不会更改:
alert