publisher-uaproxy-banner: token comes from Tampermonkey storage only, install via dev-stub

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Glenn Goossens
2026-10-19 11:23:15 +02:00
co-authored by Claude Sonnet 5.5
parent c88781a406
commit 7bb2fcc9fd
2 changed files with 6 additions and 9 deletions
+3 -5
View File
@@ -5,11 +5,9 @@ proxy laadt de pagina zonder UA-toegang en geeft een Zotero-save geen PDF.
## Installeren ## Installeren
- Open `http://127.0.0.1:18088/ua-banner.user.js` in Chrome (`uaproxyd` moet draaien). De daemon - `bin/dev-stub publisher-uaproxy-banner`, plak de stub in een nieuw Tampermonkey-script.
zet het token in de kopie, dus er hoeft niets ingevuld te worden. - Het token zit niet in de repo: de eerste klik op Connect vraagt ernaar
- Dev-spoor: `bin/dev-stub publisher-uaproxy-banner`. Het token zit niet in de repo, dus de (`cat ~/.local/share/uaproxyd/token`) en onthoudt het in Tampermonkey.
eerste klik op Connect vraagt ernaar (`cat ~/.local/share/uaproxyd/token`) en onthoudt het in
Tampermonkey.
## Hoe het werkt ## Hoe het werkt
@@ -41,10 +41,9 @@
var BASE = 'http://127.0.0.1:18088'; var BASE = 'http://127.0.0.1:18088';
var POLL_MS = 3000; var POLL_MS = 3000;
// uaproxyd fills in {{TOKEN}} when it serves this file; the dev-stub route has no token, so // The token is not in the repo: the first click on Connect asks for it once and keeps it in
// the first click on Connect asks for it once and keeps it in Tampermonkey storage. // Tampermonkey storage.
var BAKED = '{{TOKEN}}'; var token = GM_getValue('token', '');
var token = BAKED.charAt(0) === '{' ? GM_getValue('token', '') : BAKED;
var bar = null, text = null, btn = null, timer = null; var bar = null, text = null, btn = null, timer = null;