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));
上一页 [1] [2] [3] |