From 9196f5153346689988c8ecd89c9703c96983b63e Mon Sep 17 00:00:00 2001 From: Lars Frost <larsf@fsmpi.rwth-aachen.de> Date: Thu, 25 Jan 2024 15:54:21 +0100 Subject: [PATCH] Adapt watch.html path to current RWTH moodle There are at least //paella/ui and /paella7/ui, so we just remove the hard-coded path and match every path in engage.streaming.rwth-aachen.de. Fixes #2 --- free.js | 3 --- manifest.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/free.js b/free.js index f9bcbff..17acbe5 100644 --- a/free.js +++ b/free.js @@ -1,7 +1,4 @@ if (window.location.host === 'engage.streaming.rwth-aachen.de') { - if (!window.location.href.startsWith('https://engage.streaming.rwth-aachen.de/paella/ui/watch.html')) - console.warn('looks like we are running outside a player context‽') - const inFrame = (window.parent !== window) const vId = new URLSearchParams(location.search).get('id') fetch(`https://engage.streaming.rwth-aachen.de/search/episode.json?${new URLSearchParams({id:vId}).toString()}`) diff --git a/manifest.json b/manifest.json index 767a54e..a87ff5d 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "content_scripts": [ { "all_frames": true, - "matches": ["https://moodle.rwth-aachen.de/*", "https://engage.streaming.rwth-aachen.de/paella/ui/*"], + "matches": ["https://moodle.rwth-aachen.de/*", "https://engage.streaming.rwth-aachen.de/*"], "js": ["free.js"], "css": ["free.css"] } -- GitLab