Skip to content

Commit

Permalink
修正了 @include
Browse files Browse the repository at this point in the history
  • Loading branch information
ywzhaiqi committed Jul 29, 2014
1 parent d578183 commit 38f4945
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .修改版/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ PS:脚本自身已经支持自动翻页,但作者未将相似图片搜索支
- 修正电影搜索,电影搜索限制:每分钟10次(采用公开 api v2)
- 搜索面板增加图片的显示

### searchenginejump.user.js(2014-7-2)
### searchenginejump.user.js

[searchEngineJump By NLF](http://userscripts.org/scripts/show/84970) 自用修改版。
[searchEngineJump By NLF](http://userscripts.org/scripts/show/84970) 自用修改版。可改用 [SearchEngineJump_by_ted423](https://greasyfork.org/zh-CN/scripts/213-searchenginejump-by-ted423),更加全面。

- 修正 bing 因为改版失效的问题
- 修改 @include 不为全局
- 参考 [SearchEngineJump_by_ted423](https://greasyfork.org/scripts/213-searchenginejump-by-ted423/) 新增了很多站点
- ted423 版中提取了一些新的搜索

### TiebaNojump.user.js

Expand Down
53 changes: 46 additions & 7 deletions .修改版/searchenginejump.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
// @version 4.1.0.0
// version 4.0.1.0
// @created 2011-7-2
// @lastUpdated 2014-1-29
// @lastUpdated 2014-7-29
// @grant none
// @run-at document-start
// @namespace http://userscripts.org/users/NLF
// @homepage http://userscripts.org/scripts/show/84970
// @downloadURL https://userscripts.org/scripts/source/84970.user.js
// @updateURL https://userscripts.org/scripts/source/84970.meta.js
// downloadURL https://userscripts.org/scripts/source/84970.user.js
// updateURL https://userscripts.org/scripts/source/84970.meta.js
// include *
// match *://*/*

// @include /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^?]+\?(?:&?q=|(?:[^#](?!&tbm=))+?&q=)(?:.(?!&tbm=))*$/
// @include /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^#]*#(?:&?q=|.+?&q=).+/
// @include /^https?:\/\/www\.baidu\.com\/(?:s|baidu)/
Expand All @@ -30,6 +31,17 @@
// @include /^https?:\/\/www\.youtube\.com\/results/
// @include /^https?:\/\/www\.nicovideo\.jp\/search\//
// @include /^https?:\/\/music\.baidu\.com\/search/
// @include /^https?:\/\/so\.1ting\.com\/all\.do/
// @include /^https?:\/\/www\.xiami\.com\/search/
// @include /^https?:\/\/image\.baidu\.cn\/i/
// @include /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^?]+\?.*&tbm=isch/
// @include /^https?:\/\/www\.flickr\.com\/search\//
// @include /^https?:\/\/[^.]*\.bing\.com\/images/
// @include /^https?:\/\/www\.yyets\.com\/search\//
// @include /^https?:\/\/bt\.ktxp\.com\/search\.php\?/
// @include /^http:\/\/oabt\.org\/\?topic_title=/
// @include /^https?:\/\/s\.taobao\.com\/search/
// @include /^https?:\/\/search\.jd\.com\/Search/
// ==/UserScript==

(function () {
Expand Down Expand Up @@ -113,6 +125,8 @@
keyword: '//input[@name="q"]',
where: 'beforeBegin',
},
// 自定义样式,我新增的
css: '',
},
{name: "google-hash-query",// 不刷新页面显示搜索结果的google
enabled: true,
Expand Down Expand Up @@ -391,12 +405,12 @@
',
insertIntoDoc: {
keyword: 'css;input#kw',
target: 'css;#browserNavBar',
target: 'css;.mod-channel-nav',
where: 'beforeBegin',
},
},
{name: "谷歌图片",
url: /^https?:\/\/wwww\.google(?:\.[A-z]{2,3}){1,2}\/[^?]+\?.*&tbm=isch/,
url: /^https?:\/\/www\.google(?:\.[A-z]{2,3}){1,2}\/[^?]+\?.*&tbm=isch/,
enabled: true,
engineList: "image",
style: '\
Expand Down Expand Up @@ -424,6 +438,26 @@
where: 'beforeBegin',
},
},
{name: "Bing image search",
url: /^https?:\/\/[^.]*\.bing\.com\/images/,
enabled: true,
engineList: "image",
style: '\
border-top: 1px solid #E6E6E6;\
border-bottom: 1px solid #E6E6E6;\
margin-top:5px;\
',
insertIntoDoc: {
keyword: 'css;#sb_form_q',
target: 'css;#b_header',
where: 'beforeEnd',
},
css: '\
#rfPane {\
margin-top: 50px;\
}\
',
},

// 资源下载
{name: "人人影视",
Expand Down Expand Up @@ -744,6 +778,11 @@
url: 'http://www.yyets.com/search/index?keyword=%s',
favicon: 'http://www.yyets.com/favicon.ico',
},
{
name: '丫丫下载站',
url: 'http://www.yayaxz.com/search/%s',
favicon: 'http://www.yayaxz.com/favicon.ico',
},
{
name: '网盘搜索',
url: 'http://so.baiduyun.me/search.php?wd=%s',
Expand Down Expand Up @@ -8766,7 +8805,7 @@

if (!iTarget || !iInput) return;

// 添加全局样式
// 添加全局样式和自定义样式
var globalStyle = document.createElement('style');
globalStyle.type = 'text/css';
globalStyle.textContent = getMStr(function () {
Expand Down Expand Up @@ -8869,7 +8908,7 @@
}
*/

}).cssText;
}).cssText + '\n' + (matchedRule.css || '');
document.head.appendChild(globalStyle);


Expand Down

0 comments on commit 38f4945

Please sign in to comment.