User:BryceMW-CA/common.js

( function ( mw, $ ){ // Only run on Linux (heuristic for the cases where I want this)  if ($.client.profile.platform == 'linux') {    var hide_regex = /^(?:https?:)?\/\/upload.wikimedia.org\/wikipedia\/(?:en|commons)\//;

function clickHandler(e) { e.stopPropagation; e.preventDefault; $(this).addClass('hide-images-clicked'); };

function makeWrapper { return $(' ', {       'class': 'hide-images-wrapper',        'click': clickHandler      }); };

$('img').each(function {      if (hide_regex.test(this.src)) {        $(this).wrap(makeWrapper);        $(this).addClass('hide-images-img');      }    }); } }(mediaWiki, jQuery));