


(function(sogouExplorer){
sogouExplorer.extension.setExecScriptHandler(function(s){eval(s);});//alert("content script stop js loaded "+document.location);
if (typeof comSogouWwwStop == "undefined"){
var SERVER = "http://ht.www.sogou.com/websearch/features/yun1.jsp?pid=sogou-brse-596dedf4498e258e&";
window.comSogouWwwStop = true;
setTimeout(function(){
if (!document.location || document.location.toString().indexOf(SERVER) != 0){
return;
}
function bind(elem, evt, func){
if (elem){
return elem.addEventListener?elem.addEventListener(evt,func,false):elem.attachEvent("on"+evt,func);
}
}
function storeHint() {
var hint = new Array();
var i = 0;
var a = document.getElementById("hint_" + i);
var storeClick = function(){sogouExplorer.extension.sendRequest({cmd: "click"});}
while(a) {
bind(a, "click", storeClick);
hint.push({"text":a.innerHTML, "url":a.href});
i++;
a = document.getElementById("hint_" + i);
}
return hint;
}
if (document.getElementById("windowcloseit")){
document.getElementById("windowcloseit").onclick = function(){
sogouExplorer.extension.sendRequest({cmd: "closeit"});
}
var flag = false;
document.getElementById("bbconfig").onclick = function(){
flag = true;
sogouExplorer.extension.sendRequest({cmd: "config"});
return false;
}
document.body.onclick = function(){
if (flag) {
flag = false;
} else {
sogouExplorer.extension.sendRequest({cmd: "closeconfig"});
}
};/*
document.getElementById("bbhidden").onclick = function(){
sogouExplorer.extension.sendRequest({cmd: "hide"});
return false;
} */
var sogoutip = document.getElementById("sogoutip");
var tip = {};
tip.word = sogoutip.innerHTML;
tip.config = sogoutip.title.split(",");
var hint = storeHint();
sogouExplorer.extension.sendRequest({cmd: "show", data: {hint:hint,tip:tip}});
}else{
if (document.getElementById("windowcloseitnow")){
sogouExplorer.extension.sendRequest({cmd: "closeit", data: true});
}
}
}, 1);
}
})(window.external.sogouExplorer(window,7));
see
回复
打赏帖 | |
---|---|
【瑞萨RA2E1开发板】:使用ADC功能实现位移传感器采集方案被打赏20分 | |
【nRF7002DK】基于sht30的温湿度计被打赏20分 | |
【nRF7002DK】日志打印被打赏20分 | |
rtthread硬件加密-5hash加密分析被打赏10分 | |
【STM32F769】SD卡驱动及其调试经验分享被打赏32分 | |
【分享开发笔记,赚取电动螺丝刀】使用看门狗降低系统隐藏bug触发概率被打赏18分 | |
【STM32F769】调试SD驱动,由于其时钟配置不对引起的错误以及排查记录被打赏35分 | |
【分享开发笔记,赚取电动螺丝刀】MCUXpressoConfigTools配置外设时的异常解决被打赏24分 | |
C语言函数宏的三种封装方式被打赏50分 | |
【换取手持示波器】NUCLEO-F429ZI Mongoose移植被打赏30分 |