Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---https://www.youtube.com/@ghostyex---
- Tutorial on ^^^^^
- code Fullscreen button
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- <center>
- <button onclick="openGame()" > Play in Fullscreen </button>
- <script>
- function openGame() {
- var win = window.open ()
- var url = "URL BRUH"
- 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>
- </center>
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
- (update log)
- added the <center> part to the code so you don't have to fiddle around with the sizing
- ---------------------------------------
- (rip url bruh)
- ░██████╗██╗░░░██╗██████╗░░██████╗░█████╗░██████╗░██╗██████╗░███████╗ ██╗███████╗ ██╗░░░██╗
- ██╔════╝██║░░░██║██╔══██╗██╔════╝██╔══██╗██╔══██╗██║██╔══██╗██╔════╝ ██║██╔════╝ ██║░░░██║
- ╚█████╗░██║░░░██║██████╦╝╚█████╗░██║░░╚═╝██████╔╝██║██████╦╝█████╗░░ ██║█████╗░░ ██║░░░██║
- ░╚═══██╗██║░░░██║██╔══██╗░╚═══██╗██║░░██╗██╔══██╗██║██╔══██╗██╔══╝░░ ██║██╔══╝░░ ██║░░░██║
- ██████╔╝╚██████╔╝██████╦╝██████╔╝╚█████╔╝██║░░██║██║██████╦╝███████╗ ██║██║░░░░░ ╚██████╔╝
- ╚═════╝░░╚═════╝░╚═════╝░╚═════╝░░╚════╝░╚═╝░░╚═╝╚═╝╚═════╝░╚══════╝ ╚═╝╚═╝░░░░░ ░╚═════╝░
- ███████╗███╗░░██╗░░░░░██╗░█████╗░██╗░░░██╗███████╗██████╗░██╗
- ██╔════╝████╗░██║░░░░░██║██╔══██╗╚██╗░██╔╝██╔════╝██╔══██╗██║
- █████╗░░██╔██╗██║░░░░░██║██║░░██║░╚████╔╝░█████╗░░██║░░██║██║
- ██╔══╝░░██║╚████║██╗░░██║██║░░██║░░╚██╔╝░░██╔══╝░░██║░░██║╚═╝
- ███████╗██║░╚███║╚█████╔╝╚█████╔╝░░░██║░░░███████╗██████╔╝██╗
- ╚══════╝╚═╝░░╚══╝░╚════╝░░╚════╝░░░░╚═╝░░░╚══════╝╚═════╝░╚═╝
Advertisement
Comments
-
User was banned
-
- cheers
-
-
- Thanks mate
- i used to use this code:
- <button onclick="window.open('http://example.com', '_blank', 'fullscreen=yes');">Open Fullscreen</button>
-
- how do i get rid of that white outline
-
- here's a better code that doesn't have an out line in the game and its bigger
- <html><head><base target="_blank"></head><body><button class="c-button">PLAY FULLSCREEN</button>
- <style>
- .c-button {
- min-width: 100%;
- font-family: fantasy;
- appearance: none;
- border: 0;
- border-color: #fff;
- border-radius: 5px;
- background: #00008B;
- color: #fff;
- padding: 0px 46px;
- font-size: 20px;
- cursor: pointer;
- }
- .c-button:hover {
- background: #add8e6;
- }
- .c-button:focus {
- outline: none;
- box-shadow: 0 0 0 4px #cbd6ee;
- }
- .c-button {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100%;
- }
- </style>
- <script>
- var urlObj = new window.URL(window.location.href);
- var url = "URL BRUH";
- if (url) {
- var win;
- document.querySelector('button').onclick = function() {
- if (win) {
- win.focus();
- } else {
- win = window.open();
- win.document.body.style.margin = '0';
- win.document.body.style.height = '100vh';
- var iframe = win.document.createElement('iframe');
- iframe.style.border = 'none';
- iframe.style.width = '100%';
- iframe.style.height = '100%';
- iframe.style.margin = '0';
- iframe.src = url;
- win.document.body.appendChild(iframe);
- var interval = setInterval(function() {
- if (win.closed) {
- clearInterval(interval);
- win = undefined;
- }
- }, 500);
- }
- };
- }
- </script></body></html>
Add Comment
Please, Sign In to add comment
Advertisement