Skip to content

Commit

Permalink
deploy: f961288
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowsink committed Jan 12, 2025
1 parent 1b76a0f commit 42a7358
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion invidivizer/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ function handleDispatch(payload) {
if (!match?.[1]) return;
const tsMatch = found.match(/t=(?:\d+|(?:\d+m)?\d+s|\d+m)/);
const embPath = tsMatch?.[0] ? match[1] + "?" + tsMatch[0] : match[1];
const newSrc = new URL(`https://${store.instance}/embed/${embPath}`);
newSrc.searchParams.set("autoplay", 0);
e.style.display = "none";
e.insertAdjacentElement("afterend", (() => {
const _el$ = (0, import_web$4.getNextElement)(_tmpl$);
(0, import_web$3.effect)(() => (0, import_web$2.setAttribute)(_el$, "src", `https://${store.instance}/embed/${embPath}`));
(0, import_web$3.effect)(() => (0, import_web$2.setAttribute)(_el$, "src", newSrc.toString()));
return _el$;
})());
});
Expand Down
2 changes: 1 addition & 1 deletion invidivizer/plugin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Invidivizer","author":"Yellowsink","description":"Replaces Youtube embeds with invidious embeds in Discord","hash":"4071fd2e4a390e474c75c93dd3fa7ebb"}
{"name":"Invidivizer","author":"Yellowsink","description":"Replaces Youtube embeds with invidious embeds in Discord","hash":"d9e6f9b103255d3a071290de01cbfaed"}

0 comments on commit 42a7358

Please sign in to comment.