I’m working on a website and I want to know how to embed an iframe into an about: blank tab. For example, when someone opens my website and clicks the link to an about: blank page they are redirected to an about: blank tab that has a game/link to a website in an iframe.
Can someone help me with this? I have looked at almost all of the websites and videos and cant find out how to do this. PLEASE HELP ME
Ok GingerNinja, The way to do this may sound complicated, but you either need Ultraviolet (Super confusing to set up, and Works for iframes like Google.com, which has their permissions blocked for iframing), or there is about blank cloaking. I am going to stick with about:blank cloaking.
Here is the in general code:
<html>
<head>
</head>
<body>
<button onclick="openGame()">Open Game</button>
<script>
function openGame() {
var win = window.open()
var url = "" //use your own link google com and other sites like minecraft.net will not work.
var iframe = win.document.createElement('iframe')
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = "none";
iframe.src = url
win.document.body.appendChild(iframe)
}
</script>
</body>
</html>
This is the most novice level of cloaking and it is the easiest. This is also HTML with the javascript already connected to it.
Ok, is securely your schools blocking host? If it is, I would like to help you tweak some things so I can make sure you have everything up and running. Here are the questions:
What is your website you are adding the button or input to open new tab? Is it google sites, or something else?
What games are you trying to embed in the about:blank cloaking?
(TOTALLY OPTIONAL AND HARD TO DO. I DONT SUGGEST DOING THIS): Do you want to make an Ultraviolet webhost which will let you unblock things and lets websites like google. com (which has their iframes blocked)?
This is the most I can do without being able to understand what you want done and how their block policy works. I don’t use Securely, I use Cisco, so yeah…
Github also has a repository with games that are re-made using Javascript, or they connect to a http server and lets you play them. You would have to add the files if you are using websites like Codesandbox, or if you are using only-code websites, you would have to copy and paste each file individually. I will try to find that repo for you and hopefully help you fix this. For example, 1v1.lol is a game that you can add to your website using the files and it works as a game.
I am sorry if you are even more confused, but if you need further information, contact me because I may not be available for a bit. I will try to reply as soon as possible!
some websites don’t work do you know why? and if you don’t, is there any possible way there is other code that is in HTML that can do the same as the other code but allows any website to be used. because all the pages keep saying that they refuse to work.
Your personal information has been removed from this post. Sharing personal information like your phone number, email, legal name and exact location online is unsafe.
It can be scraped by malicious actors to use against you, so please think carefully about what information you share.
Then I don’t know if Iframes will help your situation. I think the only way is to make an ultraviolet server on replit or some other hosting server and doing it that way. It is super confusing tho.