Add qobuz_bulk_downloader.js
This commit is contained in:
parent
5b7def0520
commit
516f185e31
37
qobuz_bulk_downloader.js
Normal file
37
qobuz_bulk_downloader.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
// ==UserScript==
|
||||
// @name Qobuz Batch Downloader
|
||||
// @namespace https://git.evilchi.li/evilchili/qobuz-bulk-downloader
|
||||
// @version 2024-09-05
|
||||
// @description Fuck you and your downloader app.
|
||||
// @author evilchili
|
||||
// @match https://www.qobuz.com/account/download/*
|
||||
// @icon https://www.google.com/s2/favicons?sz=64&domain=qobuz.com
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
var btn = document.createElement('div');
|
||||
btn.innerHTML = "<a id='QBD_download_all'>DOWNLOAD ALL TRACKS</a>";
|
||||
btn.setAttribute("class", "btn-white");
|
||||
document.querySelector('.product-title').appendChild(btn);
|
||||
document.getElementById('QBD_download_all').addEventListener('click', () => {
|
||||
var links = document.querySelectorAll('.tracks');
|
||||
var index = 0;
|
||||
|
||||
const click_interval = setInterval(function() {
|
||||
links[index].click();
|
||||
index++;
|
||||
if (index == links.length) {
|
||||
clearInterval(click_interval);
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
const cover_link = Array.from(document.getElementsByTagName('a')).filter(function (el) { return el.href.indexOf("/cover") > 0 });
|
||||
if (cover_link.length > 0) {
|
||||
cover_link[0].click();
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
Loading…
Reference in New Issue
Block a user