mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-05 03:30:12 +00:00
better event listener on to send url to addon
This commit is contained in:
parent
beccfd47a7
commit
04e8d7d2cb
@ -6,12 +6,6 @@ console.log("running script.js");
|
||||
|
||||
let browserType = getBrowser();
|
||||
|
||||
setTimeout(function(){
|
||||
console.log("running setimeout")
|
||||
sendUrl();
|
||||
return false;
|
||||
}, 2000);
|
||||
|
||||
|
||||
// boilerplate to dedect browser type api
|
||||
function getBrowser() {
|
||||
@ -45,3 +39,12 @@ function sendUrl() {
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
document.addEventListener("yt-navigate-finish", function (event) {
|
||||
console.log("running setimeout")
|
||||
setTimeout(function(){
|
||||
sendUrl();
|
||||
return false;
|
||||
}, 2000);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user