Bearbeiten von „OS2.spielerprofil“
Zur Navigation springen
Zur Suche springen
Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.
Aktuelle Version | Dein Text | ||
Zeile 1: | Zeile 1: | ||
[[Kategorie:Greasemonkey]] | [[Kategorie:Greasemonkey]] | ||
{| style="background-color:white; font-size:11px; float: right; margin:3px 3px 3px 10px; border:1px solid #999; border-color: #9C1818; border-collapse:collapse;" width=500 cellpadding=3 cellspacing=0 | {| style="background-color:white; font-size:11px; float: right; margin:3px 3px 3px 10px; border:1px solid #999; border-color: #9C1818; border-collapse:collapse;" width=500 cellpadding=3 cellspacing=0 | ||
| colspan="2" style="padding:0.3em; background-color:#9C1818; font-size: 18px; color:#FFFFFF" align=center| '''OS2. | | colspan="2" style="padding:0.3em; background-color:#9C1818; font-size: 18px; color:#FFFFFF" align=center| '''OS2.spielersuche''' | ||
|- bgcolor="#FFCC00" | |- bgcolor="#FFCC00" | ||
| '''Dateiname''' | | '''Dateiname''' | ||
Zeile 8: | Zeile 7: | ||
|- bgcolor="#FFCC00" | |- bgcolor="#FFCC00" | ||
| '''Version''' | | '''Version''' | ||
| '''0.3 | | '''0.3''' | ||
|- bgcolor="#FFCC00" | |- bgcolor="#FFCC00" | ||
| '''Autor''' | | '''Autor''' | ||
Zeile 32: | Zeile 31: | ||
| '''{{REVISIONDAY}}.{{REVISIONMONTH}}.{{REVISIONYEAR}}''' | | '''{{REVISIONDAY}}.{{REVISIONMONTH}}.{{REVISIONYEAR}}''' | ||
|} | |} | ||
<pre> | <pre> | ||
// ==UserScript== | // ==UserScript== | ||
// @name OS2.spielerprofil | // @name OS2.spielerprofil | ||
// @namespace http://os.ongapo.com/ | // @namespace http://os.ongapo.com/ | ||
// @version 0.3 | // @version 0.3 | ||
// @copyright 2016+ | // @copyright 2016+ | ||
// @author Michael Bertram / Andreas Eckes (Strindheim BK) / Sven Loges (SLC) | // @author Michael Bertram | ||
// @author Andreas Eckes (Strindheim BK) | |||
// @author Sven Loges (SLC) | |||
// @description Alter exakt / Summe der trainierbaren Skills / Talent (trainierbare Skills mit Alter 19.00 bei unterstelltem 17er-Trainer seitdem) | // @description Alter exakt / Summe der trainierbaren Skills / Talent (trainierbare Skills mit Alter 19.00 bei unterstelltem 17er-Trainer seitdem) | ||
// @include | // @include http*://os.ongapo.com/haupt.php | ||
// @include | // @include http*://os.ongapo.com/sp.php?s=* | ||
// @ | // @include http*://www.os.ongapo.com/haupt.php | ||
// @ | // @include http*://www.os.ongapo.com/sp.php?s=* | ||
// @ | // @include http*://online-soccer.eu/haupt.php | ||
// @include http*://online-soccer.eu/sp.php?s=* | |||
// @include http*://www.online-soccer.eu/haupt.php | |||
// @include http*://www.online-soccer.eu/sp.php?s=* | |||
// @grant GM_getValue | // @grant GM_getValue | ||
// @grant GM_setValue | // @grant GM_setValue | ||
Zeile 147: | Zeile 149: | ||
} | } | ||
return ZATNr; | return ZATNr; | ||
} | |||
// Helferfunktion fuer die Ermittlung der Zeilen einer Tabelle | |||
// index: Laufende Nummer des Elements (0-based) | |||
// doc: Dokument (document) | |||
function getRows(index, doc = document) { | |||
const __TABLE = getTable(index, "table", doc); | |||
const __ROWS = (__TABLE === undefined) ? undefined : __TABLE.rows; | |||
return __ROWS; | |||
} | } | ||
Zeile 153: | Zeile 165: | ||
// tag: Tag des Elements ("table") | // tag: Tag des Elements ("table") | ||
// doc: Dokument (document) | // doc: Dokument (document) | ||
function getTable(index, tag = | function getTable(index, tag = "table", doc = document) { | ||
const __TAGS = document.getElementsByTagName(tag); | const __TAGS = document.getElementsByTagName(tag); | ||
const __TABLE = __TAGS[index]; | const __TABLE = __TAGS[index]; | ||
return __TABLE; | return __TABLE; | ||
} | } | ||
Zeile 189: | Zeile 191: | ||
return page; | return page; | ||
} | } | ||
function procHaupt() { | function procHaupt() { | ||
const zat = getZATNrFromCell(getRows(0)[2].cells[0]) - 1; | const zat = getZATNrFromCell(getRows(0)[2].cells[0]) - 1; | ||
GM_setValue("currZAT", zat); | |||
} | } | ||
function procSpieler() { | function procSpieler() { | ||
alter = stringToNumber(table1.rows[0].cells[5].textContent); | alter = stringToNumber(table1.rows[0].cells[5].textContent); | ||
gebtag = stringToNumber(table1.rows[1].cells[4].textContent); | gebtag = stringToNumber(table1.rows[1].cells[4].textContent); | ||
var zat = GM_getValue("currZAT", 100); | |||
// Skills auslesen | // Skills auslesen |