MediaWiki:Gadget-QuickDelete.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 1:
//Installing this (as described on the talk page) will give you links in the toolbox for all pages in the Image: namespace, that say 'Nominate for deletion', 'mark as no source' and 'mark as no license'. The first one will give you a pop-up that asks for a reason. It inserts this reason on [[COM:DEL]], marks the image for deletion and notifies the uploader. The second and third one mark the image as missing source/license (NSD/NLD) and notify the uploader. Note: don't abuse this. If you mark 10 images from one user as no source, don't use this because they will get 10 separate warnings on their talk page!! (Or if you do, at least clean it up afterwards.)
 
if (!QuickDeleteLoadCount) { // Load functions only once
 
//Yes, this needs super cleaning-up and there's duplicate code and it doesn't work for Konqueror. Nonetheless it works at least for Firefox. If there's one central copy it's much easier to keep up to date than everyone having their own copy.
Riga 281 ⟶ 279:
}
 
addOnloadHook(mnx_onload); //No source, no permission, no license.
//QuickDeleteLoadCount black magic.
//We use this to provide different functions to different users.
QuickDeleteLoadCount++; //We keep track in QuickDeleteLoadCount how many times this file was loaded.
 
if (QuickDeleteLoadCount == 1) {
//First load is from [[Mediawiki:Common.js]]
addOnloadHook(nfd_onload); //Provide nominate for deletion. Formerly [[MediaWiki:Quick-delete2.js]]
} else if (QuickDeleteLoadCount == 2) {
//The user has this file in it's /monobook.js. Provide extended functionality.
addOnloadHook(mnx_onload); //No source, no permission, no license.
}
/*else if (QuickDeleteLoadCount > 2) alert("Why do you have MediaWiki:Quick-delete.js loaded several times on your monobook.js??") //Silently ignore this */
 
// </nowiki></source>