// coding: utf-8 // ==UserScript== // @name wunka // @version 1.0.0 // @author Lideon( http://userscripts.org/users/165018 ) // @homepage http://userscripts.org/scripts/show/85798 // @description Format inbox and sent messages // @namespace messages.ikariam // @include http://s*.ikariam.*/index.php* // @exclude http://support.ikariam.*/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js // //----------------------------- // CHANGELOG // // @history 1.3.1 bug fix: fix normal CR when copy/paste messages // // ==/UserScript== Ika = { citysafe1 : '10 660', citysafe2 : ' 8 740', citysafe3 : '17 860', citysafe4 : ' 8 260', citysafe5 : ' 8 260', server: '', // current server view : '', // current view position : '', // current building position cityLevel : 0, // currentu city level safe : 'citysafe', // selected language lang: '', // language /* function getVar(varname, vardefault) { var res = GM_getValue(server+"."+varname); if (res == undefined) { return vardefault; } return res; }, setVar(varname, varvalue) : function() { GM_setValue(server+"."+varname, varvalue); }, */ getAddweb : function () { this.addweb = window.location.href; this.webadd = this.addweb.substring(49, 0); this.cityid = this.addweb.replace(this.webadd, ''); if ( this.cityid == '46165') { this.cityname = '۞_Lidiar_۞' } else if ( this.cityid == '48144') { this.cityname = '۞_LidVin_۞' } else if ( this.cityid == '49418') { this.cityname = '۞_Lidior_۞' } else if ( this.cityid == '51783') { this.cityname = '۞_Lidioc_۞' } else if ( this.cityid == '56299') { this.cityname = '۞_Lidiur_۞' } else { this.cityname = 'Inconnu' } if ( this.cityid == '46165' ) { this.citysafe = this.citysafe1 } else if ( this.cityid == '48144' ) { this.citysafe = this.citysafe2 } else if ( this.cityid == '49418' ) { this.citysafe = this.citysafe3 } else if ( this.cityid == '51783' ) { this.citysafe = this.citysafe4 } else if ( this.cityid == '56299' ) { this.citysafe = this.citysafe5 } else { this.citysafe = 'Inconnu' } }, getServer : function () { this.server = window.location.host; var temp = this.server.split('.'); temp = temp[1]; }, getCityName : function () { var cityname = addweb.slice(0, -3); }, getView : function () { this.view = $('BODY').attr('id'); if (this.view == 'buildingGround') { var regExp = new RegExp("position\=([a-zA-Z0-9]+)", "ig"); var RegExpRes = regExp.exec(document.location.href); this.position = (RegExpRes == null) ? '' : RegExpRes[1]; } }, getInt : function (str) { return parseInt (str.replace(/,/g, '')); }, cfgRead : function (key, default_value) { return GM_getValue (this.server + key, default_value); }, cfgWrite : function (key, value) { GM_setValue (this.server + key, value); }, init : function() { this.getServer(); this.getAddweb(); this.getView(); } }; // execute Ika.init(); if (Ika.view != 'militaryAdvisorDetailedReportView'){ var s = '<div class="dynamic"><table width="100%" id="spyperso"><tr><td><h3 class="header"><img src="data:image/gif;base64,R0lGODlhJAAeAPf/ADpFWQwJCy8jHzY+TyMpQzM8UCIpNi84STA3RhIRFiszQykwPhIWIystNSIqQxkcKiMpQCMrOQIBAxcbLR0kOh8jMRgdLw8VIRUbLRcbKBUZKRMYJxshNSYuSztGXDQ+UEJNZBsgNTY/UiMrRR4nQxshNrJ2UBogNCEoQSs0VRkeMBIZKiQrRhcbJh4kOh4iLRwiLQUGCxcdMEFOgztDVhIXJUFPhDw2NmtHMZ6Nhh4jNCkyUjAzPicwPyIqRW5lZ7emoEAyLjpDVx0jODI9TyovO05KSyo0Rzg8SV07KXRaQDQ9UDsuLR4kMEk1LFY0JCYsPa10TS45YHNNOSkxThwkPB4lPB8nPkJQhTAhGjxKei03W3NmYD1IXSktOCkvOSs0WMWRYikyUTlFdCwgHIpPNTUyNkNPaCIqRCMqRCMqRURRfSEoQJSDfhYQDhUaJB0kOS44XTI7TTI8XzI2QikgIRgeMCIqQCEpQhEWJCEnNDlCVkJQhC85Xh4cJEhVcFQ8LxofMjojGjkoH0xJUoFUOCozRDhDcDhFc4l8eCUnL4J4djhBUT1HW7WnpCIXEDU/UzY/UDgmILaopUE2NEQ8PCQpO1tVVCUtOy4uO0FLYUVVjWBENGRAMTVAUkJNYys2SHJkXRsiNo5/e042Jyw1RR0lP188MB4mPatyTkFIVo5hRSEpRBogMxgdMD9DTxkfMikyQSgyQyQrQjk+TTtGWzE7Y10wIRkfNCouOTM8TTVAVDdBVDdCVSgxUUtblCoyUzpGdzYhGK+gnRohNSYsQxwiMUtWbh4jM2NeX2RdXWlINDZAZBohOT5EUz9LYhUaKiAoQCAoQT1FVhkiPCEpQUEmHEEpHxwlQR4SCxUZJ0wyIj5JXys1VxcfNSQfIDI8Ty02VDM9TiAnQCEmM6SVkRwiNzM5RjA1QTA6TSghJEIyL0JPgxkOChgeMRkeMZtmRJtmRSAoQjM+UCEpQxEXJyAlNREXKDhCVxMYKDM8Xi0vQi44XkVRfRweJAAAACH5BAEAAP8ALAAAAAAkAB4AQAj/AP8JHEiw4MA1/SAYXMjQIDIKEgII2LChxoQS9DI03EiwRQB/sl6Vc5SDEAk8IQLB4sjyX64e6cAt6bJHU6OWOP/NwaJFCjAxO7pRydnQmAxSnCiZ8TaCDQo8aXxoJFoQ3RkPpWAsKLCLiCEDFwCZoLpQSRhhAq2VeUKWpb5ffBDZ2hKnLUMoDCQ8EoDBBYEOHewWpMYE3pQVIcy5QHXFwTjBAu0l+IYJSZtRxUy1smDhHQPIArnh42EkmbJLN1yduLcC9D9FTRTIiVSLFwhQQZIMcv3vWidJRQaIe4aAd0Fmm2wEOzTL+MAZ7MbwS5ECzB3nfU6o28eKRQdf4YxDsIjhZludeiooREPzwrU0DVnIXMCgAZodUfIsgX7QbFWUZflQgEI1DozgHWh5+JHNG+eEkgk2VhDDAQclkANZBRK0YAgdiQDxAwlqwKGCOzpAlsA/DYBDyyKTDMNFBVVwMMEQoB3zhyd6IDCNKs40oA0uDzgB2gALRGBALAcAIAQkR1RSSCqueRHBAR/QAIAIIIjg3D9fMKLLBx7M80kvW8ZzSzv/CHLKOlsaZAIOOQUEADs=" height="20"></h3></td>'; s += '<td align="center"><h3 class="header"><a href="/index.php?view=safehouse&position=12&id=49516" class="changeCity">S1</a>'; s += ' • <a href="/index.php?view=safehouse&position=3&id=51229" class="changeCity">S2</a>';/*' + Ika.server + '.*/ s += ' • <a href="/index.php?view=safehouse&id=51972&position=8" class="changeCity">S3</a>'; s += ' • <a href="/index.php?view=safehouse&position=3&id=55341" class="changeCity">S4</a>'; s += ' • <a href="/index.php?view=safehouse&id=49516position=12&tab=reports" class="changeCity">Spy R</a>'; s += '</h3></td>'; s += '<td><h3 class="header"><img src="data:image/gif;base64,R0lGODlhJAAeAPf/ADpFWQwJCy8jHzY+TyMpQzM8UCIpNi84STA3RhIRFiszQykwPhIWIystNSIqQxkcKiMpQCMrOQIBAxcbLR0kOh8jMRgdLw8VIRUbLRcbKBUZKRMYJxshNSYuSztGXDQ+UEJNZBsgNTY/UiMrRR4nQxshNrJ2UBogNCEoQSs0VRkeMBIZKiQrRhcbJh4kOh4iLRwiLQUGCxcdMEFOgztDVhIXJUFPhDw2NmtHMZ6Nhh4jNCkyUjAzPicwPyIqRW5lZ7emoEAyLjpDVx0jODI9TyovO05KSyo0Rzg8SV07KXRaQDQ9UDsuLR4kMEk1LFY0JCYsPa10TS45YHNNOSkxThwkPB4lPB8nPkJQhTAhGjxKei03W3NmYD1IXSktOCkvOSs0WMWRYikyUTlFdCwgHIpPNTUyNkNPaCIqRCMqRCMqRURRfSEoQJSDfhYQDhUaJB0kOS44XTI7TTI8XzI2QikgIRgeMCIqQCEpQhEWJCEnNDlCVkJQhC85Xh4cJEhVcFQ8LxofMjojGjkoH0xJUoFUOCozRDhDcDhFc4l8eCUnL4J4djhBUT1HW7WnpCIXEDU/UzY/UDgmILaopUE2NEQ8PCQpO1tVVCUtOy4uO0FLYUVVjWBENGRAMTVAUkJNYys2SHJkXRsiNo5/e042Jyw1RR0lP188MB4mPatyTkFIVo5hRSEpRBogMxgdMD9DTxkfMikyQSgyQyQrQjk+TTtGWzE7Y10wIRkfNCouOTM8TTVAVDdBVDdCVSgxUUtblCoyUzpGdzYhGK+gnRohNSYsQxwiMUtWbh4jM2NeX2RdXWlINDZAZBohOT5EUz9LYhUaKiAoQCAoQT1FVhkiPCEpQUEmHEEpHxwlQR4SCxUZJ0wyIj5JXys1VxcfNSQfIDI8Ty02VDM9TiAnQCEmM6SVkRwiNzM5RjA1QTA6TSghJEIyL0JPgxkOChgeMRkeMZtmRJtmRSAoQjM+UCEpQxEXJyAlNREXKDhCVxMYKDM8Xi0vQi44XkVRfRweJAAAACH5BAEAAP8ALAAAAAAkAB4AQAj/AP8JHEiw4MA1/SAYXMjQIDIKEgII2LChxoQS9DI03EiwRQB/sl6Vc5SDEAk8IQLB4sjyX64e6cAt6bJHU6OWOP/NwaJFCjAxO7pRydnQmAxSnCiZ8TaCDQo8aXxoJFoQ3RkPpWAsKLCLiCEDFwCZoLpQSRhhAq2VeUKWpb5ffBDZ2hKnLUMoDCQ8EoDBBYEOHewWpMYE3pQVIcy5QHXFwTjBAu0l+IYJSZtRxUy1smDhHQPIArnh42EkmbJLN1yduLcC9D9FTRTIiVSLFwhQQZIMcv3vWidJRQaIe4aAd0Fmm2wEOzTL+MAZ7MbwS5ECzB3nfU6o28eKRQdf4YxDsIjhZludeiooREPzwrU0DVnIXMCgAZodUfIsgX7QbFWUZflQgEI1DozgHWh5+JHNG+eEkgk2VhDDAQclkANZBRK0YAgdiQDxAwlqwKGCOzpAlsA/DYBDyyKTDMNFBVVwMMEQoB3zhyd6IDCNKs40oA0uDzgB2gALRGBALAcAIAQkR1RSSCqueRHBAR/QAIAIIIjg3D9fMKLLBx7M80kvW8ZzSzv/CHLKOlsaZAIOOQUEADs=" height="20"></h3></td> </tr></table>'; s += '</div>'; s += ' <div class="footer"></div></div>'; if (Ika.view == 'warehouse') { $(s).insertBefore('#tradeAdvisor'); } else if (Ika.view == 'city') { $(s).insertBefore('#information'); } else if (Ika.view == 'merchantNavy') { $(s).insertBefore('#backTo'); } else if (Ika.view == 'researchAdvisor') { $(s).insertBefore('#viewResearchImperium'); } else if (Ika.view == 'workshop') { $(s).insertBefore('#buildingUpgrade'); } else if (Ika.view == 'deployment') { $(s).insertBefore('#backTo'); } else if (Ika.view == 'island') { $(s).insertBefore('#infocontainer'); } else if (Ika.view == 'worldmap_iso') { $(s).insertBefore('#navigation'); } else if (Ika.view == 'buildingGround') { $(s).insertBefore('#buildingUpgrade'); } else if (Ika.view == 'safehouse') { $(s).insertBefore('#buildingUpgrade'); } else { $(s).insertBefore('#mainview'); } } if (Ika.view == 'city' || Ika.view == 'warehouse'){ var s = '<div class="dynamic"><h3 class="header">Entrepot Securitaire</h3><div class="content">'; s += '<p align="center">' + Ika.cityname + ' = ' + Ika.citysafe +'.'; s += '</p></div><div class="footer"></div></div>'; if (Ika.view == 'city') { $(s).insertBefore('#information'); } else if (Ika.view == 'warehouse') { $(s).insertBefore('#tradeAdvisor'); } else { $(s).insertBefore('#mainview'); } } // end of script
Mozilla add on,User script,Grease Monkey Script, greasemonkey userscripts, updater userscripts mafia wars userscripts mafia wars autoplayer userscripts mafia wars wall userscripts scripts userscripts travian greasemonkey greasemonkey download greasemonkey facebook greasemonkey tutorial greasemonkey youtube greasemonkey travian greasemonkey chrome greasemonkey mafia wars greasemonkey mafia wars autoplayer
Thursday, September 22, 2011
wunka
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment