// ==UserScript== // @name pennergame bottle bot 2022 // @namespace http://tampermonkey.net/ // @version 11.2022.7 // @description bottle search menu // @author NullPointer // @license MIT // @match https://*.pennergame.de/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant GM_setValue // @grant GM_getValue // @grant GM_xmlhttpRequest // @grant GM.xmlHttpRequest // @grant GM_addStyle // @downloadURL https://update.greasyfork.icu/scripts/455682/pennergame%20bottle%20bot%202022.user.js // @updateURL https://update.greasyfork.icu/scripts/455682/pennergame%20bottle%20bot%202022.meta.js // ==/UserScript== (function() { 'use strict'; if (document.getElementById("my-profile-new") == null) { return; } var link = ""; var url = document.location.href; if (url.indexOf("http://www.pennergame") >= 0) {link = "http://www.pennergame.de"} if (url.indexOf("http://pennergame") >= 0) {link = "http://pennergame.de"} if (url.indexOf("berlin.pennergame.de") >= 0) {link = "http://berlin.pennergame.de"} if (url.indexOf("www.berlin.pennergame.de") >= 0) {link = "http://www.berlin.pennergame.de"} if (url.indexOf("muenchen.pennergame.de") >= 0) {link = "http://muenchen.pennergame.de"} if (url.indexOf("www.muenchen.pennergame.de")>= 0) {link = "http://www.muenchen.pennergame.de"} if (url.indexOf("koeln.pennergame.de") >= 0) {link = "http://koeln.pennergame.de"} if (url.indexOf("www.koeln.pennergame.de") >= 0) {link = "http://www.koeln.pennergame.de"} if (url.indexOf("reloaded.pennergame.de") >= 0) {link = "http://reloaded.pennergame.de"} if (url.indexOf("www.reloaded.pennergame.de") >= 0) {link = "http://www.reloaded.pennergame.de"} if (url.indexOf("sylt.pennergame.de") >= 0) {link = "http://sylt.pennergame.de"} if (url.indexOf("www.sylt.pennergame.de") >= 0) {link = "http://www.sylt.pennergame.de"} if (url.indexOf("malle.pennergame.de") >= 0) {link = "http://malle.pennergame.de"} if (url.indexOf("http://halloweeen.pennergame.de") >= 0) {link = "http://halloweeen.pennergame.de"} if (url.indexOf("vatikan.pennergame.de") >= 0) {link = "http://vatikan.pennergame.de"} GM_addStyle("input[type=button].formbutton {margin: 4px 8px; padding: 8px; border: 1px solid #0a0; border-radius: 5px; cursor: pointer;} input[type=button].formbutton:hover {border: 1px solid #0c0; color: #fff;}"); GM_addStyle("input[type=button].formbutton:disabled {color: #888; cursor: default;} input[type=button].formbutton:disabled:hover {border: 1px solid #0a0;}"); GM_addStyle("div.bottlemenu {position: absolute; z-index: 100; display: block; min-width: 240px; font-size: 10pt; padding: 10px; background-color: rgb(100, 100, 100, 0.75); border: 1px solid #555; border-radius: 10px;}"); function _t(t) { var ul = "en"; try { ul = navigator.language || navigator.userLanguage; ul = ul.split("-")[0]; } catch(E) {} return _tr[ul][t]; } const _tr = { "en": { "startBot": "Start BOT", "stopBot" : "Stop BOT", "loading" : "Loading...", "stopped" : "Stopped!", "searching" : "Searching... reload at ", "emptying" : "Emptying shopping cart...", "starting" : "Starting search...", "fighting" : "Fighting ", "bottles" : "Bottles ", "sell" : "Sell ", "pet" : "Pet straying until ", }, "es": { "startBot" : "Start BOT", "stopBot" : "Stop BOT", "loading" : "Cargando...", "stopped" : "Parado!", "searching" : "Buscando... recarga a las ", "emptying" : "Vaciando carrito de compra...", "starting" : "Empezando búsqueda...", "fighting" : "Peleando ", "bottles" : "Botellas ", "sell" : "Venta ", "pet" : "Mascota vagando hasta ", }, "de": { "startBot" : "Start BOT", "stopBot" : "Stop BOT", "loading" : "Laden...", "stopped" : "Gestoppt!", "searching" : "Suchen... laden bei ", "emptying" : "Einkaufswagen leeren...", "starting" : "Suche starten...", "fighting" : "Angriff ", "bottles" : "Flaschen ", "sell" : "Verkaufen ", "pet" : "Haustier streunen bis ", }, }; var menu = document.createElement("div"); menu.setAttribute("class", "bottlemenu"); menu.setAttribute("style", "top: " + (document.getElementById("header").offsetHeight * 1 - 5) + "px; left: " + (document.getElementById("my-profile-new").getBoundingClientRect().left * 1 - 260) + "px;"); menu.setAttribute("align", "left"); menu.innerHTML += '
' + _t("bottles") + ' | ' + GM_getValue("bottles", 0) + ' |
' + _t("sell") + ' | ' + GM_getValue("price", 0) + '€ |