Skip to content

Commit 4f27949

Browse files
committed
add more scripts
1 parent 223cf14 commit 4f27949

11 files changed

Lines changed: 81 additions & 49 deletions

_pages/deutsch.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,30 @@ Zuerst [RHS Base](rhs-base.user.js) installieren!
1717

1818
## Liste der Skripte
1919
(alphabetisch sortiert - weitere Skripte werden nach und nach hinzugefügt)
20+
* [Add Orig Location](rhs-reviewAddOrigLocation.user.js)
21+
- zeigt bei Standortbearbeitung einen Marker für den Originalstandort
2022
* [Add Translation Button](rhs-addTranslationButtons.user.js)
2123
- fügt Möglichkeiten zum Übersetzen der Texte hinzu
24+
* [Anti Social](rhs-antiSocial.user.js)
25+
- versteckt die Gruppengrößenauswahl bei "Kontakte knüpfen"
2226
* [AutoHold](rhs-autoHold.user.js)
2327
- erkennt '#hold' im Zusatztext und stellt Nominierung zurück ([Dokumentation](de/autohold.html))
2428
* [Dupes Scroll](rhs-dupesScroll.user.js)
2529
- Nutze das Mausrad zum Scrollen in der Dupes-Liste
26-
* [ImageMod](rhss-imageMod.user.js)
30+
* [ImageMod](rhs-imageMod.user.js)
2731
- öffne Originalfotos in "benannten" Tabs
2832
* [OPR Stats](rhs-oprStats.user.js)
2933
- speichert persönliche Statistiken im Browser Local Storage
3034
* [Review Improve CSS](de/reviewImproveCSS.html)
3135
- Verschiedene Layout-Änderungen für Bewertungen am Desktop
3236

37+
### Nichtunterstützte Skripte / Skripte in Entwicklung
38+
Es ist nicht garantiert, dass diese Skripte funktionieren. Wenn du ein Entwickler bist, schau sie dir an und behebe Fehler. :-)
39+
Andere Skripte sind neu, ungetestet oder noch in Entwicklung.
40+
41+
* [Disable Text Diff](rhs-disableTextDiff.user.js)
42+
- schaltet Niantics Text-Diff aus, indem der Schalter gedrückt wird
43+
3344
---
3445

3546
## Fehler und bekannte Probleme

_pages/english.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,31 @@ Install [RHS Base](rhs-base.user.js) first!
1717

1818
## List of scripts
1919
(sorted alphabetically - more scripts will be added gradually)
20+
* [Add Orig Location](rhs-reviewAddOrigLocation.user.js)
21+
- add marker for original location on location edits
2022
* [Add Translation Button](rhs-addTranslationButtons.user.js)
2123
- adds tools to translate text associated with a wayspot
24+
* [Anti Social](rhs-antiSocial.user.js)
25+
- hides group size selection from socialize card
2226
* [AutoHold](rhs-autoHold.user.js)
2327
- searches for '#hold' in supporting statement and puts nomination on hold ([documentation](en/autohold.html))
2428
* [Dupes Scroll](rhs-dupesScroll.user.js)
2529
- use mouse wheel to scroll the dupes filmstrip
26-
* [ImageMod](rhss-imageMod.user.js)
30+
* [ImageMod](rhs-imageMod.user.js)
2731
- open fullsize images in "named" tabs
2832
* [OPR Stats](rhs-oprStats.user.js)
2933
- saves some personal statistics in local browser storage
3034
* [Review Improve CSS](en/reviewImproveCSS.html)
3135
- increases height for images and titel/description cards
3236
- removes padding and description text
3337

38+
### Unsupported scripts / scripts in development
39+
These scripts may work or not. If you are a developer, have a look at it and fix bugs. :-)
40+
Other scripts are new, untested or still in development.
41+
42+
* [Disable Text Diff](rhs-disableTextDiff.user.js)
43+
- disables the Niantic text diff display by clicking at the slider
44+
3445
---
3546

3647
## Bugs and known problems

no_support/rhs-clickEnlargeImages.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@
1111
const l2Sel = "app-supporting-info-b > wf-review-card-b > div.wf-review-card__body > div > a.lupe";
1212

1313
function click() {
14-
w.rhs.f.awaitElem(l2Sel).then((elem)=>{ elem.click(); })
14+
w.rhs.f.awaitElem(l2Sel)
15+
.then((elem)=>{
16+
elem.click();
17+
console.log(GM_info.script.name, " - klick supporting image");
18+
})
1519
.catch((e) => {console.warn(GM_info.script.name, ": ", e);});
1620
w.rhs.f.awaitElem(l1Sel)
17-
.then((elem)=>{ elem.click(); })
21+
.then((elem)=>{
22+
elem.click();
23+
console.log(GM_info.script.name, " - klick main image");
24+
})
1825
.catch((e) => {console.warn(GM_info.script.name, ": ", e);});
1926
}
2027

no_support/rhs-debug.js

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"use strict";
88
const w = "undefined" === typeof unsafeWindow ? window : unsafeWindow;
99
const sessvarMiss = "warnBase";
10+
const enableEventDebug = true;
1011

1112
// const mainContentSelector = "app-wayfarer > div > mat-sidenav-container > mat-sidenav-content";
1213
const profileImageSelector = "app-root > app-wayfarer > div > wf-header > div > a";
@@ -247,46 +248,46 @@
247248
w.addEventListener("OPRSettingsLoaded", removeInfobox);
248249

249250
/* ================ Events mitloggen ======================= */
250-
/*
251-
const notificationCounter = 0;
252-
const originalDispatchEvent = EventTarget.prototype.dispatchEvent;
253-
254-
EventTarget.prototype.dispatchEvent = function(event) {
255-
try {
256-
const name = event.type;
257-
const target = this;
258-
259-
// Farbcode nach Event-Typ wählen (optional)
260-
let color = "color: gray";
261-
if (name.startsWith("OPR")) {color = "color: #ff08ff; font-weight: bold";} else if (name.startsWith("click")) {color = "color: #00aa00";} else if (name.startsWith("keydown") || name.startsWith("keyup")) {color = "color: #aa00aa";} else if (name.startsWith("input")) {color = "color: #ff8800";}
262-
263-
// Konsolenausgabe
264-
console.log(
265-
`%c[Event]%c ${name}%c → %o`,
266-
"color: #888; font-weight: bold",
267-
color,
268-
"color: #666",
269-
target
270-
);
271-
272-
if (name.startsWith("OPR")) {
273-
const jetzt = new Date().toLocaleTimeString("de-DE");
274-
w.rhs.f.createNotification(jetzt + " #" + ++notificationCounter + " " + event.type, "fuchsia", {autoclose: 30});
275-
}
251+
if (enableEventDebug) {
252+
let notificationCounter = 0;
253+
const originalDispatchEvent = EventTarget.prototype.dispatchEvent;
254+
255+
EventTarget.prototype.dispatchEvent = function(event) {
256+
try {
257+
const name = event.type;
258+
const target = this;
259+
260+
// Farbcode nach Event-Typ wählen (optional)
261+
let color = "color: gray";
262+
if (name.startsWith("OPR")) {color = "color: #ff08ff; font-weight: bold";} else if (name.startsWith("click")) {color = "color: #00aa00";} else if (name.startsWith("keydown") || name.startsWith("keyup")) {color = "color: #aa00aa";} else if (name.startsWith("input")) {color = "color: #ff8800";}
263+
264+
// Konsolenausgabe
265+
console.log(
266+
`%c[Event]%c ${name}%c → %o`,
267+
"color: #888; font-weight: bold",
268+
color,
269+
"color: #666",
270+
target
271+
);
272+
273+
if (name.startsWith("OPR")) {
274+
const jetzt = new Date().toLocaleTimeString("de-DE");
275+
w.rhs.f.createNotification(jetzt + " #" + ++notificationCounter + " " + event.type, "fuchsia", {autoclose: 30});
276+
}
276277

277-
} catch (err) {
278-
console.error("Fehler im dispatchEvent-Hook:", err);
279-
}
278+
} catch (err) {
279+
console.error("Fehler im dispatchEvent-Hook:", err);
280+
}
280281

281-
// Original-Dispatch ausführen
282-
return originalDispatchEvent.call(this, event);
283-
};
282+
// Original-Dispatch ausführen
283+
return originalDispatchEvent.call(this, event);
284+
};
284285

285-
const originalDispatch = w.dispatchEvent;
286-
w.dispatchEvent = function(event) {
287-
return originalDispatch.call(this, event);
288-
};
289-
*/
286+
const originalDispatch = w.dispatchEvent;
287+
w.dispatchEvent = function(event) {
288+
return originalDispatch.call(this, event);
289+
};
290+
}
290291
/* ================ Events mitloggen ======================= */
291292

292293
// === no changes needed below this line ======================
@@ -300,5 +301,7 @@
300301

301302
/* we are done :-) */
302303
console.log("Script loaded:", GM_info.script.name, "v" + GM_info.script.version);
304+
console.log("W = ", w);
305+
console.dir(w);
303306

304-
})();
307+
})();

no_support/rhs-disableTextDiff.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @name Disable Text Diff
2-
// @version 0.0.1
2+
// @version 1.0.0
33
// @description disables the Niantic text diff display by clicking at the slider
44
// @author AlterTobi
55

no_support/rhs-openIn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @name maps open in
2-
// @version 0.0.1
2+
// @version 1.0.0
33
// @description add "Open In" for maps
44
// @author AlterTobi
55

no_support/rhs-orca.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @name ORCa
2-
// @version 0.0.1
2+
// @version 1.0.0
33
// @description ORCa
44
// @author AlterTobi
55
// @resource orca https://altertobi.github.io/Recon-Helper-Scripts/images/orca.png

rhs-addTranslationButtons.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@
412412
// ----- BEGIN - general instructions ------
413413
switch(window.origin) {
414414
case ORIGIN_OPR:
415-
console.log("Init Script loading:", GM_info.script.name, " - OPR");
415+
// console.log("Init Script loading:", GM_info.script.name, " - OPR");
416416
if("undefined" === typeof(rhs)) {
417417
if (undefined === sessionStorage[sessvarMiss]) {
418418
sessionStorage[sessvarMiss] = 1;
@@ -424,11 +424,11 @@
424424
}
425425
break;
426426
case ORIGIN_DEEPL:
427-
console.log("Init Script loading:", GM_info.script.name, " - Deepl");
427+
// console.log("Init Script loading:", GM_info.script.name, " - Deepl");
428428
initD();
429429
break;
430430
case ORIGIN_KAGI:
431-
console.log("Init Script loading:", GM_info.script.name, " - Kagi");
431+
// console.log("Init Script loading:", GM_info.script.name, " - Kagi");
432432
initK();
433433
break;
434434
default:

0 commit comments

Comments
 (0)