User:Darqam/vector.js
From Guild Wars 2 Wiki
Jump to navigationJump to search
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)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/** ATools **** Vector alternative to GW2WT.**/
mw.loader.load( '/index.php?title=User:Chieftain_Alex/ATools.js&action=raw&ctype=text/javascript' );
/** Job queue - Query wiki API with ajax for the job queue statistic, copied from [[User:Dr ishmael/monobook.js]] **/
(function addJobQueuetoSpecialStatistics () {
if (mw.config.get('wgCanonicalSpecialPageName') === 'Statistics') {
$.getJSON('/api.php?action=query&format=json&meta=siteinfo&siprop=statistics').done(function (data){
var jobqueue = data['query']['statistics']['jobs'] || 0;
$('<tr class="mw-statistics-jobs"><td>Job queue</td><td class="mw-statistics-numbers">'+jobqueue+'</td></tr>').insertAfter('.mw-statistics-edits-average');
})
}
})();
/** random additions to page (this may scar 'real' coders for life, so beware). **/
(function addSidebarAdditionalLinks(document) {
mw.loader.using('mediawiki.util').then(function () {
$('.editButtons').append('<span> | ← – ²{ « ¦ ¶ » }² — →</span>');
$('.mw-htmlform-field-Licenses').append('<textarea>== Licensing ==\n{{ArenaNet image|icon|Effect icons}}</textarea>');
mw.util.addPortletLink ( 'p-navigation', '/wiki/User:Darqam/Dat_Icons', 'Dat Icons', 'n-Dat-icons', 'Dat Icons' );
mw.util.addPortletLink ( 'p-navigation', '/wiki/Event_timers', 'Event timers', 'n-Event-timers', 'Event timers' );
mw.util.addPortletLink ( 'p-navigation', '/wiki/Guild_Wars_2_Wiki_talk:Requests_for_technical_administration', 'Tech Admin', 'n-Tech Admin', 'Tech Admin' );
});
})(document);