您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
让推特图片浏览更加人性化
当前为
// ==UserScript== // @name Twitter image viewing enhancement // @name:zh-CN Twitter 图片查看增强 // @name:zh-TW Twitter 圖像查看增強 // @icon https://twitter.com/favicon.ico // @namespace https://moe.best/ // @version 0.3.1 // @description Make Twitter photo viewing more humane // @description:zh-CN 让推特图片浏览更加人性化 // @description:zh-TW 讓 Twitter 照片瀏覽更人性化 // @author Jindai Kirin // @include https://twitter.com/* // @license MIT // @grant none // @run-at document-end // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.slim.min.js // @require https://cdn.bootcss.com/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js // ==/UserScript== (function() { 'use strict'; const closeImgView = () => $('div[aria-labelledby="modal-header"] div[aria-haspopup="false"][role="button"][style]:not([data-testid])').click(); const btnGroup = () => $('div[aria-labelledby="modal-header"] div[aria-haspopup="false"][role="button"]:not([data-testid]):not([style])'); const prevImg = () => { const $btn = $(btnGroup()[0]); if (!$btn.attr('disabled')) $btn.click(); }; const nextImg = () => { const $btn = $(btnGroup()[1]); if (!$btn.attr('disabled')) $btn.click(); }; $(document).click(({ target: { tagName, baseURI } }) => { if (tagName == 'IMG' && /\/photo\//.test(baseURI)) closeImgView(); }); $(window).mousewheel(({ deltaY, target: { tagName, baseURI } }) => { if (tagName == 'IMG' && /\/photo\//.test(baseURI)) { switch (deltaY) { case 1: prevImg(); break; case -1: nextImg(); break; } } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址