From db4272b78cc0ef7d93690c12fe75dffd9222401c Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Mon, 14 Jul 2025 20:17:56 -0700 Subject: [PATCH] WebUI: Apply cache id to all loaded resources This includes html files and js/css assets loaded via MooTools. --- src/webui/www/private/scripts/client.js | 33 +++++++---- src/webui/www/private/scripts/mocha-init.js | 45 +++++++++----- src/webui/www/private/scripts/monkeypatch.js | 59 +++++++++++++++++++ src/webui/www/private/scripts/prop-files.js | 4 +- src/webui/www/private/scripts/prop-peers.js | 2 +- .../www/private/scripts/prop-trackers.js | 4 +- .../www/private/scripts/prop-webseeds.js | 4 +- src/webui/www/private/scripts/search.js | 2 +- src/webui/www/private/views/rss.html | 11 ++-- .../www/private/views/rssDownloader.html | 8 +-- .../www/private/views/searchplugins.html | 2 +- .../www/private/views/torrentcreator.html | 2 +- 12 files changed, 129 insertions(+), 47 deletions(-) diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index 805d91914..daaf952af 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -338,7 +338,7 @@ window.addEventListener("DOMContentLoaded", (event) => { left: 0 }, loadMethod: "xhr", - contentURL: "views/filters.html", + contentURL: "views/filters.html?v=${CACHEID}", onContentLoaded: () => { highlightSelectedStatus(); }, @@ -1433,9 +1433,9 @@ window.addEventListener("DOMContentLoaded", (event) => { left: 0 }, loadMethod: "xhr", - contentURL: "views/search.html", + contentURL: "views/search.html?v=${CACHEID}", require: { - js: ["scripts/search.js"], + js: ["scripts/search.js?v=${CACHEID}"], onload: () => { isSearchPanelLoaded = true; }, @@ -1458,7 +1458,7 @@ window.addEventListener("DOMContentLoaded", (event) => { left: 0 }, loadMethod: "xhr", - contentURL: "views/rss.html", + contentURL: "views/rss.html?v=${CACHEID}", onContentLoaded: () => { isRssPanelLoaded = true; }, @@ -1480,15 +1480,15 @@ window.addEventListener("DOMContentLoaded", (event) => { left: 0 }, loadMethod: "xhr", - contentURL: "views/log.html", + contentURL: "views/log.html?v=${CACHEID}", require: { - css: ["css/vanillaSelectBox.css"], - js: ["scripts/lib/vanillaSelectBox.js"], + css: ["css/vanillaSelectBox.css?v=${CACHEID}"], + js: ["scripts/lib/vanillaSelectBox.js?v=${CACHEID}"], onload: () => { isLogPanelLoaded = true; }, }, - tabsURL: "views/logTabs.html", + tabsURL: "views/logTabs.html?v=${CACHEID}", tabsOnload: () => { MochaUI.initializeTabs("panelTabs"); @@ -1530,7 +1530,7 @@ window.addEventListener("DOMContentLoaded", (event) => { left: 0 }, loadMethod: "xhr", - contentURL: "views/transferlist.html", + contentURL: "views/transferlist.html?v=${CACHEID}", onContentLoaded: () => { handleDownloadParam(); updateMainData(); @@ -1557,9 +1557,15 @@ window.addEventListener("DOMContentLoaded", (event) => { bottom: 0, left: 0 }, - contentURL: "views/properties.html", + contentURL: "views/properties.html?v=${CACHEID}", require: { - js: ["scripts/prop-general.js", "scripts/prop-trackers.js", "scripts/prop-peers.js", "scripts/prop-webseeds.js", "scripts/prop-files.js"], + js: [ + "scripts/prop-general.js?v=${CACHEID}", + "scripts/prop-trackers.js?v=${CACHEID}", + "scripts/prop-peers.js?v=${CACHEID}", + "scripts/prop-webseeds.js?v=${CACHEID}", + "scripts/prop-files.js?v=${CACHEID}" + ], onload: () => { updatePropertiesPanel = () => { switch (LocalPreferences.get("selected_properties_tab")) { @@ -1582,7 +1588,7 @@ window.addEventListener("DOMContentLoaded", (event) => { }; } }, - tabsURL: "views/propertiesToolbar.html", + tabsURL: "views/propertiesToolbar.html?v=${CACHEID}", tabsOnload: () => {}, // must be included, otherwise panel won't load properly onContentLoaded: function() { this.panelHeaderCollapseBoxEl.classList.add("invisible"); @@ -1687,7 +1693,7 @@ window.addEventListener("DOMContentLoaded", (event) => { icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer]", loadMethod: "iframe", - contentURL: "upload.html", + contentURL: "upload.html?v=${CACHEID}", addClass: "windowFrame", // fixes iframe scrolling on iOS Safari scrollbars: true, maximizable: false, @@ -1726,6 +1732,7 @@ window.addEventListener("DOMContentLoaded", (event) => { const id = "downloadPage"; const contentURL = new URL("download.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, urls: urls.map(encodeURIComponent).join("|") }); new MochaUI.Window({ diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index ec9edffe7..e9d7db268 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -196,6 +196,7 @@ const initializeWindows = () => { if (urls && (urls.length > 0)) { contentURL.search = new URLSearchParams({ + v: CACHEID, urls: urls.map(encodeURIComponent).join("|") }); } @@ -231,7 +232,7 @@ const initializeWindows = () => { icon: "images/torrent-creator.svg", title: "QBT_TR(Torrent Creator)QBT_TR[CONTEXT=TorrentCreator]", loadMethod: "xhr", - contentURL: "views/torrentcreator.html", + contentURL: "views/torrentcreator.html?v=${CACHEID}", scrollbars: true, maximizable: true, paddingVertical: 0, @@ -258,11 +259,11 @@ const initializeWindows = () => { title: "QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]", loadMethod: "xhr", toolbar: true, - contentURL: "views/preferences.html", + contentURL: "views/preferences.html?v=${CACHEID}", require: { - css: ["css/Tabs.css"] + css: ["css/Tabs.css?v=${CACHEID}"] }, - toolbarURL: "views/preferencesToolbar.html", + toolbarURL: "views/preferencesToolbar.html?v=${CACHEID}", maximizable: false, closable: true, paddingVertical: 0, @@ -284,7 +285,7 @@ const initializeWindows = () => { id: id, title: "QBT_TR(Manage Cookies)QBT_TR[CONTEXT=CookiesDialog]", loadMethod: "xhr", - contentURL: "views/cookies.html", + contentURL: "views/cookies.html?v=${CACHEID}", maximizable: false, paddingVertical: 0, paddingHorizontal: 0, @@ -306,7 +307,7 @@ const initializeWindows = () => { icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer]", loadMethod: "iframe", - contentURL: "upload.html", + contentURL: "upload.html?v=${CACHEID}", addClass: "windowFrame", // fixes iframe scrolling on iOS Safari scrollbars: true, maximizable: false, @@ -324,6 +325,7 @@ const initializeWindows = () => { globalUploadLimitFN = () => { const contentURL = new URL("speedlimit.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, hashes: "global", type: "upload", }); @@ -350,6 +352,7 @@ const initializeWindows = () => { const contentURL = new URL("speedlimit.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, hashes: hashes.join("|"), type: "upload", }); @@ -396,6 +399,7 @@ const initializeWindows = () => { const contentURL = new URL("shareratio.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, hashes: hashes.join("|"), // if all torrents have same share ratio, display that share ratio. else use the default orig: torrentsHaveSameShareRatio ? shareRatio : "" @@ -472,6 +476,7 @@ const initializeWindows = () => { globalDownloadLimitFN = () => { const contentURL = new URL("speedlimit.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, hashes: "global", type: "download", }); @@ -498,7 +503,7 @@ const initializeWindows = () => { icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Statistics)QBT_TR[CONTEXT=StatsDialog]", loadMethod: "xhr", - contentURL: "views/statistics.html", + contentURL: "views/statistics.html?v=${CACHEID}", maximizable: false, padding: 10, width: loadWindowWidth(id, 285), @@ -519,6 +524,7 @@ const initializeWindows = () => { const contentURL = new URL("speedlimit.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, hashes: hashes.join("|"), type: "download", }); @@ -550,7 +556,7 @@ const initializeWindows = () => { hashes: hashes, forceDeleteFiles: forceDeleteFiles }, - contentURL: "views/confirmdeletion.html", + contentURL: "views/confirmdeletion.html?v=${CACHEID}", onContentLoaded: (w) => { MochaUI.resizeWindow(w, { centered: true }); MochaUI.centerWindow(w); @@ -628,7 +634,7 @@ const initializeWindows = () => { hashes: hashes, enable: enableAutoTMM }, - contentURL: "views/confirmAutoTMM.html" + contentURL: "views/confirmAutoTMM.htm?v=${CACHEID}l" }); } else { @@ -660,7 +666,7 @@ const initializeWindows = () => { id: "confirmRecheckDialog", title: "QBT_TR(Recheck confirmation)QBT_TR[CONTEXT=confirmRecheckDialog]", data: { hashes: hashes }, - contentURL: "views/confirmRecheck.html" + contentURL: "views/confirmRecheck.htm?v=${CACHEID}l" }); } else { @@ -702,6 +708,7 @@ const initializeWindows = () => { const contentURL = new URL("setlocation.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, hashes: hashes.join("|"), path: encodeURIComponent(torrentsTable.getRow(hashes[0]).full_data.save_path) }); @@ -732,6 +739,7 @@ const initializeWindows = () => { const contentURL = new URL("rename.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, hash: hashes[0], name: row.full_data.name }); @@ -763,7 +771,7 @@ const initializeWindows = () => { title: "QBT_TR(Renaming)QBT_TR[CONTEXT=TransferListWidget]", data: { hash: hash, selectedRows: [] }, loadMethod: "xhr", - contentURL: "rename_files.html", + contentURL: "rename_files.html?v=${CACHEID}", scrollbars: false, resizable: true, maximizable: false, @@ -831,7 +839,7 @@ const initializeWindows = () => { hashes: hashes, isDeletingVisibleTorrents: true }, - contentURL: "views/confirmdeletion.html", + contentURL: "views/confirmdeletion.html?v=${CACHEID}", onContentLoaded: (w) => { MochaUI.resizeWindow(w, { centered: true }); MochaUI.centerWindow(w); @@ -867,6 +875,7 @@ const initializeWindows = () => { const contentURL = new URL("newcategory.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, action: "set", hashes: hashes.join("|") }); @@ -909,6 +918,7 @@ const initializeWindows = () => { createCategoryFN = () => { const contentURL = new URL("newcategory.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, action: "create" }); new MochaUI.Window({ @@ -930,6 +940,7 @@ const initializeWindows = () => { createSubcategoryFN = (category) => { const contentURL = new URL("newcategory.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, action: "createSubcategory", categoryName: `${category}/` }); @@ -952,6 +963,7 @@ const initializeWindows = () => { editCategoryFN = (category) => { const contentURL = new URL("newcategory.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, action: "edit", categoryName: category, savePath: categoryMap.get(category).savePath @@ -1016,6 +1028,7 @@ const initializeWindows = () => { const contentURL = new URL("newtag.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, action: "set", hashes: hashes.join("|") }); @@ -1064,6 +1077,7 @@ const initializeWindows = () => { createTagFN = () => { const contentURL = new URL("newtag.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, action: "create" }); new MochaUI.Window({ @@ -1118,6 +1132,7 @@ const initializeWindows = () => { const contentURL = new URL("confirmtrackerdeletion.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, host: trackerHost, urls: [...trackerMap.get(trackerHost).keys()].map(encodeURIComponent).join("|") }); @@ -1311,12 +1326,12 @@ const initializeWindows = () => { icon: "images/qbittorrent-tray.svg", title: "QBT_TR(About qBittorrent)QBT_TR[CONTEXT=AboutDialog]", loadMethod: "xhr", - contentURL: "views/about.html", + contentURL: "views/about.html?v=${CACHEID}", require: { - css: ["css/Tabs.css"] + css: ["css/Tabs.css?v=${CACHEID}"] }, toolbar: true, - toolbarURL: "views/aboutToolbar.html", + toolbarURL: "views/aboutToolbar.html?v=${CACHEID}", padding: 10, width: loadWindowWidth(id, 570), height: loadWindowHeight(id, 360), diff --git a/src/webui/www/private/scripts/monkeypatch.js b/src/webui/www/private/scripts/monkeypatch.js index a2aafd69f..b38d23367 100644 --- a/src/webui/www/private/scripts/monkeypatch.js +++ b/src/webui/www/private/scripts/monkeypatch.js @@ -39,6 +39,7 @@ window.qBittorrent.MonkeyPatch ??= (() => { const patch = () => { patchMootoolsDocumentId(); + patchMochaGetAsset(); }; const patchMootoolsDocumentId = () => { @@ -64,6 +65,64 @@ window.qBittorrent.MonkeyPatch ??= (() => { }; }; + /** + * Modified to support specifying an asset with a version query param (`?v=`) for cache busting + */ + const patchMochaGetAsset = () => { + MUI.Require.prototype.getAsset = (source, onload) => { + // If the asset is loaded, fire the onload function. + if (MUI.files[source] === "loaded") { + if (typeof onload === "function") + onload(); + return true; + } + + // If the asset is loading, wait until it is loaded and then fire the onload function. + // If asset doesn't load by a number of tries, fire onload anyway. + else if (MUI.files[source] === "loading") { + let tries = 0; + const checker = (function() { + tries++; + if ((MUI.files[source] === "loading") && (tries < "100")) + return; + $clear(checker); + if (typeof onload === "function") + onload(); + }).periodical(50); + } + + // If the asset is not yet loaded or loading, start loading the asset. + else { + MUI.files[source] = "loading"; + + const properties = { + onload: (onload !== "undefined") ? onload : $empty + }; + + // Add to the onload function + const oldonload = properties.onload; + properties.onload = () => { + MUI.files[source] = "loaded"; + if (oldonload) + oldonload(); + }; + + switch (source.match(/(\.\w+)(?:\?v=\w+)?$/)[1]) { + case ".js": + return Asset.javascript(source, properties); + case ".css": + return Asset.css(source, properties); + case ".jpg": + case ".png": + case ".gif": + return Asset.image(source, properties); + } + + alert(`The required file "${source}" could not be loaded`); + } + }; + }; + return exports(); })(); Object.freeze(window.qBittorrent.MonkeyPatch); diff --git a/src/webui/www/private/scripts/prop-files.js b/src/webui/www/private/scripts/prop-files.js index 238c94431..d1e6a5771 100644 --- a/src/webui/www/private/scripts/prop-files.js +++ b/src/webui/www/private/scripts/prop-files.js @@ -497,7 +497,7 @@ window.qBittorrent.PropFiles ??= (() => { icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Renaming)QBT_TR[CONTEXT=TorrentContentTreeView]", loadMethod: "iframe", - contentURL: `rename_file.html?hash=${hash}&isFolder=${node.isFolder}&path=${encodeURIComponent(path)}`, + contentURL: `rename_file.html?v=${CACHEID}&hash=${hash}&isFolder=${node.isFolder}&path=${encodeURIComponent(path)}`, scrollbars: false, resizable: true, maximizable: false, @@ -515,7 +515,7 @@ window.qBittorrent.PropFiles ??= (() => { title: "QBT_TR(Renaming)QBT_TR[CONTEXT=TorrentContentTreeView]", data: { hash: hash, selectedRows: torrentFilesTable.selectedRows }, loadMethod: "xhr", - contentURL: "rename_files.html", + contentURL: "rename_files.html?v=${CACHEID}", scrollbars: false, resizable: true, maximizable: false, diff --git a/src/webui/www/private/scripts/prop-peers.js b/src/webui/www/private/scripts/prop-peers.js index c318b49b4..80e58a8e9 100644 --- a/src/webui/www/private/scripts/prop-peers.js +++ b/src/webui/www/private/scripts/prop-peers.js @@ -139,7 +139,7 @@ window.qBittorrent.PropPeers ??= (() => { icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Add Peers)QBT_TR[CONTEXT=PeersAdditionDialog]", loadMethod: "iframe", - contentURL: `addpeers.html?hash=${hash}`, + contentURL: `addpeers.html?v=${CACHEID}&hash=${hash}`, scrollbars: false, resizable: false, maximizable: false, diff --git a/src/webui/www/private/scripts/prop-trackers.js b/src/webui/www/private/scripts/prop-trackers.js index 079a61673..62e690262 100644 --- a/src/webui/www/private/scripts/prop-trackers.js +++ b/src/webui/www/private/scripts/prop-trackers.js @@ -190,7 +190,7 @@ window.qBittorrent.PropTrackers ??= (() => { icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Add trackers)QBT_TR[CONTEXT=TrackersAdditionDialog]", loadMethod: "iframe", - contentURL: `addtrackers.html?hash=${current_hash}`, + contentURL: `addtrackers.html?v=${CACHEID}&hash=${current_hash}`, scrollbars: true, resizable: false, maximizable: false, @@ -215,7 +215,7 @@ window.qBittorrent.PropTrackers ??= (() => { icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Tracker editing)QBT_TR[CONTEXT=TrackerListWidget]", loadMethod: "iframe", - contentURL: `edittracker.html?hash=${current_hash}&url=${trackerUrl}`, + contentURL: `edittracker.html?v=${CACHEID}&hash=${current_hash}&url=${trackerUrl}`, scrollbars: true, resizable: false, maximizable: false, diff --git a/src/webui/www/private/scripts/prop-webseeds.js b/src/webui/www/private/scripts/prop-webseeds.js index 5b60e94d1..495fed0f4 100644 --- a/src/webui/www/private/scripts/prop-webseeds.js +++ b/src/webui/www/private/scripts/prop-webseeds.js @@ -152,7 +152,7 @@ window.qBittorrent.PropWebseeds ??= (() => { id: "webseedsPage", title: "QBT_TR(Add web seeds)QBT_TR[CONTEXT=HttpServer]", loadMethod: "iframe", - contentURL: `addwebseeds.html?hash=${current_hash}`, + contentURL: `addwebseeds.html?v=${CACHEID}&hash=${current_hash}`, scrollbars: true, resizable: false, maximizable: false, @@ -181,7 +181,7 @@ window.qBittorrent.PropWebseeds ??= (() => { id: "webseedsPage", title: "QBT_TR(Web seed editing)QBT_TR[CONTEXT=PropertiesWidget]", loadMethod: "iframe", - contentURL: `editwebseed.html?hash=${current_hash}&url=${encodeURIComponent(webseedUrl)}`, + contentURL: `editwebseed.html?v=${CACHEID}&hash=${current_hash}&url=${encodeURIComponent(webseedUrl)}`, scrollbars: true, resizable: false, maximizable: false, diff --git a/src/webui/www/private/scripts/search.js b/src/webui/www/private/scripts/search.js index bff6030eb..51915e62f 100644 --- a/src/webui/www/private/scripts/search.js +++ b/src/webui/www/private/scripts/search.js @@ -578,7 +578,7 @@ window.qBittorrent.Search ??= (() => { title: "QBT_TR(Search plugins)QBT_TR[CONTEXT=PluginSelectDlg]", icon: "images/qbittorrent-tray.svg", loadMethod: "xhr", - contentURL: "views/searchplugins.html", + contentURL: "views/searchplugins.html?v=${CACHEID}", scrollbars: false, maximizable: false, paddingVertical: 0, diff --git a/src/webui/www/private/views/rss.html b/src/webui/www/private/views/rss.html index 61122a048..e733796be 100644 --- a/src/webui/www/private/views/rss.html +++ b/src/webui/www/private/views/rss.html @@ -345,7 +345,7 @@ icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Please type a RSS feed URL)QBT_TR[CONTEXT=RSSWidget]", loadMethod: "iframe", - contentURL: `newfeed.html?path=${encodeURIComponent(path)}`, + contentURL: `newfeed.html?v=${CACHEID}&path=${encodeURIComponent(path)}`, scrollbars: false, resizable: false, maximizable: false, @@ -373,7 +373,7 @@ icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Please choose a folder name)QBT_TR[CONTEXT=RSSWidget]", loadMethod: "iframe", - contentURL: `newfolder.html?path=${encodeURIComponent(path)}`, + contentURL: `newfolder.html?v=${CACHEID}&path=${encodeURIComponent(path)}`, scrollbars: false, resizable: false, maximizable: false, @@ -787,7 +787,7 @@ icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Please choose a new name for this RSS feed)QBT_TR[CONTEXT=RSSWidget]", loadMethod: "iframe", - contentURL: `rename_feed.html?oldPath=${encodeURIComponent(oldPath)}`, + contentURL: `rename_feed.html?v=${CACHEID}&oldPath=${encodeURIComponent(oldPath)}`, scrollbars: false, resizable: false, maximizable: false, @@ -799,6 +799,7 @@ const editUrl = (path, url) => { const contentURL = new URL("editfeedurl.html", window.location); contentURL.search = new URLSearchParams({ + v: CACHEID, path: path, url: url }); @@ -823,7 +824,7 @@ icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=RSSWidget]", loadMethod: "iframe", - contentURL: `confirmfeeddeletion.html?paths=${encodeURIComponent(encodedPaths.join("|"))}`, + contentURL: `confirmfeeddeletion.html?v=${CACHEID}&paths=${encodeURIComponent(encodedPaths.join("|"))}`, scrollbars: false, resizable: false, maximizable: false, @@ -945,7 +946,7 @@ icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Rss Downloader)QBT_TR[CONTEXT=AutomatedRssDownloader]", loadMethod: "xhr", - contentURL: "views/rssDownloader.html", + contentURL: "views/rssDownloader.html?v=${CACHEID}", maximizable: false, width: loadWindowWidth(id, 800, false), height: loadWindowHeight(id, 650, false), diff --git a/src/webui/www/private/views/rssDownloader.html b/src/webui/www/private/views/rssDownloader.html index 9fabdc9e7..c25f1ad7e 100644 --- a/src/webui/www/private/views/rssDownloader.html +++ b/src/webui/www/private/views/rssDownloader.html @@ -532,7 +532,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also icon: "images/qbittorrent-tray.svg", title: "QBT_TR(New rule name)QBT_TR[CONTEXT=AutomatedRssDownloader]", loadMethod: "iframe", - contentURL: "newrule.html", + contentURL: "newrule.html?v=${CACHEID}", scrollbars: false, resizable: false, maximizable: false, @@ -547,7 +547,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Rule renaming)QBT_TR[CONTEXT=AutomatedRssDownloader]", loadMethod: "iframe", - contentURL: `rename_rule.html?rule=${encodeURIComponent(rule)}`, + contentURL: `rename_rule.html?v=${CACHEID}&rule=${encodeURIComponent(rule)}`, scrollbars: false, resizable: false, maximizable: false, @@ -570,7 +570,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Rule deletion confirmation)QBT_TR[CONTEXT=AutomatedRssDownloader]", loadMethod: "iframe", - contentURL: `confirmruledeletion.html?rules=${encodeURIComponent(encodedRules.join("|"))}`, + contentURL: `confirmruledeletion.html?v=${CACHEID}&rules=${encodeURIComponent(encodedRules.join("|"))}`, scrollbars: false, resizable: false, maximizable: false, @@ -586,7 +586,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also icon: "images/qbittorrent-tray.svg", title: "QBT_TR(New rule name)QBT_TR[CONTEXT=AutomatedRssDownloader]", loadMethod: "iframe", - contentURL: `confirmruleclear.html?rules=${encodeURIComponent(encodedRules.join("|"))}`, + contentURL: `confirmruleclear.html?v=${CACHEID}&rules=${encodeURIComponent(encodedRules.join("|"))}`, scrollbars: false, resizable: false, maximizable: false, diff --git a/src/webui/www/private/views/searchplugins.html b/src/webui/www/private/views/searchplugins.html index 770ebedc0..708ee5cf7 100644 --- a/src/webui/www/private/views/searchplugins.html +++ b/src/webui/www/private/views/searchplugins.html @@ -118,7 +118,7 @@ icon: "images/qbittorrent-tray.svg", title: "QBT_TR(Install plugin)QBT_TR[CONTEXT=PluginSourceDlg]", loadMethod: "xhr", - contentURL: "views/installsearchplugin.html", + contentURL: "views/installsearchplugin.html?v=${CACHEID}", scrollbars: false, resizable: false, maximizable: false, diff --git a/src/webui/www/private/views/torrentcreator.html b/src/webui/www/private/views/torrentcreator.html index 02f00d95d..8d24feec0 100644 --- a/src/webui/www/private/views/torrentcreator.html +++ b/src/webui/www/private/views/torrentcreator.html @@ -165,7 +165,7 @@ icon: "images/list-add.svg", title: "QBT_TR(Create New Torrent)QBT_TR[CONTEXT=TorrentCreator]", loadMethod: "xhr", - contentURL: "views/createtorrent.html", + contentURL: "views/createtorrent.html?v=${CACHEID}", scrollbars: true, maximizable: false, closable: true,