random id
This commit is contained in:
parent
108de113d1
commit
cd5894429c
@ -7,7 +7,7 @@
|
||||
"48": "icon-48.png",
|
||||
"128": "icon-128.png"
|
||||
},
|
||||
"version": "106.0",
|
||||
"version": "107.0",
|
||||
"manifest_version": 3,
|
||||
"host_permissions": ["http://127.0.0.1:4000/jsonrpc"],
|
||||
"permissions": ["tabs"],
|
||||
|
@ -5,6 +5,12 @@ providers.set("youtu.be", "youtube")
|
||||
providers.set("tv.nrk.no", "nrk")
|
||||
providers.set("seafile.purser.it", "seafile")
|
||||
|
||||
const random = () => {
|
||||
const arr = new Uint8Array(32)
|
||||
window.crypto.getRandomValues(arr)
|
||||
return btoa(arr)
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
let [proxyButton, kodiButton] = document.getElementsByTagName("button")
|
||||
proxyButton.addEventListener("click", (ev) => {
|
||||
@ -50,13 +56,13 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
newurl.pathname = oldurl.pathname
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
newurl.search = search.toString()
|
||||
|
||||
|
||||
let req = {
|
||||
jsonrpc: "2.0",
|
||||
method: "Player.Open",
|
||||
id: 12345,
|
||||
id: random(),
|
||||
params: {
|
||||
item: {
|
||||
file: newurl.href
|
||||
|
Loading…
Reference in New Issue
Block a user