You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.
1- If the link doesn't exist in the page when the extension is loaded. i.e. if the youtube link is created dynamically in the dom afterwards, it doesn't work and the youtube page is getting fired nevertheless.
What would be required I think is something like that (untested) , fired out periodically.
2- Also this section in your original code fails sometimes:
if (target.href.includes('youtube.com') || target.href.includes('youtu.be') || target.href.includes('hooktube.com')){
window.stop();
e.stopImmediatePropagation();
e.preventDefault();
let url = 'freetube://' + target.href;
console.log(url);
window.location = url;
return false;
}
}
The youtube windows is fired nevertheless, th freetube does not open, or worst, both start playing simultaneously.
Let me explain.
2 issuse here:
1- If the link doesn't exist in the page when the extension is loaded. i.e. if the youtube link is created dynamically in the dom afterwards, it doesn't work and the youtube page is getting fired nevertheless.
What would be required I think is something like that (untested) , fired out periodically.
var cnt = 0;
function manClick(){
var loadNewhref = $("A");
if(loadNewhref.length)
{
if (cnt > 0) return;
cnt++;
loadNewhref.click(
function() {
setTimeout(
function() {
window.addEventListener("click", (event) => {
checkUrl(event);
});
cnt = 0;
window.setInterval(manClick, 30000);
},
20000);
});
window.clearInterval(manClick);
}
};
2- Also this section in your original code fails sometimes:
if (target.href.includes('youtube.com') || target.href.includes('youtu.be') || target.href.includes('hooktube.com')){
window.stop();
e.stopImmediatePropagation();
e.preventDefault();
let url = 'freetube://' + target.href;
console.log(url);
window.location = url;
return false;
}
}
The youtube windows is fired nevertheless, th freetube does not open, or worst, both start playing simultaneously.
Would be happy to assist.
Here's an example where it fails. I don't think th link will be valid for a long time halas:
https://www.upwork.com/jobs/Create-own-indicator-from-someone-else-indicator-software_~01d3b31336d39f8df2/
Go there and click the youtube link. A youtube window will opn and freetube never open.
Best regards,
Marccel
The text was updated successfully, but these errors were encountered: