您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
有意思
思路:
1.使用 view-source: 查看源码
2.定位执行代码
3.针对性修复
我的博客 http://moreant.github.io/
这个是原理,挺有意思的
var ConsoleManager={
onOpen:function(){
alert("Console is opened")
},
onClose:function(){
alert("Console is closed")
},
init:function(){
var self = this;
var x = document.createElement('div');
var isOpening = false,isOpened=false;
Object.defineProperty(x, 'id', {
get:function(){
if(!isOpening){
self.onOpen();
isOpening=true;
}
isOpened=true;
}
});
setInterval(function(){
isOpened=false;
console.info(x);
console.clear();
if(!isOpened && isOpening){
self.onClose();
isOpening=false;
}
},200)
}
}
ConsoleManager.onOpen = function(){
try{
window.open('https://www.baidu.com/s?wd=%E5%88%AB%E6%83%B3%E5%A4%8D%E5%88%B6%E9%BB%8F%E8%B4%B4%E4%BA%86%EF%BC%8C%E8%BF%98%E6%98%AF%E5%A5%BD%E5%A5%BD%E5%AD%A6%E4%B9%A0%E5%90%A7',target='_self');
}catch(err){
var a = document.createElement("button");
a.onclick=function(){
window.open('https://www.baidu.com/s?wd=%E5%88%AB%E6%83%B3%E5%A4%8D%E5%88%B6%E9%BB%8F%E8%B4%B4%E4%BA%86%EF%BC%8C%E8%BF%98%E6%98%AF%E5%A5%BD%E5%A5%BD%E5%AD%A6%E4%B9%A0%E5%90%A7',target='_self');
}
a.click();
}
}
ConsoleManager.onClose = function(){
alert("Console is closed!!!!!")
}
ConsoleManager.init();