// ==UserScript== // @name hwm_adv_fast_map // @namespace Demin (remastered by Prince_of Dark) // @description HWM mod - Rasshirennoe vypadajushhee menju (by Demin) // @homepage http://userscripts.org/scripts/show/172172 // @version 1.2.2 // @include http://*heroeswm.ru/* // @include http://178.248.235.15/* // @include http://209.200.152.144/* // @include http://*lordswm.com/* // @exclude */rightcol.php* // @exclude */ch_box.php* // @exclude */chat* // @exclude */ticker.html* // @exclude */frames* // @exclude */brd.php* // @downloadURL https://update.greasyfork.icu/scripts/38603/hwm_adv_fast_map.user.js // @updateURL https://update.greasyfork.icu/scripts/38603/hwm_adv_fast_map.meta.js // ==/UserScript== // (c) 2013, demin ( http://www.heroeswm.ru/pl_info.php?id=15091 ) // (c) 2008, LazyGreg (function() { var version = '1.2'; if (!this.GM_getValue || (this.GM_getValue.toString && this.GM_getValue.toString().indexOf("not supported")>-1)) { this.GM_getValue=function (key,def) { return localStorage[key] || def; }; this.GM_setValue=function (key,value) { return localStorage[key]=value; }; this.GM_deleteValue=function (key) { return delete localStorage[key]; }; } var script_num = 172172; var script_name = "HWM mod - Rasshirennoe vypadajushhee menju (by Demin)"; update_n(version,script_num,script_name); var pers_id = document.querySelector("li * a[href^='pl_hunter_stat.php?id=']"); if ( pers_id ) { pers_id = /id=(\d+)/.exec( pers_id )[1]; // ============== PERSONAL LINKS (replaces Chat menu) ================ var replace_chat = false; //replace_chat = true; // uncomment this line to have chat replaced var map_change = document.querySelector("li * a[href='map.php']") //if ( map_change ) { setTimeout(function() { map_change.href = 'map.php?st=sh'; }, 500) } // uncomment this line to have map link replaced var my_links = []; // REPLACE CHAT MENU // Insert ANY number of your links below // better to write them in english or in "translit" // russian letters must be converted to unicode codes. Here's an utility: // http://static.bobrdobr.ru/store/spuntik/cache/1785ad2ca55f214df4bb297318b250bd.html my_links.push('Link_1'); my_links.push('Link_2'); my_links.push('Link_3'); // etc. // =================================================================== var Empire_cap = 'Empire Capital'; var river = 'East River'; var lake = 'Tiger`s Lake'; var wood = 'Rogue`s Wood'; var dale = 'Wolf`s Dale'; var camp = 'Peasful Camp'; var lowlands = 'Lizard`s Lowland'; var green = 'Green Wood'; var nest = 'Eagle`s Nest'; var portal = 'Portal`s Ruins'; var caves = 'Dragon`s Caves'; var spring = 'Shining Spring'; var city = 'Sunny City'; var mines = 'Magma Mines'; var mountain = 'Bear Mountain'; var trees = 'Fairy Trees'; var port = 'Port City'; var coast = 'Mythril Coast'; var wall = 'Great Wall'; var valley = 'Titan`s Valley'; var village = 'Fishing Village'; var castle = 'Kingdom Castle'; var steppe = 'Ungovernable Steppe'; var arbor = 'Sublime Arbor'; var garden = 'Crystal Garden'; var wilderness = 'The Wilderness'; var island = 'East Island'; // =================== USER VARIABLES ================================ var map_last = []; map_last.push('
'); map_last.push('' + Empire_cap + ''); map_last.push('' + river + ''); map_last.push('' + lake + ''); map_last.push('' + wood + ''); map_last.push('' + dale + ''); map_last.push('' + camp + ''); map_last.push('' + lowlands + ''); map_last.push('' + green + ''); map_last.push('' + nest + ''); map_last.push('' + portal + ''); map_last.push('' + caves + ''); map_last.push('' + spring + ''); map_last.push('' + city + ''); map_last.push('' + mines + ''); map_last.push('' + mountain + ''); map_last.push('' + trees + ''); map_last.push('' + port + ''); map_last.push('' + coast + ''); map_last.push('' + wall + ''); map_last.push('' + valley + ''); map_last.push('' + village + ''); map_last.push('' + castle + ''); map_last.push('' + steppe + ''); map_last.push('' + garden + ''); map_last.push('' + wilderness + ''); map_last.push('' + arbor + ''); map_last.push('' + island + ''); //map_last.push('\u0414\u043E\u043C'); // =================================================================== var all_li_subnav, elm, par, next_elm, timer; // pers - market all_li_subnav = document.querySelector("li * a[href='auction.php']"); if ( all_li_subnav ) { addEvent( all_li_subnav, "mouseover", function() { if ( timer != false ) timer = setTimeout(function() { timer = false; all_li_subnav = document.querySelector("li * a[href='auction.php']"); par = all_li_subnav.parentNode; next_elm = all_li_subnav.nextSibling; for ( var i=0; i0 ) { all_li_subnav = document.querySelector("li * a[href='frames.php']"); if ( all_li_subnav ) { all_li_subnav.parentNode.innerHTML = ' Links '; all_li_subnav = document.querySelectorAll("li * a[href^='frames.php']"); for ( var i=1; i3){return}var f=new Date().getTime();var g=$('update_demin_script');if(g){if((d+86400000f)){g=g.innerHTML;if(/100000=1.1/.exec(g)){var h=new RegExp(b+'=(\\d+\\.\\d+)').exec(g);if(a&&h){if(Number(h[1])>Number(a))setTimeout(function(){if(confirm('\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u043A\u0440\u0438\u043F\u0442\u0430: "'+c+'".\n\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u0443\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0441\u0435\u0439\u0447\u0430\u0441?\n\nThere is an update available for the script: "'+c+'".\nWould you like install the script now?')){window.open('http://userscripts.org/scripts/show/'+b,'_blank');window.location='http://userscripts.org/scripts/source/'+b+'.user.js'}},500)}GM_setValue('last_update_script',''+f)}else{setTimeout(function(){update_n(a,b,c,d,e)},1000)}}}else{var i=document.querySelector('body');if(i){var j=GM_getValue('array_update_script');if(e==1&&((d+86400000f)||!j)){if(j){GM_deleteValue('array_update_script')}setTimeout(function(){update_n(a,b,c,d,e)},1000);return}var k=document.createElement('div');k.id='update_demin_script';k.setAttribute('style','position: absolute; width: 0px; height: 0px; top: 0px; left: 0px; display: none;');k.innerHTML='';i.appendChild(k);if((d+86400000f)||!j){var l=new XMLHttpRequest();l.open('GET','photo_pl_photos.php?aid=1777'+'&rand='+(Math.random()*100),true);l.onreadystatechange=function(){update(l,a,b,c,d,e)};l.send(null)}else{$('update_demin_script').innerHTML=j;setTimeout(function(){update_n(a,b,c,d,e)},10)}}}}function update(a,b,c,d,e,f){if(a.readyState==4&&a.status==200){a=a.responseText;var g=/(\d+=\d+\.\d+)/g;var h='';var i;while((i=g.exec(a))!=null){if(h.indexOf(i[1])==-1){h+=i[1]+' '}};GM_setValue('array_update_script',''+h);var j=$('update_demin_script');if(j){j.innerHTML=h;setTimeout(function(){update_n(b,c,d,e,f)},10)}}} })();