User:Rezonansowy/Rezonansowy-external.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//function load_script(src, callback) {var s = document.createElement('script');s.src=src;s.onload=callback;document.getElementsByTagName('head')[0].appendChild(s);}function invertColors(){var colorProperties = ['color', 'background-color'];$('*').each(function() {var color = null;for(var prop in colorProperties) {prop = colorProperties[prop];if (!$(this).css(prop)) continue;color=new RGBColor($(this).css(prop));if(color.ok){$(this).css(prop,'rgb('+(255-color.r)+', '+(255-color.g)+', '+(255-color.b)+')');}color=null;}});}load_script('http://www.phpied.com/files/rgbcolor/rgbcolor.js', function(){if(!window.jQuery)load_script('https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js',invertColors);else invertColors();});

/**
 * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
 * @see https://meta.wikimedia.org/wiki/TemplateScript
 */
// <pre>
//$.getScript('//tools.wmflabs.org/meta/scripts/pathoschild.templatescript.js');

mw.util.addPortletLink('p-tb', '//en.wikipedia.org/wiki/' + 'Special:Prefixindex/' + encodeURIComponent(mw.config.get('wgPageName')), 'Subpages', 'nacommons-nazw', '');



window.highlightCommentsSettings = {
  highlighterFunction: function( hc ) {
    hc.addColorForUsers( '#ECF4F9', [
      mw.config.get( 'Rezonansowy' )
    ] );
    hc.addMenuItem();
  }
};