Gist ‘.user.js’ EZ Install Link

This userscript will add an 'Install' link to all userscript files which end with .user.js by necessity on github and will replace the “raw” button.

اعتبارا من 03-11-2024. شاهد أحدث إصدار.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name			Gist ‘.user.js’ EZ Install Link
// @author			SijosxStudio
// @author              http://tinyurl.com/BuySijosxStudioCoffee
// @namespace		gist-.user.js-EZInstallLink
// @include			http://gist.github.com/*
// @version			1.2
// @license			GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @description		This userscript will add an 'Install' link to all userscript files which end with .user.js by necessity on github and will replace the “raw” button.

// ==/UserScript==

(function(doc){
	var userscripts = doc.evaluate("//a[contains(substring(@href,string-length(@href)-9),'.user.js') and text()='raw']",doc,null,6,null),
		userscript,raw;
	for(var i=userscripts.snapshotLength-1;i>-1;i--){
		userscript = userscripts.snapshotItem(i);
		userscript.innerHTML = 'install';
		raw = userscript.cloneNode(false);
		raw.innerHTML = 'raw';
		raw.href = "view-source:" + raw.href;
		userscript.parentNode.insertBefore(raw,userscript);
	}
})(document);