Bruger:SimmeD/Scripts/brugerrettigheder.js: Forskelle mellem versioner

Indhold slettet Indhold tilføjet
SimmeD (diskussion | bidrag)
Ny side: // This script is created by Pathoschild, and is hosted on meta. importScriptURI('http://meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/Ajax_sysop.js&action=raw&ctype=te...
 
updated scripts, migrated deprecated functions
Linje 1:
/**
// This script is created by Pathoschild, and is hosted on meta.
* Ajax sysop
 
* @see https://github.com/Pathoschild/Wikimedia-contrib#user-scripts
importScriptURI('http://meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/Ajax_sysop.js&action=raw&ctype=text/javascript');
* @update-token [[File:pathoschild/ajaxsysop.js]]
*/
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js');
 
/* Import from http://translatewiki.net/wiki/MediaWiki:Gadget-setuserrights.js */
/* Created there by SPQRobin, translated by Laaknor */
 
/* Adds a link on userpages to Special:UserRights */
addOnloadHook$(function() {
if (mw.config.get('wgTitle').indexOf("/") != -1 || document.title.indexOf("- History -") != -1) //no subpages or history
return;
if (mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk") {
var username = encodeURIComponent( mw.config.get('wgTitle') );
mw.util.addPortletLink("p-cactions", mw.config.get('wgServer') + "/wiki/Special:UserRights/" + username, "Brugerrettigheder", "ca-contrib", "Ændr denne brugers rettigheder");
}
});