mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-10 01:22:31 -06:00
WebUI: Use native function for selecting elements by ID
This commit is contained in:
@@ -36,37 +36,37 @@
|
||||
// Tabs
|
||||
MochaUI.initializeTabs("preferencesTabs");
|
||||
|
||||
$("PrefBehaviorLink").addEventListener("click", (e) => {
|
||||
document.getElementById("PrefBehaviorLink").addEventListener("click", (e) => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".PrefTab"), (tab => tab.classList.add("invisible")));
|
||||
$("BehaviorTab").classList.remove("invisible");
|
||||
document.getElementById("BehaviorTab").classList.remove("invisible");
|
||||
});
|
||||
$("PrefDownloadsLink").addEventListener("click", (e) => {
|
||||
document.getElementById("PrefDownloadsLink").addEventListener("click", (e) => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".PrefTab"), (tab => tab.classList.add("invisible")));
|
||||
$("DownloadsTab").classList.remove("invisible");
|
||||
document.getElementById("DownloadsTab").classList.remove("invisible");
|
||||
});
|
||||
$("PrefConnectionLink").addEventListener("click", (e) => {
|
||||
document.getElementById("PrefConnectionLink").addEventListener("click", (e) => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".PrefTab"), (tab => tab.classList.add("invisible")));
|
||||
$("ConnectionTab").classList.remove("invisible");
|
||||
document.getElementById("ConnectionTab").classList.remove("invisible");
|
||||
});
|
||||
$("PrefSpeedLink").addEventListener("click", (e) => {
|
||||
document.getElementById("PrefSpeedLink").addEventListener("click", (e) => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".PrefTab"), (tab => tab.classList.add("invisible")));
|
||||
$("SpeedTab").classList.remove("invisible");
|
||||
document.getElementById("SpeedTab").classList.remove("invisible");
|
||||
});
|
||||
$("PrefBittorrentLink").addEventListener("click", (e) => {
|
||||
document.getElementById("PrefBittorrentLink").addEventListener("click", (e) => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".PrefTab"), (tab => tab.classList.add("invisible")));
|
||||
$("BittorrentTab").classList.remove("invisible");
|
||||
document.getElementById("BittorrentTab").classList.remove("invisible");
|
||||
});
|
||||
$("PrefRSSLink").addEventListener("click", (e) => {
|
||||
document.getElementById("PrefRSSLink").addEventListener("click", (e) => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".PrefTab"), (tab => tab.classList.add("invisible")));
|
||||
$("RSSTab").classList.remove("invisible");
|
||||
document.getElementById("RSSTab").classList.remove("invisible");
|
||||
});
|
||||
$("PrefWebUILink").addEventListener("click", (e) => {
|
||||
document.getElementById("PrefWebUILink").addEventListener("click", (e) => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".PrefTab"), (tab => tab.classList.add("invisible")));
|
||||
$("WebUITab").classList.remove("invisible");
|
||||
document.getElementById("WebUITab").classList.remove("invisible");
|
||||
});
|
||||
$("PrefAdvancedLink").addEventListener("click", (e) => {
|
||||
document.getElementById("PrefAdvancedLink").addEventListener("click", (e) => {
|
||||
Array.prototype.forEach.call(document.querySelectorAll(".PrefTab"), (tab => tab.classList.add("invisible")));
|
||||
$("AdvancedTab").classList.remove("invisible");
|
||||
document.getElementById("AdvancedTab").classList.remove("invisible");
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user