From b17edc3463dcff32fddd7fc7c82dd4689a96dcc3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 13 Jan 2022 12:16:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[Yandex=20=E8=A7=86?= =?UTF-8?q?=E9=A2=91]=20=E6=94=AF=E6=8C=81;=20=E8=A1=A5=E5=85=85=20[Yandex?= =?UTF-8?q?]=20=E5=85=B6=E4=BB=96=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 15 ++++++++++++--- DuckDuckGo-Enhanced.user.js | 12 +++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 8dbd81b..97e8b3c 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 4.4.3 +// @version 4.4.4 // @author X.I.U // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、Pixiv、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @match *://*/* @@ -522,8 +522,8 @@ function: { } }, // Startpage 搜索 yandex: { - host: 'yandex.com', - functionS: function() {if (lp == '/search/') {curSite = DBSite.yandex;}}, + host: ['yandex.com', 'yandex.ru', 'yandex.ua', 'yandex.by', 'yandex.kz', 'yandex.uz', 'yandex.com.tr'], + functionS: function() {if (lp == '/search/') {curSite = DBSite.yandex;} else if (lp == '/video/search') {curSite = DBSite.yandex_video;}}, history: true, pager: { type: 1, @@ -534,6 +534,15 @@ function: { scrollD: 2000 } }, // Yandex 搜索 + yandex_video: { + hiddenPN: true, + pager: { + type: 2, + nextL: 'css;button.more__button', + interval: 1000, + scrollD: 1000 + } + }, // Yandex 搜索 - 视频 yahoo: { host: 'search.yahoo.com', functionS: function() {if (indexOF('/search')) {curSite = DBSite.yahoo;}}, diff --git a/DuckDuckGo-Enhanced.user.js b/DuckDuckGo-Enhanced.user.js index 2d43f17..1c2f889 100644 --- a/DuckDuckGo-Enhanced.user.js +++ b/DuckDuckGo-Enhanced.user.js @@ -135,11 +135,13 @@ // 快捷回到顶部(右键两侧空白处) function backToTop() { if (!GM_getValue('menu_backToTop')) return - document.getElementById('web_content_wrapper').oncontextmenu = document.querySelector('#web_content_wrapper > .cw').oncontextmenu = document.getElementById('links_wrapper').oncontextmenu = function(e){ - if (e.target == this) { - e.preventDefault(); - window.scrollTo(0,0); + document.querySelectorAll('#web_content_wrapper, #web_content_wrapper > .cw, #links_wrapper').forEach(ele => { + ele.oncontextmenu = function(e) { + if (e.target == this) { + e.preventDefault(); + window.scrollTo(0,0); + } } - } + }) } })(); \ No newline at end of file