您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This userscript injects mobile detection to MobileRead.com
当前为
// ==UserScript== // @name Mobile MobileRead.com // @name:pl Mobilny MobileRead.com // @namespace Violentmonkey Scripts // @match https://www.mobileread.com/* // @resource IMPORTED_CSS https://userstyles.world/api/style/13484.user.css // @grant GM_getResourceText // @grant GM_addStyle // @run-at document-body // @version 1.5 // @author juliazero // @license GPL-3.0-only // @description This userscript injects mobile detection to MobileRead.com // @description:pl Ten skrypt wgrywa detekcję mobilnych urządzeń dla MobileRead.com // // ==/UserScript== (function() { 'use strict'; // Load and inject CSS as a <style> element let css = GM_getResourceText("IMPORTED_CSS"); // Remove the @-moz-document wrapper, but keep the inner contents css = css.replace(/@-moz-document\s+domain\([^)]+\)\s*\{([\s\S]*?)\}\s*$/, '$1'); GM_addStyle(css); // Add viewport meta tag for better mobile support const metaElement = document.createElement('meta'); metaElement.name = 'viewport'; metaElement.content = 'width=device-width,initial-scale=1,maximum-scale=1,user-scalable=yes'; document.head.appendChild(metaElement); // Remove " First" and "Last " from pagination links window.addEventListener("DOMContentLoaded", () => { document.querySelectorAll('a.smallfont').forEach(a => { for (let node of a.childNodes) { if (node.nodeType === Node.TEXT_NODE) { node.textContent = node.textContent.replace(" First", "").replace("Last ", ""); } } }); }); })();