MediaWiki:ShowOnlyMyClearCacheMessage.js

(function {    if (mw.config.get('wgUserLanguage') !== 'en' || !$('#mw-clearyourcache').exists) {        return;    }    var number;    //from https://stackoverflow.com/a/9851769    if (!!window.chrome) {        number = 1; //chrome    } else if (/constructor/i.test(window.HTMLElement)) {        number = 2; //safari    } else if (typeof InstallTrigger !== 'undefined') {        number = 3; //firefox    } else if (!!document.documentMode) {        number = 4; //IE    }    $('#mw-clearyourcache > ul').css('list-style', 'none');    $('#mw-clearyourcache > ul > li:not(:nth-child(' + number + '))').hide;    $('#mw-clearyourcache > ul > li:not(:nth-child(' + number + ')) > b').hide;    $('#mw-clearyourcache > p').html($('#mw-clearyourcache > p').html.replace(/\./, ':'));    var el = $('#mw-clearyourcache > ul > li:nth-child(' + number + ')');    el.html(el.html.slice(el.html.indexOf('-') + 1)); //from https://stackoverflow.com/a/27862868 if (number === 1 || number === 3) { //function by Kocka el.html(el.html.replace(/^.*: (.*\.) .*: (.*\.)$/, function (match, r1, r2) { if (navigator.platform.indexOf('Mac') > -1) { return r2; } else if (navigator.platform.indexOf('Win') > -1) { return r1; } else { return 'You can\'t refresh your cache. Good luck!'; }       }));    } });