Naar inhoud springen

Gebruiker:Brimz/usualsuspects.js

Uit Wikipedia, de vrije encyclopedie

Opmerking: na het publiceren is het wellicht nodig uw browsercache te legen om de veranderingen te zien.

  • Firefox / Safari: houd Shift ingedrukt terwijl u:je 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)
  • Edge: houd Ctrl ingedrukt terwijl u:je op Vernieuwen klikt of 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 mezelf = ['Brimz']
var trolls = ['Rodejong', 'KlaasZ4usV', 'De_Wikischim', 'Akadunzio']

// 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 mezelfRefs = mezelf.map(function(naam) { return "/wiki/Gebruiker:" + naam.replace(' ', '_'); });
var sectionsBymezelf = mezelfRefs.map(function(ele) {return $('a[href="' + ele + '"]').closest('dd,li') });

var trollsRefs = trolls.map(function(naam) { return "/wiki/Gebruiker:" + naam.replace(' ', '_'); });
var sectionsBytrolls = trollsRefs.map(function(ele) {return $('a[href="' + ele + '"]').closest('dd,li') });

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