Create-plugin & torrent pulldown

dsouvik215

Member
May 25, 2018
896
0
16
If anyone would be kind enough to give some pointers since my javascript ain't really that good.

I tried modifying the create-plugin init.js and looked at the source. Just like the pulldown-menu for the piece-size, I would like a pulldown-menu for X amount of pre-defined tracker-URL's.

Modified code:
Quote
var TrackerURL =
"<label>"+theUILang.TrackerURL+": </label>"+
"<select id='piece_size' name='piece_size'>"+
"<option value=\"http://www.1.com\">Tracker1"+theUILang.TrackerURL+"</option>"+
"<option value=\"http://www.1.com\">Tracker2"+theUILang.TrackerURL+"</option>"+
"<option value=\"http://www.1.com\">Tracker3"+theUILang.TrackerURL.KB+"</option>"+
"</select>";
if(this.hideTrackerURL)
TrackerURL = "";

theDialogManager.make("tcreate",theUILang.CreateNewTorrent,
"<div class='cont fxcaret'>"+
"<fieldset>"+
"<legend>"+theUILang.SelectSource+"</legend>"+
"<input type='text' id='path_edit' name='path_edit' class='TextboxLarge' autocomplete='off'/>"+
"<input type=button value='...' id='browse_path' class='Button'>
"+
"</fieldset>"+
"<fieldset>"+
"<legend>"+theUILang.TorrentProperties+"</legend>"+
"<label>"+theUILang.Trackers+": </label>"+
TrackerURL+
"<label>"+theUILang.Comment+": </label>"+
"<input type='text' id='comment' name='comment' class='TextboxLarge'/>
"+
pieceSize+
"</fieldset>"+​


Doesn't seem to work and ENTIRE ruTorrent-UI refuses to load giving all sorts of errors.

Anyone spotting the coding-error or does it comprise much much much more than this?