TVBOXNOW

enter something useful

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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);
            }
        }
    };
})();