mirror of
https://github.com/Andre-Bzk/rin-mobile-userscript.git
synced 2026-11-15 09:33:08 +01:00
refactor: merge the two userscripts into one
The list script matched the whole forum, thread pages included, and injected its stylesheet there before bailing out of its own build. Both stylesheets were therefore live on every thread, and rules sharing a class name resolved by userscript load order rather than by intent — a layout that could differ between two machines with the same files installed. One of those clashes was already costing the clearance behind the fixed bar. A single script picks its view from the page type instead, which turns the shared class namespace from a hazard into a plain fact of the file, resolved with a modifier on the root element. Pages outside either view now stay untouched, where before they still received a full stylesheet. Two things the merge brought to light: the global image rule was overriding the avatar dimensions, which only went unnoticed because square avatars happen to scale to the same result, and a zero-width space had been sitting in the source as a literal character rather than an escape. Installations carrying the old thread script have to remove it; the remaining one keeps its name and updates in place. Claude-Session: https://claude.ai/code/session_0158owAAsXAfFiT3hGkQt1Xk
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
// @name [DEV] RIN Mobile
|
||||
// @namespace rin-dev
|
||||
// @description Dev-Loader: laedt rin-mobile.user.js live von der Platte
|
||||
// @version 1.0
|
||||
// @version 2.0
|
||||
// @match *://cs.rin.ru/forum/*
|
||||
// @include http://localhost:*/*viewforum*
|
||||
// @include http://127.0.0.1:*/*viewforum*
|
||||
// @include http://localhost:*/*viewtopic*
|
||||
// @include http://127.0.0.1:*/*viewtopic*
|
||||
// @require file:///C:/Projekte/ios_safari_userscripts/rin-mobile.user.js
|
||||
// @run-at document-start
|
||||
// @grant none
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
// ==UserScript==
|
||||
// @name [DEV] RIN Mobile Thread
|
||||
// @namespace rin-dev
|
||||
// @description Dev-Loader: laedt rin-thread.user.js live von der Platte
|
||||
// @version 1.0
|
||||
// @match *://cs.rin.ru/forum/viewtopic.php*
|
||||
// @include http://localhost:*/*viewtopic*
|
||||
// @include http://127.0.0.1:*/*viewtopic*
|
||||
// @require file:///C:/Projekte/ios_safari_userscripts/rin-thread.user.js
|
||||
// @run-at document-start
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
// Der eigentliche Code steckt in der @require-Datei.
|
||||
// Aenderungen dort greifen nach einem Reload der Seite.
|
||||
Reference in New Issue
Block a user