From 9d75b13886cd6ef08edf84cb2bca90a68a4c9823 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 12 Jan 2023 23:35:51 +0700 Subject: [PATCH] add link text to title for channel dl button --- extension/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extension/script.js b/extension/script.js index 0a24bf8..7338588 100644 --- a/extension/script.js +++ b/extension/script.js @@ -167,11 +167,11 @@ function buildDlLink(channelContainer) { }); dlLink.addEventListener('mouseover', e => { let subText; + let currentLocation = window.location.href; if (window.location.pathname === '/watch') { - let currentLocation = window.location.href; subText = currentLocation; } else { - subText = channelContainer.querySelector('#text').textContent; + subText = channelContainer.querySelector('#text').textContent + " " + currentLocation; } e.target.title = 'TA Download: ' + subText; @@ -373,8 +373,8 @@ function sendUrl(url, action, button) { console.log('youtube link: ' + JSON.stringify(payload)); - let sending = browserType.runtime.sendMessage(payload); - sending.then(handleResponse, handleError); + // let sending = browserType.runtime.sendMessage(payload); + // sending.then(handleResponse, handleError); } let throttleBlock;