您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
大屏优化 - 图片展开、强制插入图片。
// ==UserScript== // @name 天幻 FF1 专题 - 宽屏优化 // @namespace moe.jixun // @version 0.1 // @description 大屏优化 - 图片展开、强制插入图片。 // @author Jixun // @include http://ff1.ffsky.cn/* // @grant none // ==/UserScript== (function() { 'use strict'; const style = document.createElement("style"); style.textContent = ` #wrapper, #content, #content-box { width: initial } #content-box { position: absolute; left: 200px; } html, body { background:#fff; margin: 0; } #footer { display: none; } `; document.head.appendChild(style); const links = document.getElementsByTagName("a"); [].forEach.call(links, link => { if (link.textContent.includes("分辨率")) { const m = link.textContent.match(/分辨率:(\d+)[*x](\d+)/); link.textContent = ''; if (link.href.endsWith(".htm")) { const frame = document.createElement("iframe"); frame.style.border = 0; frame.src = link.href; frame.width = parseInt(m[1]) + 16; frame.height = parseInt(m[2]) + 16; link.parentNode.insertBefore(frame, link); } else { const img = document.createElement("img"); img.src = link.href; link.appendChild(img); } } }); })();