From faa847b0a0f428d679746e30ba698e2a12116ed3 Mon Sep 17 00:00:00 2001 From: ywzhaiqi Date: Fri, 4 Jul 2014 10:13:29 +0800 Subject: [PATCH] Super_preloaderPlus_one 6.2.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移动 Google 相关搜索到第一页 - 增加译言网的译文库和原文库、精选、小组规则 --- Super_preloaderPlus/src/meta.js | 2 +- Super_preloaderPlus/src/rule.js | 35 ++++++++++++++++--- .../super_preloaderplus_one.user.js | 35 ++++++++++++++++--- 3 files changed, 63 insertions(+), 9 deletions(-) diff --git a/Super_preloaderPlus/src/meta.js b/Super_preloaderPlus/src/meta.js index 31ba6039..b53205ee 100644 --- a/Super_preloaderPlus/src/meta.js +++ b/Super_preloaderPlus/src/meta.js @@ -4,7 +4,7 @@ // @namespace https://github.com/ywzhaiqi // @description 预读+翻页..全加速你的浏览体验... // @author ywzhaiqi && NLF(原作者) -// @version 6.2.5 +// @version 6.2.6 // @homepageURL https://greasyfork.org/scripts/293-super-preloaderplus-one // @updateURL https://greasyfork.org/scripts/293-super-preloaderplus-one/code/Super_preloaderPlus_one.meta.js // @downloadURL https://greasyfork.org/scripts/293-super-preloaderplus-one/code/Super_preloaderPlus_one.user.js diff --git a/Super_preloaderPlus/src/rule.js b/Super_preloaderPlus/src/rule.js index 100ef837..13dce7c4 100644 --- a/Super_preloaderPlus/src/rule.js +++ b/Super_preloaderPlus/src/rule.js @@ -160,7 +160,8 @@ var SITEINFO=[ //HT_insert:['css;div#res',2], lazyImgSrc: 'imgsrc', // 新增的自定义样式。下面这个是调整 Google 下一页可能出现的图片排列问题。 - stylish: '.rg_meta{display:none}.bili{display:inline-block;margin:0 6px 6px 0;overflow:hidden;position:relative;vertical-align:top}._HG{margin-bottom:2px;margin-right:2px}', + stylish: 'hr.rgsep{display:none;}' + + '.rg_meta{display:none}.bili{display:inline-block;margin:0 6px 6px 0;overflow:hidden;position:relative;vertical-align:top}._HG{margin-bottom:2px;margin-right:2px}', documentFilter: function(doc){ var x = doc.evaluate('//script/text()[contains(self::text(), "data:image/")]', doc, null, 9, null).singleNodeValue; if (x) { @@ -181,6 +182,13 @@ var SITEINFO=[ script.textContent = 'window.rwt = function(){}'; doc.documentElement.appendChild(script); } + + // 移动相关搜索到第一页 + var brs = doc.getElementById('brs'), + ins = doc.getElementById('ires'); + if (brs && ins) { + ins.appendChild(brs); + } } } }, @@ -826,10 +834,29 @@ var SITEINFO=[ newIframe: true } }, - {name: '译言网', - url: '^http://article\\.yeeyan\\.org/.*$', + {name: '译言网 | 译文库和原文库', + url: /^http:\/\/(?:article|source)\.yeeyan\.org\//i, nextLink: '//ul[contains(concat(" ",normalize-space(@class)," "), " y_page") ]/li/a[text()="下一页"]', - pageElement: '//div[contains(concat(" ",normalize-space(@class)," "), "content_box")]', + autopager: { + pageElement: '//div[contains(concat(" ",normalize-space(@class)," "), "content_box")] | //div[@class="y_l"]/div[@class="y_s_list"]', + replaceE: '//ul[contains(concat(" ",normalize-space(@class)," "), " y_page") ]' + } + }, + {name: '译言精选', + url: /^http:\/\/select\.yeeyan\.org\//i, + nextLink: '//ul[contains(@class, "s_page_n")]/li/a[text()="下一页"]', + autopager: { + pageElement: 'id("article_list")', + replaceE: '//ul[contains(@class, "s_page_n")]' + } + }, + {name: ' 译言小组', + url: /^http:\/\/group\.yeeyan\.org\//i, + nextLink: '//div[@class="paginator"]/a[@class="next"]', + autopager: { + pageElement: '//div[contains(@class, "column-main")]/div[contains(@class, "stream")]', + replaceE: '//div[@class="paginator"]', + } }, {name: '主题站 | 果壳网 ', url: '^http://www\\.guokr\\.com/(?:site|group|ask|event)/', diff --git a/Super_preloaderPlus/super_preloaderplus_one.user.js b/Super_preloaderPlus/super_preloaderplus_one.user.js index 4e842d51..59029645 100644 --- a/Super_preloaderPlus/super_preloaderplus_one.user.js +++ b/Super_preloaderPlus/super_preloaderplus_one.user.js @@ -205,7 +205,8 @@ var SITEINFO=[ //HT_insert:['css;div#res',2], lazyImgSrc: 'imgsrc', // 新增的自定义样式。下面这个是调整 Google 下一页可能出现的图片排列问题。 - stylish: '.rg_meta{display:none}.bili{display:inline-block;margin:0 6px 6px 0;overflow:hidden;position:relative;vertical-align:top}._HG{margin-bottom:2px;margin-right:2px}', + stylish: 'hr.rgsep{display:none;}' + + '.rg_meta{display:none}.bili{display:inline-block;margin:0 6px 6px 0;overflow:hidden;position:relative;vertical-align:top}._HG{margin-bottom:2px;margin-right:2px}', documentFilter: function(doc){ var x = doc.evaluate('//script/text()[contains(self::text(), "data:image/")]', doc, null, 9, null).singleNodeValue; if (x) { @@ -226,6 +227,13 @@ var SITEINFO=[ script.textContent = 'window.rwt = function(){}'; doc.documentElement.appendChild(script); } + + // 移动相关搜索到第一页 + var brs = doc.getElementById('brs'), + ins = doc.getElementById('ires'); + if (brs && ins) { + ins.appendChild(brs); + } } } }, @@ -871,10 +879,29 @@ var SITEINFO=[ newIframe: true } }, - {name: '译言网', - url: '^http://article\\.yeeyan\\.org/.*$', + {name: '译言网 | 译文库和原文库', + url: /^http:\/\/(?:article|source)\.yeeyan\.org\//i, nextLink: '//ul[contains(concat(" ",normalize-space(@class)," "), " y_page") ]/li/a[text()="下一页"]', - pageElement: '//div[contains(concat(" ",normalize-space(@class)," "), "content_box")]', + autopager: { + pageElement: '//div[contains(concat(" ",normalize-space(@class)," "), "content_box")] | //div[@class="y_l"]/div[@class="y_s_list"]', + replaceE: '//ul[contains(concat(" ",normalize-space(@class)," "), " y_page") ]' + } + }, + {name: '译言精选', + url: /^http:\/\/select\.yeeyan\.org\//i, + nextLink: '//ul[contains(@class, "s_page_n")]/li/a[text()="下一页"]', + autopager: { + pageElement: 'id("article_list")', + replaceE: '//ul[contains(@class, "s_page_n")]' + } + }, + {name: ' 译言小组', + url: /^http:\/\/group\.yeeyan\.org\//i, + nextLink: '//div[@class="paginator"]/a[@class="next"]', + autopager: { + pageElement: '//div[contains(@class, "column-main")]/div[contains(@class, "stream")]', + replaceE: '//div[@class="paginator"]', + } }, {name: '主题站 | 果壳网 ', url: '^http://www\\.guokr\\.com/(?:site|group|ask|event)/',