Rutorrent GetMulitpleTorrents

gets multiple torrents which you select in rutorrent

目前為 2018-11-12 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Rutorrent GetMulitpleTorrents
// @namespace   rutorrent
// @description gets multiple torrents which you select in rutorrent
// @include     http://*ruTorrent*
// @include     https://*ruTorrent*
// @version     2.6
// @grant       none
// ==/UserScript==

var nav_bar = document.getElementById("t");

var unfoldLink = document.createElement('a');
var newHTML = document.createElement ('div');
newHTML.id = 'moved';
unfoldLink.appendChild(newHTML);
unfoldLink.id = 'grab';
unfoldLink.title = 'Download selected torrent files';
unfoldLink.href = 'javascript:void(0)';

nav_bar.appendChild(unfoldLink);

document.getElementById('grab').addEventListener('click', getTorrents, false);


function getTorrents(){
  var selected = document.getElementsByClassName("selected");
  for (var i=0;i<(selected.length-3);i++){
    window.open(window.location + '/plugins/source/action.php?hash=' + selected[i].id);
  }
}