Add back Safari Extension

This commit is contained in:
Arkadiusz Fal
2022-06-30 18:41:09 +02:00
parent 5bac96ac26
commit 46eee88527
3 changed files with 71 additions and 28 deletions

View File

@@ -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()
}