mirror of
https://github.com/Andre-Bzk/rin-mobile-userscript.git
synced 2026-11-15 09:33:08 +01:00
docs: lead with screenshots and correct outdated documentation
Both documents had drifted away from the repository they describe: they pointed at fixtures and a helper script that are not present, documented a local-server workflow that is no longer used, and filed one page type under the wrong view. Following them meant setting up things that cannot work while trusting claims that no longer held. The README also explained every design decision before showing a single result, so the question a reader asks first — what does this actually look like — took the longest to answer. Screenshots and a short feature list now carry that job. The reasoning stays where it is needed, next to the code. Restricting the dev loader to the live site closes a side effect that only surfaced locally: its patterns matched page names common enough that the stylesheet would have leaked into unrelated local projects. The version number existed in two places and had already drifted apart. Reading it back from the metadata block leaves one place to change it.
This commit is contained in:
+10
-1
@@ -12,6 +12,14 @@
|
||||
var DEBUG = false;
|
||||
var log = [];
|
||||
|
||||
// Die Version steht ausschliesslich im Metadatenblock. Ein zweiter Literal
|
||||
// im Code lief beim Release regelmaessig davon weg, ohne dass es auffiel —
|
||||
// GM_info liest denselben Header zurueck. Fehlt es (Userscript-Manager ohne
|
||||
// GM_info), bleibt das Overlay ohne Versionsangabe, statt eine falsche zu
|
||||
// zeigen.
|
||||
var VERSION = (typeof GM_info !== 'undefined' && GM_info.script &&
|
||||
GM_info.script.version) || '';
|
||||
|
||||
function h() { return document.head || document.documentElement; }
|
||||
|
||||
function txt(el) { return (el ? el.textContent || '' : '')
|
||||
@@ -1696,7 +1704,8 @@
|
||||
if (DEBUG) {
|
||||
var d = document.createElement('div');
|
||||
d.className = 'rm-dbg';
|
||||
d.textContent = 'RIN Mobile v3.13\n' + log.join('\n');
|
||||
d.textContent = 'RIN Mobile' + (VERSION ? ' v' + VERSION : '') +
|
||||
'\n' + log.join('\n');
|
||||
document.body.insertBefore(d, document.body.firstChild);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user