add latifistreams to f1 site[ci skip]

This commit is contained in:
Viktor Barzin 2023-11-04 16:39:21 +00:00
parent c586870b36
commit 934b625f9f

View file

@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -32,12 +31,43 @@
</h5> -->
<div id="root">
<iframe id="s2-iframe" width="1000" height="600" src="https://mrgamingstreams.com/excess-1/" frameborder="0"
scrolling="yes" gesture="media" allow="encrypted-media" allowfullscreen=""
sandbox="allow-forms allow-scripts allow-same-origin allow-top-navigation"></iframe>
<iframe
id="s0-iframe"
width="1000"
height="600"
src="https://latifistreams.com/"
frameborder="0"
scrolling="yes"
gesture="media"
allow="encrypted-media"
allowfullscreen=""
sandbox="allow-forms allow-scripts allow-same-origin allow-top-navigation"
></iframe>
<iframe id="s1-iframe" width="1000" height="600" src="https://wikisport.click/strm/f1.php" frameborder="0"
scrolling="no" gesture="media" allow="encrypted-media" allowfullscreen=""></iframe>
<iframe
id="s2-iframe"
width="1000"
height="600"
src="https://mrgamingstreams.com/excess-1/"
frameborder="0"
scrolling="yes"
gesture="media"
allow="encrypted-media"
allowfullscreen=""
sandbox="allow-forms allow-scripts allow-same-origin allow-top-navigation"
></iframe>
<iframe
id="s1-iframe"
width="1000"
height="600"
src="https://wikisport.click/strm/f1.php"
frameborder="0"
scrolling="no"
gesture="media"
allow="encrypted-media"
allowfullscreen=""
></iframe>
<!-- <iframe id="s1" onclick='document.getElementById("s1").src="http://mx.freestreams-live1.com/f1-live-stream1/";'
style="border-width: 10mm;" src="http://mx.freestreams-live1.com/f1-live-stream1/" class="embed-responsive-item"
@ -51,7 +81,6 @@
sandbox="allow-forms allow-scripts allow-same-origin"
></iframe> -->
<!-- <iframe id="s2" onclick='document.getElementById("s2").src="http://mx.freestreams-live1.com/skysportsf1-stream/";'
class="embed-responsive-item" frameborder="1" style="border-width: 10mm;" height="580" width="40%"
allowfullscreen="" scrolling="yes" allowtransparency="" src=""
@ -73,7 +102,6 @@
allowfullscreen="" scrolling="yes" allowtransparency="" src=""
sandbox="allow-forms allow-scripts allow-same-origin "></iframe> -->
<!-- ESPN -->
<!-- <iframe src="http://freestreams-live1.com/usa/espn.php" marginwidth="0" marginheight="0" scrolling="no" width="40%"
height="580" frameborder="0" allowfullscreen="allowfullscreen" sandbox="allow-scripts allow-same-origin"></iframe>
@ -111,9 +139,8 @@
</script> -->
<script>
// Get a reference to the iframe
var root = document.getElementById('root');
var root = document.getElementById("root");
// if (window.self !== window.top) {
// // The code is running inside an iframe
@ -125,67 +152,82 @@
// document.body.innerHTML = '<iframe width="1000" height="600" src="https://f1.viktorbarzin.me" sandbox="allow-forms allow-scripts allow-same-origin allow-top-navigation" />';
// }
// Add a 'load' event listener to the iframe
myIframe.addEventListener('load', function () {
myIframe.addEventListener("load", function () {
// Set the iframe's 'contentWindow.location' property to the current URL
myIframe.contentWindow.location = myIframe.contentWindow.location.href;
});
// Add a 'beforeunload' event listener to the window to prevent redirection
myIframe.addEventListener('beforeunload', function (event) {
myIframe.addEventListener("beforeunload", function (event) {
// If the event was triggered by a frame...
console.log('before unload')
console.log("before unload");
if (event.target !== window) {
// Prevent the default action of the event
event.preventDefault();
}
});
// Add event listener to handle messages from the iframe
window.addEventListener("message", function (event) {
window.addEventListener(
"message",
function (event) {
// Check if the message is a redirect request
if (event.data.redirectTo) {
// Reject the redirect request by logging an error message
console.error("Iframe attempted to redirect to:", event.data.redirectTo);
console.error(
"Iframe attempted to redirect to:",
event.data.redirectTo
);
}
}, false);
},
false
);
window.onbeforeunload = function () {
// Check if an iframe attempted to redirect the parent
if (window.location.href != "about:blank") {
// Block the navigation attempt
event.returnValue = "Are you sure you want to leave this page?";
}
}
};
window.location = new Proxy(window.location, {
set: function (target, property, value, receiver) {
console.log('location edite')
console.log("location edite");
// Check if the caller is the child iframe
if (window.frames.indexOf(receiver) != -1) {
// Block any attempts to modify the location object
console.error("Blocked attempt to modify parent window location:", target, property, value);
console.error(
"Blocked attempt to modify parent window location:",
target,
property,
value
);
return false;
} else {
// Allow other modifications to the location object
return Reflect.set(target, property, value, receiver);
}
}
},
});
window.history = new Proxy(window.history, {
set: function (target, property, value, receiver) {
console.log('history edite')
console.log("history edite");
// Check if the caller is the child iframe
if (window.frames.indexOf(receiver) != -1) {
// Block any attempts to modify the history object
console.error("Blocked attempt to modify parent window history:", target, property, value);
console.error(
"Blocked attempt to modify parent window history:",
target,
property,
value
);
return false;
} else {
// Allow other modifications to the history object
return Reflect.set(target, property, value, receiver);
}
}
},
});
</script>
</html>