// ==UserScript== // @name OGame Redesign: Keyboard Shortcuts // @description Assigns keyboard shortcuts to various game functions // @namespace Vesselin // @version 1.33 // @date 2012-03-04 // @author Vesselin Bontchev // @include http://*.ogame.*/game/index.php?page=* // @exclude http://*.ogame.*/game/index.php?page=notices* // @exclude http://*.ogame.*/game/index.php?page=combatreport* // ==/UserScript== (function () { var theHref = document.location.href; // The following "if" is not really necessary but with it this script will work for Opera too if ((theHref.indexOf ("/game/index.php?page=") < 0) || (theHref.indexOf ("/game/index.php?page=notices") > -1) || (theHref.indexOf ("/game/index.php?page=combatreport") > -1)) return; var unsafe = window; try { unsafe = unsafeWindow; } catch (e) { } var $ = unsafe.$; if (! $) return; function badTarget (e) { var targ; if (! e) var e = window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType == 3) // defeat Safari bug targ = targ.parentNode; if ((targ.nodeName == "INPUT") || (targ.nodeName == "TEXTAREA")) return true; return false; } var oldVersion = false; var oVersion = document.getElementsByName ("ogame-version"); if (oVersion && (oVersion.length > 0)) { var versionParts = oVersion [0].content.split ("."); if (parseInt (versionParts [0]) < 2) oldVersion = true; else if ((parseInt (versionParts [0]) == 2) && (parseInt (versionParts [1]) < 3)) oldVersion = true; } else oldVersion = true; if (oldVersion) { rewind = "rewind.gif"; fastforward = "fastforward.gif"; skip = "skip.gif"; skipback = "skip-back.gif"; } else { rewind = "3488b556496631d9eec3ce15b768f9.gif"; fastforward = "dcebd689a4e760f779a1a1b1ab0584.gif"; skip = "a6c5c6838009102254ec50807be663.gif"; skipback = "c1246af2584e9696edd7111a0d9418.gif"; } if (theHref.indexOf ("/game/index.php?page=showmessage") >= 0) { $ (document).ready (function () { setTimeout (function () { $ ("#2,#4").focus (); $ ("#2,#4").blur (); $ (document).keydown (function (e) { if (badTarget (e)) return; switch (e.keyCode) { case 27: // Esc $ (".closeTB").click (); return false; break; case 37: // <- if ($ ("#contentPageNavi").find ("img").eq (1).attr ("src").indexOf (rewind) > -1) window.location = $ ("#contentPageNavi").find ("a:nth-child(2)").attr ("href"); return false; break; case 39: // -> if ($ ("#contentPageNavi").find ("img").eq (2).attr ("src").indexOf (fastforward) > -1) window.location = $ ("#contentPageNavi").find ("a:nth-child(5)").attr ("href"); return false; break; case 46: // Del if ($ ("#2").length > 0) $ ("#2").click (); else $ ("#4").click (); return false; break; } }); }, 200); }); return; } else if (theHref.indexOf ("page=jumpgatelayer") > -1) { $ (document).ready (function () { setTimeout (function () { $ ("div#jumpgate a").eq (0).focus (); $ ("div#jumpgate a").eq (0).blur (); $ (document).keydown (function (e) { switch (e.keyCode) { case 65: // "a" if (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) break; $ ("#sendall").click (); return false; break; case 78: // "n" if (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) break; $ ("span.send_none a").click (); return false; break; case 27: // Esc $ ("a.close_details").click (); return false; break; } }); }, 200); }); return; } else if (theHref.indexOf ("page=phalanx") >= 0) { $ (document).ready (function () { setTimeout (function () { $ ("div#phalanxWrap a,close_details").eq (0).focus (); $ ("div#phalanxWrap a,close_details").eq (0).blur (); $ (document).keydown (function (e) { switch (e.keyCode) { case 27: // Esc $ ("a.close_details").click (); return false; break; } }); }, 200); }); return; } $ (document).keydown (function (e) { if (($ ("div").is ("#anti_options_window")) || (($ ("div").is ("#TB_window") || $ ("body").is ("#writemessage") || $ ("body").is ("#search") || $ ("body").is ("#showmessage") || ($ ("#anti_win").css ("display") == "block") || (theHref.indexOf ("/game/index.php?page=alliance") >= 0) || (theHref.indexOf ("/game/index.php?page=networkkommunikation") >= 0) || (theHref.indexOf ("/game/index.php?page=preferences") >= 0)) && badTarget (e))) return; var myEvent = document.createEvent ("MouseEvents"); myEvent.initMouseEvent ("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); switch (e.keyCode) { case 27: // Esc if (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) break; if (theHref.indexOf ("/game/index.php?page=fleet1") >= 0) { $ ("a.close_details").click (); return false; } break; case 38: // UpArrow case 40: // DownArrow if (e.ctrlKey) { if (unsafe.resourceTickerMetal ["production"] > 0) { var planetLinks = $ (".planetlink"); var numPlanets = planetLinks.length; if (numPlanets < 2) break; var activePlanet = planetLinks.index ($ (".active")); if (activePlanet >= 0) { window.location = planetLinks [((e.keyCode == 38) ? (activePlanet + numPlanets - 1) : (activePlanet + 1)) % numPlanets].href; return false; } } else { var moonLinks = $ (".moonlink"); var numMoons = moonLinks.length; if (numMoons < 2) break; var activeMoon = -1; for (var i = 0; i < numMoons; i++) if (moonLinks [i].previousElementSibling.className.indexOf ("active") >= 0) { activeMoon = i; break; } if (activeMoon >= 0) { window.location = moonLinks [((e.keyCode == 38) ? (activeMoon + numMoons - 1) : (activeMoon + 1)) % numMoons].href; return false; } } } else if (e.shiftKey) { var leftMenu = $ ("#menuTable li a.menubutton"); var numButtons = leftMenu.length; var activeButton = leftMenu.index ($ (".selected")); if (activeButton >= 0) { window.location = leftMenu [((e.keyCode == 38) ? (activeButton + numButtons - 1) : (activeButton + 1)) % numButtons].href; return false; } } break; case 37: // "<-" case 39: // "->" if (e.altKey || (badTarget (e) && (theHref.indexOf ("page=fleet3") >= 0))) break; if (e.shiftKey) { var planetLinks = $ (".planetlink,.moonlink"); var numPlanets = planetLinks.length; if (numPlanets < 2) break; var activePlanet = planetLinks.index ($ (".active")); if (unsafe.resourceTickerMetal ["production"] <= 0) activePlanet++; if (activePlanet >= 0) { window.location = planetLinks [((e.keyCode == 37) ? (activePlanet + numPlanets - 1) : (activePlanet + 1)) % numPlanets].href; return false; } } else if (e.ctrlKey) { if (unsafe.resourceTickerMetal ["production"] > 0) { if ($ (".active").next ().hasClass ("moonlink")) window.location = $ (".active").next ().attr ("href"); } else window.location = $ (".active").attr ("href"); return false; } else { if (theHref.indexOf ("/game/index.php?page=statistics") >= 0) { var myDiv = $ ("div#paging").eq (0); var myA = myDiv.find ("a"); if (myA.length == 2) myA.eq ((e.keyCode == 37) ? 0 : 1).click (); else { if (myDiv.get (0).children [0].tagName.toLowerCase () == "span") { if (e.keyCode == 39) myA.click (); } else { if (e.keyCode == 37) myA.click (); } } } else if (theHref.indexOf ("/game/index.php?page=highscore") >= 0) { if (e.keyCode == 37) $ ("span.activePager").prev ().click (); else $ ("span.activePager").next ().click (); } } break; case 66: // "b" if (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) break; $ ("div#bar a[href*='page=buddies']").click (); return false; break; case 72: // "h" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton8").dispatchEvent (myEvent); return false; } } else $ ("a[href*='page=search']").click (); return false; break; case 75: // "k" if (e.ctrlKey || e.altKey || e.metaKey) break; if (theHref.indexOf ("/game/index.php?page=fleet3") >= 0) { if (e.shiftKey) { if ($ ("#crystal").val () == 0) $ ("a.max").eq (1).click (); else $ ("a.min").eq (1).click (); return false; } else { var targ; if (! e) var e = window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType == 3) // defeat Safari bug targ = targ.parentNode; if (targ.nodeName == "INPUT") { targ.value = 10000 * Math.floor (targ.value / 10000); return false; } return true; } } else if (! e.shiftKey) { if ($ ("a[href*='page=statistics']").length > 0) window.location = $ ("a[href*='page=statistics']").attr ("href"); else window.location = $ ("a[href*='page=highscore']").attr ("href"); return false; } break; case 77: // "m" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { document.getElementById ("mbutton").dispatchEvent (myEvent); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("#metal").val () == 0) $ ("a.max").eq (0).click (); else $ ("a.min").eq (0).click (); return false; } } else { if ($ ("#message_alert_box_default").length > 0) window.location = $ ("#message_alert_box_default").attr ("href"); else window.location = $ ("#message_alert_box").attr ("href"); return false; } break; case 84: // "t" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton3").dispatchEvent (myEvent); return false; } } else $ ("#bar").find ("li").children ("a[onclick*='page=notices']").click (); return false; break; case 79: // "o" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) $ ("#eventboxFilled").click (); else window.location = $ ("a[href*='page=overview'].menubutton").attr ("href"); return false; break; case 82: // "r" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) window.location = $ ("a[href*='page=resourceSettings']").attr ("href"); else window.location = $ ("a[href*='page=resources'].menubutton").attr ("href"); return false; break; case 67: // "c" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if ($ ("a[href*='openJumpgate=1']").length > 0) window.location = $ ("a[href*='openJumpgate=1']").attr ("href"); } else { if ($ ("a[href*='openJumpgate=1']").length > 0) window.location = $ ("a[href*='page=station']").eq (1).attr ("href"); else window.location = $ ("a[href*='page=station']").eq (0).attr ("href"); } return false; break; case 69: // "e" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") >= 0) { var myEvent; var elem = document.getElementById ("position"); elem.value = 16; if (elem.fireEvent) // IE 5.5(WIN) { elem.fireEvent ("onChange"); elem.fireEvent ("onClick"); } else // Mozilla, Safari... { myEvent = document.createEvent ("HTMLEvents"); myEvent.initEvent ("change", true, true); elem.dispatchEvent (myEvent); myEvent = document.createEvent ("MouseEvents"); myEvent.initMouseEvent ("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); document.getElementById ("pbutton").dispatchEvent (myEvent); } return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton15").dispatchEvent (myEvent); return false; } } else { window.location = $ ("a[href*='page=research'].menubutton").attr ("href"); return false; } break; case 83: // "s" if (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton2").dispatchEvent (myEvent); return false; } } else window.location = $ ("a[href*='page=shipyard'].menubutton").attr ("href"); return false; break; case 68: // "d" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") >= 0) { var myEvent = document.createEvent ("MouseEvents"); myEvent.initMouseEvent ("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); document.getElementById ("dbutton").dispatchEvent (myEvent); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") >= 0) { if ($ ("#deuterium").val () == 0) $ ("a.max").eq (2).click (); else $ ("a.min").eq (2).click (); return false; } } else { window.location = $ ("a[href*='page=defense'].menubutton").attr ("href"); return false; } break; case 70: // "f" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) window.location = $ ("a[href*='page=movement']").attr ("href"); else window.location = $ ("a[href*='page=fleet1'].menubutton").attr ("href"); return false; break; case 71: // "g" if (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) break; window.location = $ ("a[href*='page=galaxy'].menubutton").attr ("href"); return false; break; case 76: // "l" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) window.location = $ ("a[href*='page=alliance&tab=broadcast']").attr ("href"); else window.location = $ ("a[href*='page=alliance'].menubutton").attr ("href"); return false; break; case 65: // "a" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton1").dispatchEvent (myEvent); return false; } } else { if ((theHref.indexOf ("/game/index.php?page=fleet1") > -1) || (document.getElementById ("fleet1") != null)) { $ ("#sendall").click (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { $ ("#allresources").click (); return false; } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { if ($ ("#checkAll").length > 0) $ (".checker").attr ("checked", true); return false; } } break; case 78: // "n" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton5").dispatchEvent (myEvent); return false; } } else { if (theHref.indexOf ("/game/index.php?page=fleet1") > -1) { $ ("span.send_none > a").click (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { $ ("a.min").click (); return false; } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { if ($ ("#checkAll").length > 0) $ (".checker").attr ("checked", false); return false; } else if (theHref.indexOf ("/game/index.php?page=movement") > -1) { $ (".reload").children ("a").click (); return false; } } break; case 86: // "v" if (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) break; if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { $ ("a.min").click (); $ ("a.max").eq (2).click (); $ ("a.max").eq (1).click (); $ ("a.max").eq (0).click (); return false; } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { $ ("td .checker").each (function () { $ (this).attr ("checked", ! $ (this).attr ("checked")); }); return false; } break; case 80: // "p" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { var myEvent = document.createEvent ("MouseEvents"); myEvent.initMouseEvent ("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); document.getElementById ("pbutton").dispatchEvent (myEvent); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton4").dispatchEvent (myEvent); return false; } } else { if (theHref.indexOf ("/game/index.php?page=movement") > -1) { $ (".closeAll").children ("a").click (); return false; } } break; case 90: // "z" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton7").dispatchEvent (myEvent); return false; } } break; case 73: // "i" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton6").dispatchEvent (myEvent); return false; } } break; case 89: // "y" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { document.getElementById ("missionButton9").dispatchEvent (myEvent); return false; } } break; case 49: // "1" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("1"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("1"); $ ("#expeditiontimeline select").change (); return false; } else if ($ ("input[name=mission]").val () == "5") { $ ("#holdtimeline select").val ("1"); $ ("#holdtimeline select").change (); return false; } } } break; case 50: // "2" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("2"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("2"); $ ("#expeditiontimeline select").change (); return false; } else if ($ ("input[name=mission]").val () == "5") { $ ("#holdtimeline select").val ("2"); $ ("#holdtimeline select").change (); return false; } } } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { $ ("tr.entry").each (function () { if ($ (this).find ("td.subject a").attr ("href").indexOf ("cat=2") >= 0) { $ (this).find (".checker").attr ("checked", true); } }); return false; } break; case 51: // "3" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("3"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("3"); $ ("#expeditiontimeline select").change (); return false; } else if ($ ("input[name=mission]").val () == "5") { $ ("#holdtimeline select").val ("4"); $ ("#holdtimeline select").change (); return false; } } } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { $ ("tr.entry").each (function () { if ($ (this).find ("td.subject a").attr ("href").indexOf ("cat=4") >= 0) { if ($ (this).find ("span").length) $ (this).find (".checker").attr ("checked", true); } }); return false; } break; case 52: // "4" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("4"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("4"); $ ("#expeditiontimeline select").change (); return false; } else if ($ ("input[name=mission]").val () == "5") { $ ("#holdtimeline select").val ("8"); $ ("#holdtimeline select").change (); return false; } } } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { $ ("tr.entry").each (function () { if ($ (this).find ("td.subject a").attr ("href").indexOf ("cat=4") >= 0) { if ($ (this).find ("span").length == 0) $ (this).find (".checker").attr ("checked", true); } }); return false; } break; case 53: // "5" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("5"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("5"); $ ("#expeditiontimeline select").change (); return false; } else if ($ ("input[name=mission]").val () == "5") { $ ("#holdtimeline select").val ("16"); $ ("#holdtimeline select").change (); return false; } } } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { $ ("tr.entry").each (function () { if ($ (this).find ("td.subject a").attr ("href").indexOf ("cat=5") >= 0) { $ (this).find (".checker").attr ("checked", true); } }); return false; } break; case 54: // "6" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("6"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("6"); $ ("#expeditiontimeline select").change (); return false; } else if ($ ("input[name=mission]").val () == "5") { $ ("#holdtimeline select").val ("32"); $ ("#holdtimeline select").change (); return false; } } } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { $ ("tr.entry").each (function () { if ($ (this).find ("td.subject a").attr ("href").indexOf ("cat=6") >= 0) { $ (this).find (".checker").attr ("checked", true); } }); return false; } break; case 55: // "7" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("7"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("7"); $ ("#expeditiontimeline select").change (); return false; } } } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { $ ("tr.entry").each (function () { var href = $ (this).find ("td.subject a").attr ("href"); if ((href.indexOf ("cat=7") >= 0) || (href.indexOf ("javascript") >= 0)) $ (this).find (".checker").attr ("checked", true); }); return false; } break; case 56: // "8" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("8"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("8"); $ ("#expeditiontimeline select").change (); return false; } } } else if (theHref.indexOf ("/game/index.php?page=messages") > -1) { $ ("tr.entry").each (function () { if ($ (this).find ("td.subject a").attr ("href").indexOf ("cat=8") >= 0) { $ (this).find (".checker").attr ("checked", true); } }); return false; } break; case 57: // "9" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("9"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("9"); $ ("#expeditiontimeline select").change (); return false; } } } break; case 48: // "0" if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey) { if (theHref.indexOf ("/game/index.php?page=fleet2") > -1) { $ ("#speed").val ("10"); $ ("#speed").change (); return false; } else if (theHref.indexOf ("/game/index.php?page=fleet3") > -1) { if ($ ("input[name=mission]").val () == "15") { $ ("#expeditiontimeline select").val ("10"); $ ("#expeditiontimeline select").change (); return false; } else if ($ ("input[name=mission]").val () == "5") { $ ("#holdtimeline select").val ("0"); $ ("#holdtimeline select").change (); return false; } } } break; case 8: // Backspace if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey && ((theHref.indexOf ("/game/index.php?page=fleet2") > -1) || (theHref.indexOf ("/game/index.php?page=fleet3") > -1))) { $ ("#back").click (); return false; } break; case 46: // Del if (e.shiftKey || e.ctrlKey || e.altKey || e.metaKey) break; if (theHref.indexOf ("/game/index.php?page=messages") > -1) { unsafe.mod = ($ ("div#tabs ul#tab-msg li#3").hasClass ("aktiv")) ? 8 : 7; $ (".buttonOK").click (); return false; } break; case 33: // PgUp if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey && (theHref.indexOf ("/game/index.php?page=messages") > -1)) { $ ("img[src*='" + rewind + "']").parent ().click (); return false; } break; case 34: // PgDown if (e.ctrlKey || e.altKey || e.metaKey) break; if (e.shiftKey && (theHref.indexOf ("/game/index.php?page=messages") > -1)) { $ ("img[src*='" + fastforward + "']").parent ().click (); return false; } break; case 35: // End if (e.altKey) break; if (e.shiftKey) { var planetLinks = $ (".planetlink,.moonlink"); window.location = planetLinks [planetLinks.length - 1].href; return false; } if (e.ctrlKey && (theHref.indexOf ("/game/index.php?page=messages") > -1)) { $ ("img[src*='" + skip + "']").parent ().click (); return false; } break; case 36: // Home if (e.altKey) break; if (e.shiftKey) { window.location = $ (".planetlink,.moonlink").eq (0).attr ("href"); return false; } if (e.ctrlKey && (theHref.indexOf ("/game/index.php?page=messages") > -1)) { $ ("img[src*='" + skipback + "']").parent ().click (); return false; } break; } return true; }); } ) ();
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
Sunday, March 4, 2012
OGame Redesign: Keyboard Shortcuts
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment