Guten Abend, guten Morgen, gute Nacht, guten Tag, grüß Gott, grüezi, Salut, salve!
Mein letztes Script für heute
Folgende Funktion: Am Anfang oder wenn ihr die Platzierung aktualisieren wollt, ruf den Link hier auf. Sollte sich dann automatisch aktualisieren.
Code
// ==UserScript==
// @name Toplist-Platzierung
// @namespace http://tampermonkey.net/
// @version 1.4
// @description zeigt die Platierung in der Topliste in der Sidebar
// @author NiZi112 (Danke @LennardTFD ;-))
// @match https://rettungssimulator.online/
// @include https://rettungssimulator.online/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
if(window.location.href.includes("toplist")){
var platz = parseInt($("h3 a").html().replace("Dein Rang: ", ""));
var storage = localStorage;
localStorage.setItem('platzierung_toplist_nizi', platz);
};
if(!localStorage.getItem("platzierung_toplist_nizi")){
window.location.href = "toplist";
};
platz = localStorage.getItem("platzierung_toplist_nizi");
$("#darkMode").after("<li>Topliste: " + platz + "</li>");
})();
Alles anzeigen
Zeigt euch in der Sidebar eure Platzierung auf der Topliste an.
Das wärs!
LennardTFD Danke für die Formel zum finden der Platzierung