We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f3dd81 commit 4e34cd4Copy full SHA for 4e34cd4
popup/popup.js
@@ -388,8 +388,13 @@ let $hoverLink = document.createElement('div');
388
$hoverLink.className = 'mouseover-link';
389
const hoverLinks = ($video) => {
390
for (let $link of $video.querySelectorAll('a')) {
391
- let url = decodeURIComponent($link.href)
392
- .replace(/^https?:\/\/(www\.)?/, '');
+ let href = $link.href;
+ try {
393
+ href = decodeURIComponent(href);
394
+ } catch (err) {
395
+ // do nothing
396
+ }
397
+ let url = href.replace(/^https?:\/\/(www\.)?/, '');
398
if ($link.target === '_blank') { url += ' ⇗'; }
399
$link.addEventListener('mouseover', (e) => {
400
e.stopPropagation();
0 commit comments