WebUI: enforce coding style

Actually, not all of them but some that can be enforced by eslint.
The changes are made by eslint with minor manual tweaking.

PR #17046.
This commit is contained in:
Chocobo1 2022-05-18 11:37:05 +08:00 committed by GitHub
parent 5af96943e3
commit dbfd6a2368
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 155 additions and 98 deletions

View file

@ -165,7 +165,8 @@ window.qBittorrent.PropTrackers = (function() {
});
const addTrackerFN = function() {
if (current_hash.length === 0) return;
if (current_hash.length === 0)
return;
new MochaUI.Window({
id: 'trackersPage',
title: "QBT_TR(Trackers addition dialog)QBT_TR[CONTEXT=TrackersAdditionDialog]",
@ -186,7 +187,8 @@ window.qBittorrent.PropTrackers = (function() {
};
const editTrackerFN = function(element) {
if (current_hash.length === 0) return;
if (current_hash.length === 0)
return;
const trackerUrl = encodeURIComponent(element.childNodes[1].innerText);
new MochaUI.Window({
@ -209,7 +211,8 @@ window.qBittorrent.PropTrackers = (function() {
};
const removeTrackerFN = function(element) {
if (current_hash.length === 0) return;
if (current_hash.length === 0)
return;
const selectedTrackers = torrentTrackersTable.selectedRowsIds();
new Request({