User:Beetstra/Gadget-Contribslog.js

/** * Support for better display of log entries at en.wikipedia. * Tested only in Chrome. * * Author: User:Beetstra, October 2020 * License: Quadruple licensed GFDL, GPL, LGPL and Creative Commons Attribution 3.0 (CC-BY-3.0) * * Version history: * * - start version on handling spamblacklistlog - 20201029 /*jshint unused:true, eqnull:true, browser:true, white:true, indent:4 */ /*global mw, $ */ // (function {    // Guard against double inclusions    if (typeof window.BLLogHandler !== 'undefined') {        return;    }    var conf = mw.config.get([ 'wgUserGroups', 'wgPageName', 'wgServer', 'wgScriptPath', 'wgUserName' ]);

function makeRawLink(name, url, target) { var link = document.createElement('a'); link.setAttribute('href', url); if (target) { link.setAttribute('target', target); }       link.appendChild(document.createTextNode(name)); return link; }   function addRequestLinks(name, href, before, parent) { parent.insertBefore(document.createTextNode('- '), before); parent.insertBefore(makeRawLink(name, href), before); parent.insertBefore(document.createTextNode(' '), before); }

if ((conf.wgPageName.substr(0, 21) == 'Special:Contributions')) { return; } }); // //