您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
30/01/2022, 13:17:24
// ==UserScript== // @name Fix width for bookshop.org // @namespace Violentmonkey Scripts // @match https://*.bookshop.org/* // @grant none // @version 0.1 // @author oh-ok // @description 30/01/2022, 13:17:24 // @license MIT // This script fixes the header and other elements on bookshop.org from going off the page, adding annoying little horizontal scroll on desktop -.- // This problem still exists on the mobile version, but I can't quite determine the cause // ==/UserScript== //This problem occurs when some elements use vw instead of % on desktop. // //Get all the elements which use 100vw instead of 100% let e = document.getElementsByClassName("w-screen"); // Iterate through them and change their width for (let i=0; i<e.length; i++) { e[i].style.width="100%"; console.log("Fixed: " + e[i].id); }