User:FINNER/common.js

///////////////////////////////////////////////////////////////////////////////// // FINNER/Test $(function { //intact (default)   $('#relic-refinement-intact-button').html('Intact'); //exceptional    $('#relic-refinement-exceptional-button').html('Exceptional'); //flawless    $('#relic-refinement-flawless-button').html('Flawless'); //radiant $('#relic-refinement-radiant-button').html('Radiant'); });

$(function intact{   var common = document.getElementById("common").innerHTML;    var res1 = common.replace(/23.33|20|16.67/g, "25.33");    document.getElementById("common").innerHTML = res1;    document.getElementById("common2").innerHTML = res1;    document.getElementById("common3").innerHTML = res1;    var uncommon = document.getElementById("uncommon").innerHTML;    var res2 = uncommon.replace(/13|17|20/g, "11");    document.getElementById("uncommon").innerHTML = res2;    document.getElementById("uncommon2").innerHTML = res2;    var rare = document.getElementById("rare").innerHTML;     var res3 = rare.replace(/4|6|10/g, "2");    document.getElementById("rare").innerHTML = res3; }); $(function exceptional {   var common = document.getElementById("common").innerHTML;    var res1 = common.replace(/25.33|20|16.67/g, "23.33");    document.getElementById("common").innerHTML = res1;    document.getElementById("common2").innerHTML = res1;    document.getElementById("common3").innerHTML = res1;    var uncommon = document.getElementById("uncommon").innerHTML;    var res2 = uncommon.replace(/11|17|20/g, "13");    document.getElementById("uncommon").innerHTML = res2;    document.getElementById("uncommon2").innerHTML = res2;    var rare = document.getElementById("rare").innerHTML;     var res3 = rare.replace(/2|6|10/g, "4");    document.getElementById("rare").innerHTML = res3; }); $(function flawless {   var common = document.getElementById("common").innerHTML;    var res1 = common.replace(/23.33|25.33|16.67/g, "20");    document.getElementById("common").innerHTML = res1;    document.getElementById("common2").innerHTML = res1;    document.getElementById("common3").innerHTML = res1;    var uncommon = document.getElementById("uncommon").innerHTML;     var res2 = uncommon.replace(/13|11|20/g, "17");    document.getElementById("uncommon").innerHTML = res2;    document.getElementById("uncommon2").innerHTML = res2;    var rare = document.getElementById("rare").innerHTML;     var res3 = rare.replace(/4|2|10/g, "6");    document.getElementById("rare").innerHTML = res3; }); $(function radiant {   var common = document.getElementById("common").innerHTML;    var res1 = common.replace(/23.33|20|25.33/g, "16.67");    document.getElementById("common").innerHTML = res1;    document.getElementById("common2").innerHTML = res1;    document.getElementById("common3").innerHTML = res1;    var uncommon = document.getElementById("uncommon").innerHTML;     var res2 = uncommon.replace(/13|17|11/g, "20");    document.getElementById("uncommon").innerHTML = res2;    document.getElementById("uncommon2").innerHTML = res2;    var rare = document.getElementById("rare").innerHTML;     var res3 = rare.replace(/4|6|2/g, "10");    document.getElementById("rare").innerHTML = res3; }); /////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////// dil = new Array; function findDupImages(gf) { output = ""; url = "/api.php?action=query&generator=allimages&prop=duplicatefiles&gailimit=500&format=json"; if (gf) url += "&gaifrom=" + gf; $.getJSON(url,function (data) { if (data.query) { pages = data.query.pages; for (pageID in pages) { dils = ","+dil.join; if (dils.indexOf(","+pages[pageID].title) == -1 && pages[pageID].title.indexOf("File::") == -1 && pages[pageID].duplicatefiles) { output += " "+pages[pageID].title+" \n\n"; for (x=0;xFile:"+pages[pageID].duplicatefiles[x].name+"\n"; dil.push("File:"+pages[pageID].duplicatefiles[x].name.replace(/_/g," ")); } output += "\n\n"; } } $("#mw-dupimages").append(output); if (data["query-continue"]) setTimeout("findDupImages('"+data["query-continue"].allimages.gaifrom+"');",5000); } }); } $(function { if ($("#mw-dupimages").length) findDupImages; }); /////////////////////////////////////////////////////////////////////////////////