Initial Upload
This commit is contained in:
commit
ab62e2556a
2 changed files with 26 additions and 0 deletions
3
README.md
Normal file
3
README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Userscripts
|
||||
|
||||
Various Userscripts
|
||||
23
jellyfin-quick-delete.js
Normal file
23
jellyfin-quick-delete.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
const collection = document.getElementsByClassName("listItem");
|
||||
|
||||
for (let i = 0; i < collection.length; i++) {
|
||||
let curr = collection[i];
|
||||
let el = document.createElement("button");
|
||||
el.className = "listItemButton paper-icon-button-light emby-button";
|
||||
let el2 = document.createElement("span");
|
||||
el2.className = "material-icons delete";
|
||||
el2.style.color = "red";
|
||||
el.appendChild(el2);
|
||||
el.onclick = function () {
|
||||
let url = "https://media.m3.fyi/Items/" + this.parentElement.dataset.id;
|
||||
console.log("Deleting" + url);
|
||||
fetch(url,
|
||||
{
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"X-Emby-Authorization": 'MediaBrowser Client="QuickDelete", Device="Chrome", DeviceId="test", Version="10.8.9", Token="38346c399d57454da3bdbf47ba716765"'
|
||||
}
|
||||
})
|
||||
}
|
||||
curr.appendChild(el);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue