User:RamzyM (WMF)/global.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// Global watchlist by DannyS712
window.GlobalWatchlistConfig = { "anonFilter": 0, "botFilter": 0, "confirmAllSites": true, "fastMode": false, "groupPage": true, "minorFilter": 0, "showEdits": true, "showLogEntries": true, "showNewPages": true, "sites": [ "meta.wikimedia", "id.wikipedia", "ms.wikipedia", "jv.wikipedia", "su.wikipedia", "bug.wikipedia", "map-bms.wikipedia", "ace.wikipedia", "min.wikipedia", "bjn.wikipedia", "gor.wikipedia", "ban.wikipedia", "mad.wikipedia", "nia.wikipedia", "id.wiktionary", "min.wiktionary", "nia.wiktionary", "id.wikibooks", "id.wikiquote", "id.wikisource", "jv.wiktionary", "ms.wikibooks", "ms.wiktionary", "su.wikiquote", "su.wiktionary" ] };
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:DannyS712/Global watchlist.js&action=raw&ctype=text/javascript');
// [[m:User:Jon Harald Søby/diffedit.js]]
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jon_Harald_Søby/diffedit.js&action=raw&ctype=text/javascript' );
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:BrandonXLF/QuickEdit.js&action=raw&ctype=text/javascript');
new mw.Api().saveOptions( {
' ipinfo-beta-feature-enable': 1,
'ipinfo-enable': 1,
'ipinfo-use-agreement': 1
} );
// Based on alaa's script
mw.loader.using( [ 'mediawiki.util', 'oojs-ui-windows', 'mediawiki.ForeignApi' ], function () {
mw.util.addPortletLink ( 'p-tb', "#", "Shorten URL" , 'pt-shortenURL', "Make short URL" );
$("#pt-shortenURL").click (function (){
//Fetch Short URL from Meta tool
var api = new mw.ForeignApi( 'https://meta.wikimedia.org/w/api.php' );
api.post({
action: 'shortenurl',
format: 'json',
url: window.location.href
}).then( function( response ) {
window.prompt("Copy your link", response.shortenurl.shorturl);
});
});
});