您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add a link to the copy of the current userstyle on uso.kkx.one
当前为
- // ==UserScript==
- // @name USO - add USOa button on userstyle page
- // @namespace github.com/Procyon-b
- // @version 0.2
- // @description Add a link to the copy of the current userstyle on uso.kkx.one
- // @author Achernar
- // @match https://userstyles.org/styles/*
- // @grant none
- // ==/UserScript==
- (function() {
- "use strict";
- var b=document.querySelector('#top-buttons > .left');
- const obs=new MutationObserver(function(muts){
- for (let mut of muts) {
- for (let n of mut.addedNodes) {
- b=n && n.querySelector && n.querySelector('#top-buttons > .left');
- if (b) {
- this.disconnect();
- setTimeout(addLink,0);
- return;
- }
- }
- }
- });
- if (b) addLink();
- else obs.observe(document.body, {attributes: false, subtree: true, childList: true });
- function addLink() {
- var L='https://uso.kkx.one/style/'+location.pathname.split('/')[2];
- var e=document.createElement('style');
- b.appendChild(e);
- e.innerText='#USOa {background: #39c739; color: white; text-align: center;}';
- e=document.createElement('a');
- b.appendChild(e);
- e.outerHTML='<a href="'+L+'" target="_blank" class="customize_button" id="USOa"><div>Install from USO archive</div></a>';
- }
- })();