TVBOXNOW

enter something useful

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name TVBOXNOW
// @namespace http://your.homepage/
// @version 0.3
// @description enter something useful
// @author You
// @match http://www.tvboxnow.com/thread-*.html
// @match http://www.tvboxnow.com/viewthread.php?*
// @match http://tv520.funbbs.me/thread-*.html
// @grant none
// ==/UserScript==

(function() {
    document.body.insertAdjacentHTML('beforeend', '<div style="position:fixed;right:10px;bottom:10px;padding:10px;border:1px solid black;background:white;z-index:999999;"><button id="btnDownloadAll">Download all</button></div>');
    document.getElementById('btnDownloadAll').onclick = function() {
        var links = document.querySelectorAll('a[href^="attachment.php?"]');
        for (var i = 0; i < links.length; i++) {
            var link = links[i];
            if (link.innerHTML.indexOf('.torrent') !== -1) {
                document.body.insertAdjacentHTML('beforeend', '<iframe id="pnlDownload" style="display:none;" src="'+link.href+'" onload="this.parent.removeChild(this);"></iframe>');
                console.log(link.href);
            }
        }
    };
})();