Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Note to self - create a UI for modification without a console, minify for execution from javascript: url
- function repeatMissions(mission, mins, quant) {
- var list = document.getElementById('missions_table').getElementsByTagName('img');
- for(var i in list) {
- if(list[i].className == 'item_image' && list[i].alt.replace(/_/g, ' ').toLowerCase() == mission.toLowerCase()) {
- var id = list[i].src.substring(list[i].src.lastIndexOf('?') + 1, list[i].src.length);
- break;
- }
- }
- if(!id) {throw new ReferenceError('Unable to extract id for given mission');}
- if(!quant || quant == 1) {document.getElementById('select_fleet_link_' + id).getElementsByTagName('a')[0].onclick();}
- else {document.getElementById('batch_selector_' + id).getElementsByTagName('a')[quant].onclick();}
- setTimeout('repeatMissions(' + id + ',' + mins + ((quant) ? ',' + quant : '') + ')', (mins * 60 * 1000) + Math.random(3000, 12500) - 5000);
- }
Advertisement
Add Comment
Please, Sign In to add comment