greasyfork. APPLIES TO LINKS SEARCH BY SITES

gf.qytechs.cn. makes each site in applies to section of script page into a clickable link to search scripts by sites (and see other scripts for same site) (JasonBarnabe/greasyfork#146)

目前为 2014-06-17 提交的版本。查看 最新版本

// ==UserScript==
// @name         greasyfork. APPLIES TO LINKS SEARCH BY SITES
// @version      2014.0618.0000
// @description  gf.qytechs.cn. makes each site in applies to section of script page into a clickable link to search scripts by sites (and see other scripts for same site) (JasonBarnabe/greasyfork#146)
// @namespace    https://github.com/jesus2099/konami-command
// @author       PATATE12 aka. jesus2099/shamo
// @licence      CC BY-NC-SA 3.0 (https://creativecommons.org/licenses/by-nc-sa/3.0/)
// @since        2014.6.6.
// @grant        none
// @include      https://gf.qytechs.cn/scripts/*
// @include      https://www.gf.qytechs.cn/scripts/*
// @exclude      *gf.qytechs.cn/scripts/*/*
// @exclude      *gf.qytechs.cn/scripts/?
// @exclude      *gf.qytechs.cn/scripts/by*
// @run-at       document-end
// ==/UserScript==
(function(){"use strict";
	var appliesto = document.querySelector("div#script-meta dd.script-show-applies-to");
	if (appliesto) {
		var at = appliesto.textContent.trim();
		var applies2 = document.createDocumentFragment();
		if (at.match(/^all sites$/i)) {
			applies2.appendChild(a(at, "*"));
		}
		else {
			var sep, site, sites = /[^, ]+/g;
			while ((site = sites.exec(at)) !== null) {
				if (sep) { applies2.appendChild(document.createTextNode(sep)) }
				else { sep = ", "; }
				applies2.appendChild(a(site[0]));
			}
		}
		appliesto.replaceChild(applies2, appliesto.firstChild);
	}
	function a(t, l) {
		var a = document.createElement("a");
		a.setAttribute("href", "/scripts/by-site/"+(l?l:t));
		a.appendChild(document.createTextNode(t));
		return a;
	}
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址