您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove all custom styles from profile with a button click.
// ==UserScript== // @name Spacehey Profile Style Stripper // @namespace http://tampermonkey.net/ // @version 1.9 // @description Remove all custom styles from profile with a button click. // @author sudofry // @match https://spacehey.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=spacehey.com // @grant none // @require https://code.jquery.com/jquery-3.7.0.min.js // @license MIT // ==/UserScript== (function() { 'use strict'; var $ = window.jQuery; var css = document.createElement("style"); css.innerHTML = ` #divMain { width:auto; height:auto; } #removeStyle { color: #343536!important; position: fixed!important; top: 20px!important; right: 20px!important; background-color: #99ffcc!important; background-image: none!important; border: 1px solid #343536!important; border-radius: 6px!important; width: 23px!important; height: 23px!important; padding: 0!important; z-index: 100000!important; }`; document.head.appendChild(css); var divMain = document.createElement("div"); divMain.id = "divMain"; $("body").append(divMain); if ($('#code').length) { var removeStyle = document.createElement("button"); removeStyle.id = "removeStyle"; $("#divMain").append(removeStyle); $('#removeStyle').html('-'); } $("#removeStyle").on("click", function(e) { e.preventDefault(); $("#divMain").remove(); $('link[rel="stylesheet"], style').remove(); $('*').removeAttr('style'); $('head').append('<link rel="stylesheet" type="text/css" \ href="https://spacehey.com/css/normalize.css" />'); $('head').append('<link rel="stylesheet" type="text/css" \ href="https://spacehey.com/css/my.css" />'); }); })();