mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-13 01:57:07 -07:00
WebUI: use idiomatic string methods
This commit is contained in:
parent
f34787e6ba
commit
5eec0c0213
6 changed files with 11 additions and 11 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue