phunkyfish Posted May 17, 2007 Report Share Posted May 17, 2007 Hopefully these changes will get added to the official extension soon but until then here's a version of the extension that supports HTTPS.Modified extension now available at: http://www.phunkyfish.com/article/10/utorrenthttpsThe checkbox in the Options dialog has a number of dots after you click on it. Have no idea why!Changes: Added a "UseHTTPS" checkbox to the options dialog. Added a new function "gUTorrentPrefs.getConnectionType()" which returns "http" or "https" depending on whether or not the the checkbox is ticked.Here are the changes I made:uTorrentStatus.js----------------- request.open("GET", "http://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/?list=1", true, gUTorrentPrefs.adminUsername(), gUTorrentPrefs.adminPassword());to request.open("GET", gUTorrentPrefs.getConnectionType() + "://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/?list=1", true, gUTorrentPrefs.adminUsername(), gUTorrentPrefs.adminPassword());dragObserver.js--------------- request.open("POST", "http://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/?action=add-file", true, gUTorrentPrefs.adminUsername(), gUTorrentPrefs.adminPassword());to request.open("POST", gUTorrentPrefs.getConnectionType() + "://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/?action=add-file", true, gUTorrentPrefs.adminUsername(), gUTorrentPrefs.adminPassword());uTorrentSidebar.xul------------------- var uri = "http://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/";to var uri = gUTorrentPrefs.getConnectionType() + "://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/";prefs.js------- serverPort: function() { return this.prefs.getIntPref("uTorrent.serverPort"); },added the following below the above line useHTTPS: function() { return this.prefs.getBoolPref("uTorrent.useHTTPS"); }, getConnectionType: function() { return (this.prefs.getBoolPref("uTorrent.useHTTPS")) ? "https" : "http"; },options.xul---------- <preference id="serverPort" name="uTorrent.serverPort" type="int"/>added the following below the above line <preference id="useHTTPS" name="uTorrent.useHTTPS" type="bool"/>AND <row> <label value="Server port" control="txtServerPort"/> <textbox id="txtServerPort" flex="1" type="number" preference="serverPort"/> </row>added the following lines below the lines above <row> <label value="Use HTTPS" control="boolUseHTTPS"/> <checkbox id="boolUseHTTPS" flex="1" preference="useHTTPS"/> </row> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.