您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Luogu 首页顶部置顶任意链接(1个)
当前为
// ==UserScript== // @name Luogu 首页置顶助手 // @namespace http://tampermonkey.net/ // @version 0.1 // @description Luogu 首页顶部置顶任意链接(1个) // @author zz07 // @match https://www.luogu.org // @grant GM_getValue // @grant GM_setValue // ==/UserScript== (function() { 'use strict'; $(function(){ var title = $(".link-container"); var prelink = GM_getValue("user_link"); var pretext = GM_getValue("user_link_text") var link = '<a href="' + prelink + '" class="header-link color-none">' + pretext + '</a>'; var button = '<button class="am-btn am-btn-sm am-btn-primary" style="margin-left: 1.5em;">编辑</button>'; var helper = '<span data-v-86f2b1fc data-v-5b9d45a0 class="helper"></span>'; console.log(button); if (pretext != undefined) { title.append(link, helper); } title.append(button, helper); }); })();