您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
click to toggle /r/anime/ flairs
// ==UserScript== // @name /r/anime flair clicker // @namespace http://seewang.me/ // @version 1.0.2 // @description click to toggle /r/anime/ flairs // @author cwang22 // @match https://www.reddit.com/r/anime/* // @grant GM_addStyle // ==/UserScript== GM_addStyle(".click {width: auto; height: 14px;line-height: 13px;padding: 0 6px;background-image: none;background-color: #9ac;border: 1px solid #aaa;color: #3e5267;cursor: default;font-size: 11px !important;}.flair.click:hover{background-color: #9ac;}"); $(".flair").click(function(){ $(this).toggleClass("click"); selectElement($(this).get(0)); }); function selectElement(element) { if (window.getSelection) { var sel = window.getSelection(); sel.removeAllRanges(); var range = document.createRange(); range.selectNodeContents(element); sel.addRange(range); } else if (document.selection) { var textRange = document.body.createTextRange(); textRange.moveToElementText(element); textRange.select(); } }