Skip to main content
added 7 characters in body
Source Link
jdt
  • 2.5k
  • 6
  • 22

Your script will only work correctly if it is placed after the Yod character. Consider adding an event listener for window.load to only call it when all the content is loaded:

addEventListener("load", () => {
    ...
});

There is no need to iterate through all the elements. You could have simply used document.documentElement.innerHTML. The only problem with this is that it will find the character in the script itself. To fix this we can use String.fromCharCode:

if (document.documentElement.innerHTML.indexOf(String.fromCharCode(1497)) >= 0)
    document.location = 'https://googlehe.com';wikipedia.org/';

Your script will only work correctly if it is placed after the Yod character. Consider adding an event listener for window.load to only call it when all the content is loaded:

addEventListener("load", () => {
    ...
});

There is no need to iterate through all the elements. You could have simply used document.documentElement.innerHTML. The only problem with this is that it will find the character in the script itself. To fix this we can use String.fromCharCode:

if (document.documentElement.innerHTML.indexOf(String.fromCharCode(1497)) >= 0)
    document.location = 'https://google.com';

Your script will only work correctly if it is placed after the Yod character. Consider adding an event listener for window.load to only call it when all the content is loaded:

addEventListener("load", () => {
    ...
});

There is no need to iterate through all the elements. You could have simply used document.documentElement.innerHTML. The only problem with this is that it will find the character in the script itself. To fix this we can use String.fromCharCode:

if (document.documentElement.innerHTML.indexOf(String.fromCharCode(1497)) >= 0)
    document.location = 'https://he.wikipedia.org/';
deleted 97 characters in body
Source Link
jdt
  • 2.5k
  • 6
  • 22

Your script will only work correctly if it is placed after the Yod character. Consider using theadding an event listener for window.onloadload event to only call it when all the content is loaded:

window.onload = functionaddEventListener("load", () {
    const [...elements] ==> document.getElementsByTagName("*");{
    ...
});

There is no need to iterate through all the elements. You could have simply used document.documentElement.innerHTML. The only problem with this is that it will find the character in the script itself. To fix this we can use String.fromCharCode:

window.onload = function () {
    if (document.documentElement.innerHTML.indexOf(String.fromCharCode(1497)) >= 0)
        document.location = 'https://google.com';
}

Your script will only work correctly if it is placed after the Yod character. Consider using the window.onload event to only call it when all the content is loaded:

window.onload = function () {
    const [...elements] = document.getElementsByTagName("*");
    ...
}

There is no need to iterate through all the elements. You could have simply used document.documentElement.innerHTML. The only problem with this is that it will find the character in the script itself. To fix this we can use String.fromCharCode:

window.onload = function () {
    if (document.documentElement.innerHTML.indexOf(String.fromCharCode(1497)) >= 0)
        document.location = 'https://google.com';
}

Your script will only work correctly if it is placed after the Yod character. Consider adding an event listener for window.load to only call it when all the content is loaded:

addEventListener("load", () => {
    ...
});

There is no need to iterate through all the elements. You could have simply used document.documentElement.innerHTML. The only problem with this is that it will find the character in the script itself. To fix this we can use String.fromCharCode:

if (document.documentElement.innerHTML.indexOf(String.fromCharCode(1497)) >= 0)
    document.location = 'https://google.com';
Source Link
jdt
  • 2.5k
  • 6
  • 22

Your script will only work correctly if it is placed after the Yod character. Consider using the window.onload event to only call it when all the content is loaded:

window.onload = function () {
    const [...elements] = document.getElementsByTagName("*");
    ...
}

There is no need to iterate through all the elements. You could have simply used document.documentElement.innerHTML. The only problem with this is that it will find the character in the script itself. To fix this we can use String.fromCharCode:

window.onload = function () {
    if (document.documentElement.innerHTML.indexOf(String.fromCharCode(1497)) >= 0)
        document.location = 'https://google.com';
}