tubearchivist / browser-extension

Tube Archivist Companion for your Browser
GNU General Public License v3.0
150 stars 19 forks source link

fix port parsing logic #11

Closed bakkot closed 1 year ago

bakkot commented 1 year ago
let url = new URL('https://example.com:443');
console.log(url.port); // empty string, because it's the default for the protocol
console.log(url.protocol); // 'https:' - note the colon, which was missing in the logic below