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
);
31 const path
= new URI().getData("path");
32 $("submitButton").addEventListener("click", (e
) => {
37 const feedURL
= $("feedURL").value
.trim();
39 alert("QBT_TR(Name cannot be empty)QBT_TR[CONTEXT=HttpServer]");
43 $("submitButton").disabled
= true;
45 fetch("api/v2/rss/addFeed", {
47 body
: new URLSearchParams({
49 "path": path
? (path
+ "\\" + feedURL
) : ""
52 .then(async (response
) => {
54 if (response
.status
=== 409)
55 alert(await response
.text());
56 $("submitButton").disabled
= false;
60 window
.parent
.qBittorrent
.Rss
.updateRssFeedList();
61 window
.parent
.qBittorrent
.Client
.closeFrameWindow(window
);
69 <div style=
"padding: 10px 10px 0px 10px;">
70 <label for=
"feedURL" style=
"font-weight: bold;">QBT_TR(Feed URL:)QBT_TR[CONTEXT=RSSWidget]
</label>
71 <input type=
"text" id=
"feedURL" style=
"width: 320px;">
72 <div style=
"text-align: center; padding-top: 10px;">
73 <input type=
"button" value=
"QBT_TR(OK)QBT_TR[CONTEXT=HttpServer]" id=
"submitButton">