Skip to content
Snippets Groups Projects
Verified Commit 9196f515 authored by Lars Frost's avatar Lars Frost
Browse files

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
parent 7a097581
No related branches found
No related tags found
No related merge requests found
if (window.location.host === 'engage.streaming.rwth-aachen.de') { 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 inFrame = (window.parent !== window)
const vId = new URLSearchParams(location.search).get('id') const vId = new URLSearchParams(location.search).get('id')
fetch(`https://engage.streaming.rwth-aachen.de/search/episode.json?${new URLSearchParams({id:vId}).toString()}`) fetch(`https://engage.streaming.rwth-aachen.de/search/episode.json?${new URLSearchParams({id:vId}).toString()}`)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"content_scripts": [ "content_scripts": [
{ {
"all_frames": true, "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"], "js": ["free.js"],
"css": ["free.css"] "css": ["free.css"]
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment