var
a = document;
var
e =
'http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&q=w3ctech&aq=f&aqi=&aql=&oq='
;
function
f() {
this
.tags = {};
this
.clicks = [];
this
.getSt()
}
f.prototype = {
sindex: [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
sengin: [
"baidu.com"
,
"baidu.com"
,
"google.com"
,
"google.cn"
,
"sogou.com"
,
"zhongsou.com"
,
"search.yahoo.com"
,
"one.cn.yahoo.com"
,
"soso.com"
,
"114search.118114.cn"
,
"search.live.com"
,
"youdao.com"
,
"gougou.com"
,
"bing.com"
],
sword: [
"word"
,
"wd"
,
"q"
,
"q"
,
"query"
,
"w"
,
"p"
,
"p"
,
"w"
,
"kw"
,
"q"
,
"q"
,
"search"
,
"q"
],
getValue:
function
(m, n) {
var
l =
new
RegExp(
"(^|&|\\?)"
+ m +
"=([^&]*)(&|\x24|#)"
);
var
k = n.match(l);
return
k ? k[2] :
""
},
getSt:
function
() {
var
x =
null
;
var
k = e;
var
w =
this
.sengin;
var
u =
this
.sword;
var
q =
this
.sindex;
for
(
var
o = 0; o < w.length; o++) {
if
((k.indexOf(w[o]) > -1) && (
this
.getValue(u[o], k))) {
this
.tags.sw =
this
.getValue(u[o], k);
this
.tags.se = q[o];
this
.tags.st =
"2"
;
return
;
}
}
return
this
.tags;
}
}
var
b =
new
f();
alert(b.tags);
for
(
var
k
in
b.tags) {
alert(b.tags[k]);
}
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步