Reverse Proxy - [Website Title]
<!DOCTYPE html>
<html>
<head>
<title>Reverse Proxy - [Website Title]</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
iframe {
width: 100%;
height: 100vh;
border: none;
}
</style>
</head>
<body>
<iframe id="proxyFrame" src="https://idc.0vun.cn"></iframe>
<pre><code><script>
$(document).ready(function () {
var proxyFrame = document.getElementById('proxyFrame');
var proxyWindow = proxyFrame.contentWindow || proxyFrame.contentDocument.document || proxyFrame.contentDocument;
$(window).on('message', function (event) {
var message = event.originalEvent.data;
if (message.type === 'proxy') {
var url = message.url;
proxyWindow.location.href = url;
}
});
// Get and display the title of the loaded website
proxyFrame.onload = function() {
var title = proxyWindow.document.title;
console.log("Website title:", title);
// You can display the title on the page as well if desired
// document.getElementById("websiteTitle").innerHTML = title;
};
});
</script>
</code></pre>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/jDZU 著作权归作者所有。请勿转载和采集!