Sha256: 61fd7a6f6ccee47599658f5e712f06d51905fd2b1b9a6c0d10c7b7d68bf6c75b

Contents?: true

Size: 700 Bytes

Versions: 3

Compression:

Stored size: 700 Bytes

Contents

pd = console.log;

if(plugin.canChangeMenu())
{
	theWebUI.saberDownload = function(id){
    theWebUI.perform("saberDownload");
  }

	plugin.createMenu = theWebUI.createMenu;
	theWebUI.createMenu = function( e, id )
	{
		plugin.createMenu.call(this, e, id);
		if(plugin.enabled)
		{
			var el = theContextMenu.get("Update trackers")
			if( el )
				theContextMenu.add( el, ["Saber Download", "theWebUI.saberDownload('"+id+"')"]);
		}
	}
}

rTorrentStub.prototype.saberDownload = function()
{
  var cmd = new rXMLRPCCommand("execute");
  cmd.addParameter("string", "/usr/bin/saber-drb_add");
  cmd.addParameter("string", this.hashes.join(","));
  this.commands.push(cmd);
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
saber-0.0.7 rutorrent/init.js
saber-0.0.6 rutorrent/init.js
saber-0.0.4 rutorrent/init.js