Gebruiker:Frank Geerlings/usualsuspects.js

Opmerking: nadat u de wijzigingen hebt gepubliceerd is het wellicht nodig uw browsercache te legen.

  • Firefox / Safari: houd Shift ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5 of Ctrl-R (⌘-Shift-R op een Mac)
  • Google Chrome: druk op Ctrl-Shift-R (⌘-Shift-R op een Mac)
  • Internet Explorer / Edge: houd Ctrl ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5
  • Opera: druk op Ctrl-F5.
(function($){

// Configure usual suspects whose contributions are usually of little value (add yourself if you usually read your contributions before publishing them)
var trolls = ['Rodejong', 'KlaasZ4usV', 'Richardkiwi', 'Robotje', 'BoH', 'Dqfn13', 'Mdd', 'Zanaq', 'The Banner', 'Diederickdan', 'Bertux', 'Matroos Vos', 'LeeGer']

// These will usually be signatures, may however also be pings, which are essentially false positives. Could be improved.
// Also, the user namespace is hardcoded so it won't work cross-wiki (meta)
var trollRefs = trolls.map(function(naam) { return "/wiki/Gebruiker:" + naam.replace(' ', '_'); });
var sectionsByTrolls = trollRefs.map(function(ele) {return $('a[href="' + ele + '"]').closest('dd,li') });

// How you want troll contributions to be rendered
sectionsByTrolls.map(function(ele) { ele.addClass('troll-contrib') });
})($);