My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Javascript Events and function problem

Christian Bayer's photo
Christian Bayer
·Feb 3, 2020

I made a JavaScript, that Displays a Image when oncontextmenu and if Domain in a Frame and (Maybe) the browser is httrack. The script is in my Hosting Provider, and the Images are at my other php profider with a stat. I have all and all tried but not minimaly the alert works. I think it is a function Problem and the reload is not functionable, but the oncontextmenu works mostly.

Here is the script:

// Right click
window.oncontextmenu = function() {
document.getElementById("fze").style.display = "inline";
document.getElementById("fze").src = "https://www.bayerchristian.de/phppushoverm/1/counter/fzepc.png";
document.getElementById("iframec").src = "https://www.bayerchristian.de/phppushoverm/1/clountclk.php";}
// Frame Breaker maker
window.onload = function() {
alert("Frame break");
var url = window.top.location.href;
if (url.indexOf("inconsequential") != -1) {
document.getElementById("fze").style.display  = "inline";
document.getElementById("fze").src = "https://www.bayerchristian.de/phppushoverm/1/counter/fzepc3.png";
} else if {document.getElementById("fze").src = "https://www.bayerchristian.de/phppushoverm/1/counter/fzepc2.png";}
// HTTrack maker
alert("HTTrack visit");
var BrowserName = navigator.userAgent;
if (navigator.userAgent.indexOf("HTTrack") != -1 ) {
document.getElementById("fze").style.display  = "inline";
document.getElementById("fze").src = "https://www.bayerchristian.de/phppushoverm/1/counter/fzepc4.png";
} else if {document.getElementById("fze").src = "https://www.bayerchristian.de/phppushoverm/1/counter/fzepc2.png";}}
// END

thanks for suggestions, C. Bayer