summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/js/deluge-all/Deluge.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 15:05:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 16:15:47 +0000
commitb686174b07bd56af4e5ffaa23c24f27f417fc305 (patch)
tree1ce335620d99341d94e88c159c0b9b0f6f0de5a0 /deluge/ui/web/js/deluge-all/Deluge.js
parentAdding debian version 2.0.3-4. (diff)
downloaddeluge-b686174b07bd56af4e5ffaa23c24f27f417fc305.tar.xz
deluge-b686174b07bd56af4e5ffaa23c24f27f417fc305.zip
Merging upstream version 2.1.1 (Closes: #1026291).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/ui/web/js/deluge-all/Deluge.js')
-rw-r--r--deluge/ui/web/js/deluge-all/Deluge.js25
1 files changed, 9 insertions, 16 deletions
diff --git a/deluge/ui/web/js/deluge-all/Deluge.js b/deluge/ui/web/js/deluge-all/Deluge.js
index 31b9947..260ad97 100644
--- a/deluge/ui/web/js/deluge-all/Deluge.js
+++ b/deluge/ui/web/js/deluge-all/Deluge.js
@@ -25,21 +25,14 @@ Ext.state.Manager.setProvider(
// Add some additional functions to ext and setup some of the
// configurable parameters
Ext.apply(Ext, {
- escapeHTML: function(text) {
- text = String(text)
- .replace('<', '&lt;')
- .replace('>', '&gt;');
- return text.replace('&', '&amp;');
- },
-
- isObjectEmpty: function(obj) {
+ isObjectEmpty: function (obj) {
for (var i in obj) {
return false;
}
return true;
},
- areObjectsEqual: function(obj1, obj2) {
+ areObjectsEqual: function (obj1, obj2) {
var equal = true;
if (!obj1 || !obj2) return false;
for (var i in obj1) {
@@ -50,7 +43,7 @@ Ext.apply(Ext, {
return equal;
},
- keys: function(obj) {
+ keys: function (obj) {
var keys = [];
for (var i in obj)
if (obj.hasOwnProperty(i)) {
@@ -59,7 +52,7 @@ Ext.apply(Ext, {
return keys;
},
- values: function(obj) {
+ values: function (obj) {
var values = [];
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
@@ -69,7 +62,7 @@ Ext.apply(Ext, {
return values;
},
- splat: function(obj) {
+ splat: function (obj) {
var type = Ext.type(obj);
return type ? (type != 'array' ? [obj] : obj) : [];
},
@@ -106,7 +99,7 @@ Ext.apply(Deluge, {
* @param {String} text The text to display on the bar
* @param {Number} modified Amount to subtract from the width allowing for fixes
*/
- progressBar: function(progress, width, text, modifier) {
+ progressBar: function (progress, width, text, modifier) {
modifier = Ext.value(modifier, 10);
var progressWidth = ((width / 100.0) * progress).toFixed(0);
var barWidth = progressWidth - 1;
@@ -125,7 +118,7 @@ Ext.apply(Deluge, {
* Constructs a new instance of the specified plugin.
* @param {String} name The plugin name to create
*/
- createPlugin: function(name) {
+ createPlugin: function (name) {
return new Deluge.pluginStore[name]();
},
@@ -133,7 +126,7 @@ Ext.apply(Deluge, {
* Check to see if a plugin has been registered.
* @param {String} name The plugin name to check
*/
- hasPlugin: function(name) {
+ hasPlugin: function (name) {
return Deluge.pluginStore[name] ? true : false;
},
@@ -142,7 +135,7 @@ Ext.apply(Deluge, {
* @param {String} name The plugin name to register
* @param {Plugin} plugin The plugin to register
*/
- registerPlugin: function(name, plugin) {
+ registerPlugin: function (name, plugin) {
Deluge.pluginStore[name] = plugin;
},
});