User:FINNER/common.js

/* FINNER/Test9 START */ if ($('#w_slider_div').length) { //var w_name = name.innerHTML; var i = 0; var w_energy_v = parseInt(energy.innerHTML, 10); var w_health_v = parseInt(health.innerHTML, 10); var w_shields_v = parseInt(shields.innerHTML, 10);

var w_armor_v = parseInt(armor.innerHTML, 10); var base_rank_v = 0; var w_slider_width = 93; if (navigator.userAgent.indexOf("Firefox") != -1){ w_slider_div.innerHTML = " " + base_rank_v + " 30 "; } else if ((navigator.userAgent.indexOf("MSIE") != -1) || (!!document.documentMode === true )){ w_slider_div.innerHTML = " " + base_rank_v + " 30 "; } else { w_slider_div.innerHTML = " " + base_rank_v + " 30 "; }   out_rank.innerHTML = ""; w_reset_btn.innerHTML = "Reset "; w_update_scaling; }

function w_update_scaling { if((curr_rank = w_ehp_input.value) >= base_rank_v) { switch(curr_rank) { case 0: i = 0; break; case 1: case 2: case 3: i = 1; break; case 4: case 5: case 6: i = 2; break; case 7: case 8: case 9: i = 3; break; case 10: case 11: case 12: i = 4; break; case 13: case 14: case 15: i = 5; break; case 16: case 17: case 18: i = 6; break; case 19: case 20: case 21: i = 7; break; case 22: case 23: case 24: i = 8; break; case 25: case 26: case 27: i = 9; break; case 28: case 29: case 30: i = 10; break; default: }       energy.innerHTML = (w_energy_v * (1 + 0.05 * i)).toLocaleString; health.innerHTML = (w_health_v * (1 + 0.2 * i)).toLocaleString; shields.innerHTML = (w_shields_v * (1 + 0.2 * i)).toLocaleString; armor.innerHTML = (w_armor_v).toLocaleString; w_damage_redux = (Math.round((1 - 300 / (w_armor_v + 300)) * 10000) / 10000) * 100; damage_redux.innerHTML = (w_damage_redux).toLocaleString; out_ehp.innerHTML = (Math.round((w_health_v * (1 + 0.2 * i) / (1 - w_damage_redux / 100) + w_shields_v * (1 + 0.2 * i)) * 100) / 100).toLocaleString; } }   /* FINNER/Test9 END */ ///////////////////////////////////////////////////////////////////////////////// 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; });