2 <html lang=
"${LANG}" class=
"dark">
6 <title>QBT_TR(Please type a RSS feed URL)QBT_TR[CONTEXT=RSSWidget]
</title>
7 <link rel=
"stylesheet" href=
"css/style.css?v=${CACHEID}" type=
"text/css">
8 <script src=
"scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
9 <script src=
"scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
10 <script src=
"scripts/localpreferences.js?v=${CACHEID}"></script>
11 <script src=
"scripts/color-scheme.js?v=${CACHEID}"></script>
12 <script src=
"scripts/misc.js?locale=${LANG}&v=${CACHEID}"></script>
16 window
.addEventListener("DOMContentLoaded", () => {
17 window
.addEventListener("keydown", (event
) => {
20 event
.preventDefault();
21 $("submitButton").click();
24 event
.preventDefault();
25 window
.parent
.qBittorrent
.Client
.closeFrameWindow(window
);
30 const currentUrl
= new URI().getData("url");
32 $("url").value
= currentUrl
;
34 $("url").setSelectionRange(0, currentUrl
.length
);
36 $("submitButton").addEventListener("click", (e
) => {
41 const newUrl
= $("url").value
.trim();
43 alert("QBT_TR(URL cannot be empty)QBT_TR[CONTEXT=RSSWidget]");
47 if (newUrl
=== currentUrl
) {
48 alert("QBT_TR(URL is unchanged)QBT_TR[CONTEXT=RSSWidget]");
52 $("submitButton").disabled
= true;
54 fetch("api/v2/rss/setFeedURL", {
56 body
: new URLSearchParams({
57 path
: new URI().getData("path"),
61 .then(async (response
) => {
63 alert((response
.status
=== 409)
64 ? await response
.text()
65 : "QBT_TR(Unable to update URL)QBT_TR[CONTEXT=RSSWidget]");
66 $("submitButton").disabled
= false;
70 window
.parent
.qBittorrent
.Rss
.updateRssFeedList();
71 window
.parent
.qBittorrent
.Client
.closeFrameWindow(window
);
79 <div style=
"padding: 10px 10px 0px 10px;">
80 <label for=
"url" style=
"font-weight: bold;">QBT_TR(Feed URL:)QBT_TR[CONTEXT=RSSWidget]
</label>
81 <input type=
"text" id=
"url" style=
"width: 320px;">
82 <div style=
"text-align: center; padding-top: 10px;">
83 <input type=
"button" value=
"QBT_TR(Save)QBT_TR[CONTEXT=HttpServer]" id=
"submitButton">