mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Add back Safari Extension
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"default_locale": "en",
|
||||
|
||||
"name": "Open in Yattee",
|
||||
"description": "Open YouTube videos in Yattee app",
|
||||
"description": "Open videos in Yattee app",
|
||||
"version": "1.0",
|
||||
|
||||
"icons": {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
if (document.readyState !== 'complete') {
|
||||
window.addEventListener('load', redirectAndReplaceContentWithLink);
|
||||
window.addEventListener('load', redirect);
|
||||
} else {
|
||||
redirectAndReplaceContentWithLink();
|
||||
redirect();
|
||||
}
|
||||
|
||||
function yatteeUrl() {
|
||||
@@ -15,12 +15,3 @@ function yatteeLink() {
|
||||
function redirect() {
|
||||
window.location.href = yatteeUrl()
|
||||
}
|
||||
|
||||
function replaceContentWithLink() {
|
||||
document.querySelector('body').innerHTML = '<h1>' + yatteeLink() + '</h1>';
|
||||
}
|
||||
|
||||
function redirectAndReplaceContentWithLink(){
|
||||
redirect()
|
||||
replaceContentWithLink()
|
||||
}
|
||||
|
Reference in New Issue
Block a user