Greasy Fork is available in English.

searchEngineJumpCE-modify by ted423

方便的在各个引擎之间跳转。可自定义搜索列表的 NLF 修改版。

< Feedback on searchEngineJumpCE-modify by ted423

Review: Good - script works

§
Posted: 23/08/2014

求爱奇艺和腾讯视频的嵌入代码~

我自己加了2个代码
list.video[0] = ['爱奇艺', 'http://so.iqiyi.com/so/q_%s', 'http://www.iqiyi.com//favicon.ico']
list.video[2] = ['腾讯视频', 'http://v.qq.com/search.html?pagetype=3&stj2=search.search&stag=txt.index&ms_key=%s', 'http://v.qq.com/favicon.ico']
可惜跳转过去就没有工具栏再跳转出去了。。求搜狐视频一样的嵌入代码。。老大能教教我怎么弄就更好了~~

ted423Author
§
Posted: 23/08/2014

最开头的那里就是
```
{
name: "google",
enabled: true,
url: /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/(?!cse\?)(?!.*\/.*\/)(?!patents\/)(?!.*preferences\?)(?!.*cse\/)(?!.*tbm=isch)(?!.*tbs=sbi)/,
engineList: 'web',
style: '\
position: fixed;\
left: 10px;\
background-color:white;\
top: 104px;\
z-index: 9999;\
width: 80px;\
',
insertIntoDoc: {
target: 'css;head',
keyword: function () {
var input = document.getElementById('lst-ib');
if (input) return input.value;
else input = document.getElementById('gbqfq');
if (input) return input.value;
else (input) = document.getElementById('q');//谷歌新标签页黑科技
if (input) return input.value;
},
where: 'afterEnd',
},
},
```
我以谷歌举个例子
name:名字(这个什么都不影响)
enabled:是否开启
url:正则匹配规则,要同时匹配嵌入的网址以及搜索的规则
enginelist:引擎分类,以确保展示哪类搜索引擎
style:追加的样式,一般可以不写,页面中是内联样式,注意写法,不然会导致脚本失效
insertIntoDoc:{taget:插入目标地点,主要为CSS选择器;keyword:获取搜索引擎要传递的值,可以是CSS选择器也可以是函数}
where,这个和insertIntoDoc的taget配合使用,确定插入在目标元素的前面还是后面,有4个值

然后还有个etc,函数,主要是用来调整页面的样式的

§
Posted: 26/08/2014

大神,url:要同时匹配嵌入的网址以及搜索的规则,是不是通过这个实现隐藏掉当前嵌入网页所对应的搜索跳转项?我自己在list.website添加了一条baidulocal,不过不能进行普通百度和纯洁百度之间的相互跳转,只能经由第三种搜索中转- - 这是不是因为这两种搜索字串都匹配了baidu的正则url?

ted423Author
§
Posted: 26/08/2014
Edited: 26/08/2014

是,如果你会正则的话可以通过(?!tn=)这种形式来避免匹配
http://zh.wikipedia.org/wiki/正则表达式#.E8.A1.A8.E8.BE.BE.E5.BC.8F.E5.85.A8.E9.9B.86

Post reply

Sign in to post a reply.