Compare commits
No commits in common. "master" and "v109" have entirely different histories.
@ -1,13 +1,13 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
steps:
|
steps:
|
||||||
- name: compile-extensions
|
- name: compile-chrome
|
||||||
image: roypur/extension-packer:latest
|
image: roypur/chrome-packer:latest
|
||||||
environment:
|
environment:
|
||||||
CHROME_PRIVKEY:
|
CHROME_PRIVKEY:
|
||||||
from_secret: chrome_privkey
|
from_secret: chrome_privkey
|
||||||
commands:
|
commands:
|
||||||
- ./pack-browsers.sh
|
- ./pack-chrome.sh
|
||||||
- name: gitea_release
|
- name: gitea_release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
@ -15,6 +15,6 @@ steps:
|
|||||||
from_secret: gitea_token
|
from_secret: gitea_token
|
||||||
base_url: https://git.purser.it
|
base_url: https://git.purser.it
|
||||||
title: ${DRONE_TAG}
|
title: ${DRONE_TAG}
|
||||||
files: out/proxy-stream-${DRONE_TAG}.crx out/proxy-stream-${DRONE_TAG}.xpi
|
files: out/proxy-stream-${DRONE_TAG}.crx
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,5 +11,4 @@ android/.gradle/*
|
|||||||
android/gradle/*
|
android/gradle/*
|
||||||
chrome/*.png
|
chrome/*.png
|
||||||
*.crx
|
*.crx
|
||||||
*.xpi
|
|
||||||
sources.json
|
sources.json
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"48": "icon-48.png",
|
"48": "icon-48.png",
|
||||||
"128": "icon-128.png"
|
"128": "icon-128.png"
|
||||||
},
|
},
|
||||||
"version": "111.0",
|
"version": "109.0",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"host_permissions": ["http://127.0.0.1:4000/jsonrpc"],
|
"host_permissions": ["http://127.0.0.1:4000/jsonrpc"],
|
||||||
"permissions": ["tabs"],
|
"permissions": ["tabs"],
|
||||||
|
@ -26,17 +26,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
if(providers.has(hostname)) {
|
if(providers.has(hostname)) {
|
||||||
if(hostname.includes("youtube.com")) {
|
if(hostname.includes("youtube.com")) {
|
||||||
let newpath = oldurl.searchParams.get("v")
|
let newpath = oldurl.searchParams.get("v")
|
||||||
if(newpath) {
|
if((newpath instanceof String) || ((typeof newpath) === "string")) {
|
||||||
newurl.pathname = "/" + newpath
|
newurl.pathname = "/" + newpath
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newurl.pathname = oldurl.pathname
|
newurl.pathname = oldurl.pathname
|
||||||
}
|
}
|
||||||
search.append("provider", providers.get(hostname))
|
search.append("provider", providers.get(hostname))
|
||||||
} else {
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newurl.search = search.toString()
|
newurl.search = search.toString()
|
||||||
const newtab = {}
|
const newtab = {}
|
||||||
newtab.url = newurl.href
|
newtab.url = newurl.href
|
||||||
@ -54,7 +51,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
if(hostname.includes("youtube.com")) {
|
if(hostname.includes("youtube.com")) {
|
||||||
newurl = new URL("plugin://plugin.video.youtube")
|
newurl = new URL("plugin://plugin.video.youtube")
|
||||||
search.append("action", "play_video")
|
search.append("action", "play_video")
|
||||||
const video_id = oldurl.searchParams.get("v")
|
let video_id = oldurl.searchParams.get("v")
|
||||||
if(video_id) {
|
if(video_id) {
|
||||||
search.append("videoid", video_id)
|
search.append("videoid", video_id)
|
||||||
}
|
}
|
||||||
@ -63,24 +60,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
search.append("raw", "true")
|
search.append("raw", "true")
|
||||||
newurl.pathname = oldurl.pathname
|
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()
|
newurl.search = search.toString()
|
||||||
@ -97,7 +76,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(playlistid) {
|
if(playlistid) {
|
||||||
req.params.playlistid = playlistid
|
req.params.playlistid = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
const resp = await fetch("http://127.0.0.1:4000/jsonrpc", {
|
const resp = await fetch("http://127.0.0.1:4000/jsonrpc", {
|
||||||
|
@ -50,8 +50,6 @@ fi
|
|||||||
release_folder="${temp_dir}/out/proxy-stream-${DRONE_TAG}"
|
release_folder="${temp_dir}/out/proxy-stream-${DRONE_TAG}"
|
||||||
cp -r "${dir}/chrome" "${release_folder}"
|
cp -r "${dir}/chrome" "${release_folder}"
|
||||||
|
|
||||||
(cd "${release_folder}" && zip -r "${temp_dir}/out/proxy-stream-${DRONE_TAG}.xpi" .)
|
|
||||||
|
|
||||||
if grep "/proc/1/cgroup" -q -F -e docker
|
if grep "/proc/1/cgroup" -q -F -e docker
|
||||||
then
|
then
|
||||||
${browser} --disable-gpu --no-sandbox --user-data-dir=${chrome_dir} --pack-extension="${temp_dir}/out/proxy-stream-${DRONE_TAG}" --pack-extension-key="${temp_dir}/privkey.pem"
|
${browser} --disable-gpu --no-sandbox --user-data-dir=${chrome_dir} --pack-extension="${temp_dir}/out/proxy-stream-${DRONE_TAG}" --pack-extension-key="${temp_dir}/privkey.pem"
|
Loading…
Reference in New Issue
Block a user