Filelist.js

Filelist script for Ace Strem Magic Player. Beta version

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://update.greasyfork.org/scripts/429252/949635/Filelistjs.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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          Filelist script for Ace Strem Magic Player
// @namespace     XXN
// @description   Filelist script for Ace Strem Magic Player. Beta version
// @include       *
// @copyright     XXN
// @author        XXN
// @version       1.0.0
// @license       GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @grant         GM_log
// ==/UserScript==
 


magicplayer.addHandler("filelist", function(features) {
    GM_log("start filelist: features=" + JSON.stringify(features));
    magicplayer.loadPackage("ts-white-screen");
    
    var $ = TorrentStream.jQuery;
        
		var d = document;
		var body = d.body;
		$('a[href^="/download.php?id="]', d).each(function(e) {
			var url = $(this).attr('href');
			$tr = $('<tr class="filelist"><td class="header2" align="right">P2P Online:</td></tr>', d)
			$td = $('<td class="lista" valign="middle"></td>', d);
			var button = magicplayer.renderButton({
					button: {
						style: "text",
						caretPosition: "left",
						caretPadding: 10,
						text: "You will play online the content of the torrent-file in the original quality",
					},
					dataType: 'torrentUrl',
					data: "http://filelist.io"+url,
					downloadTorrent: true
			});
			$(button).addClass('fixed');
			$td.append(button);
			$tr.append($td);
			$(this).parent().parent().parent().parent().after($tr);
		});
});