Compare commits
No commits in common. "a190acd1d87c57e44b8ed6e9e1639723fa34412c" and "050cf89b455796c2b54fb08a149e551a90515c6f" have entirely different histories.
a190acd1d8
...
050cf89b45
@ -7,7 +7,7 @@
|
||||
"48": "icon-48.png",
|
||||
"128": "icon-128.png"
|
||||
},
|
||||
"version": "111.0",
|
||||
"version": "109.0",
|
||||
"manifest_version": 3,
|
||||
"host_permissions": ["http://127.0.0.1:4000/jsonrpc"],
|
||||
"permissions": ["tabs"],
|
||||
|
@ -26,17 +26,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
if(providers.has(hostname)) {
|
||||
if(hostname.includes("youtube.com")) {
|
||||
let newpath = oldurl.searchParams.get("v")
|
||||
if(newpath) {
|
||||
if((newpath instanceof String) || ((typeof newpath) === "string")) {
|
||||
newurl.pathname = "/" + newpath
|
||||
}
|
||||
} else {
|
||||
newurl.pathname = oldurl.pathname
|
||||
}
|
||||
search.append("provider", providers.get(hostname))
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
newurl.search = search.toString()
|
||||
const newtab = {}
|
||||
newtab.url = newurl.href
|
||||
@ -54,7 +51,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
if(hostname.includes("youtube.com")) {
|
||||
newurl = new URL("plugin://plugin.video.youtube")
|
||||
search.append("action", "play_video")
|
||||
const video_id = oldurl.searchParams.get("v")
|
||||
let video_id = oldurl.searchParams.get("v")
|
||||
if(video_id) {
|
||||
search.append("videoid", video_id)
|
||||
}
|
||||
@ -63,24 +60,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
search.append("raw", "true")
|
||||
newurl.pathname = oldurl.pathname
|
||||
}
|
||||
} else if(hostname == "stream.purser.it") {
|
||||
const provider = oldurl.searchParams.get("provider")
|
||||
if(provider) {
|
||||
if(provider == "youtube") {
|
||||
newurl = new URL("plugin://plugin.video.youtube")
|
||||
search.append("action", "play_video")
|
||||
const video_id = oldurl.pathname.replace("/", "")
|
||||
if(video_id) {
|
||||
search.append("videoid", video_id)
|
||||
}
|
||||
} else {
|
||||
newurl.pathname = oldurl.pathname
|
||||
search.append("provider", provider)
|
||||
search.append("raw", "true")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
newurl.search = search.toString()
|
||||
|
Loading…
Reference in New Issue
Block a user