mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
WebUI: use idiomatic string methods
This commit is contained in:
@@ -1492,7 +1492,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
const handleDownloadParam = () => {
|
||||
// Extract torrent URL from download param in WebUI URL hash
|
||||
const downloadHash = "#download=";
|
||||
if (location.hash.indexOf(downloadHash) !== 0)
|
||||
if (!location.hash.startsWith(downloadHash))
|
||||
return;
|
||||
|
||||
const url = decodeURIComponent(location.hash.substring(downloadHash.length));
|
||||
|
||||
Reference in New Issue
Block a user