您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
用于csdn博客阅读时内容区域扩大
// ==UserScript== // @name CSDN Reading mode togger // @namespace http://tampermonkey.net/ // @version 0.2 // @description 用于csdn博客阅读时内容区域扩大 // @author 宏斌 // @match https://blog.csdn.net/* // @grant none // ==/UserScript== (function() { 'use strict'; const okBtn = document.createElement('button'); okBtn.id = 'ReadingMode'; okBtn.setAttribute('class','option-box'); okBtn.innerText = 'R' // $(".blog-content-box").append(okBtn); // $(".more-toolbox").append(okBtn); $('.left-toolbox').append(okBtn); $("#ReadingMode").css({ width: '50px',height:'50px','border-radius':'2px','background-color':'#fff','font-size':'25px','color':'#fff'}); $('#ReadingMode').css({"background": 'linear-gradient(145deg, #bcbcbc, #e0e0e0)','box-shadow': '5px 5px 34px #969696, -5px -5px 34px #ffffff'}); const mystyles = document.createElement('style'); mystyles.type = 'text/css'; $("head").append(mystyles); $("#mainBox").css("transition","width 0.3s linear"); $("#rightAside").css("transition","width 0.3s linear"); mystyles.innerHTML = `.fillWidth{width: 100% !important} .zeroWidth{width: 0 !important}`; $("#ReadingMode").on('click',() => { $("#mainBox").toggleClass('fillWidth'); $('main').toggleClass('fillWidth'); $("#rightAside").toggleClass("zeroWidth"); }) })();