WebUI: enforce string quotes coding style

This commit is contained in:
Chocobo1
2024-05-27 22:50:17 +08:00
parent 6d073771ca
commit cb90b6769c
58 changed files with 3522 additions and 3514 deletions

View File

@@ -26,7 +26,7 @@
* exception statement from your version.
*/
'use strict';
"use strict";
if (window.qBittorrent === undefined) {
window.qBittorrent = {};
@@ -64,9 +64,9 @@ window.qBittorrent.PropWebseeds = (function() {
},
updateRow: function(tr, row) {
const tds = tr.getElements('td');
const tds = tr.getElements("td");
for (let i = 0; i < row.length; ++i) {
tds[i].set('html', row[i]);
tds[i].set("html", row[i]);
}
return true;
},
@@ -79,11 +79,11 @@ window.qBittorrent.PropWebseeds = (function() {
return;
}
//this.removeRow(id);
const tr = new Element('tr');
const tr = new Element("tr");
this.rows.set(url, tr);
for (let i = 0; i < row.length; ++i) {
const td = new Element('td');
td.set('html', row[i]);
const td = new Element("td");
td.set("html", row[i]);
td.injectInside(tr);
}
tr.injectInside(this.table);
@@ -94,8 +94,8 @@ window.qBittorrent.PropWebseeds = (function() {
let loadWebSeedsDataTimer;
const loadWebSeedsData = function() {
if ($('prop_webseeds').hasClass('invisible')
|| $('propertiesPanel_collapseToggle').hasClass('panel-expand')) {
if ($("prop_webseeds").hasClass("invisible")
|| $("propertiesPanel_collapseToggle").hasClass("panel-expand")) {
// Tab changed, don't do anything
return;
}
@@ -110,18 +110,18 @@ window.qBittorrent.PropWebseeds = (function() {
wsTable.removeAllRows();
current_hash = new_hash;
}
const url = new URI('api/v2/torrents/webseeds?hash=' + current_hash);
const url = new URI("api/v2/torrents/webseeds?hash=" + current_hash);
new Request.JSON({
url: url,
method: 'get',
method: "get",
noCache: true,
onFailure: function() {
$('error_div').set('html', 'QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]');
$("error_div").set("html", "QBT_TR(qBittorrent client is not reachable)QBT_TR[CONTEXT=HttpServer]");
clearTimeout(loadWebSeedsDataTimer);
loadWebSeedsDataTimer = loadWebSeedsData.delay(20000);
},
onSuccess: function(webseeds) {
$('error_div').set('html', '');
$("error_div").set("html", "");
if (webseeds) {
// Update WebSeeds data
webseeds.each(function(webseed) {
@@ -146,7 +146,7 @@ window.qBittorrent.PropWebseeds = (function() {
};
const wsTable = new webseedsDynTable();
wsTable.setup($('webseedsTable'));
wsTable.setup($("webseedsTable"));
return exports();
})();