User:Dank/wishywashy.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.
var phrases = {'wishy': '"Wishy" is a very silly word; don\'t use it.', 'washy': '"Washy" is even worse.'};
var argstring = ' ' + Object.keys(phrases).join(" ");
if (mw.config.get( 'wgAction' ) === 'view')
mw.loader.using(['jquery.highlightText', 'jquery.tipsy'], function() {
    mw.util.$content.highlightText(argstring);
    $('.highlight').tipsy({
        title: function() { 
        	return phrases[$(this).text()];
        }
    });
});
// wishy and washy