Pengguna:Iwan Novirion/twinkleprotect.js: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
←Membuat halaman berisi '// If TwinkleConfig aint exist. if( typeof( TwinkleConfig ) == 'undefined' ) { TwinkleConfig = function() {}; } /** TwinkleConfig.summaryAd (string) If ad should be a...'
 
k Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink)
 
(1 revisi perantara oleh pengguna yang sama tidak ditampilkan)
Baris 26:
 
if( userIsInGroup( 'sysop' ) ) {
mw.util.addPortletLink( (typeof pTwinkle != "undefined") ? pTwinkle : "p-cactions", "javascript:twinkleprotect.callback()", "PP", "tw-rpp", "Protect page", "");
} else if (twinkleConfigExists) {
mw.util.addPortletLink( (typeof pTwinkle != "undefined") ? pTwinkle : "p-cactions", "javascript:twinkleprotect.callback()", "RPP", "tw-rpp", "Request page protection", "");
}
else
{
mw.util.addPortletLink( (typeof pTwinkle != "undefined") ? pTwinkle : "p-cactions", 'javascript:alert("Your account is too new to use Twinkle.");', 'RPP', 'tw-rpp', 'Request page protection', '');
}
}
addOnloadHook$(twinkleprotect);
 
twinkleprotect.callback = function twinkleprotectCallback() {