Advertisement
GhostyexYT

code for tut

Nov 27th, 2022 (edited)
18,701
2
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | Source Code | 2 0
  1. ---https://www.youtube.com/@ghostyex---
  2.  
  3. Tutorial on ^^^^^
  4.  
  5. code Fullscreen button
  6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7.  
  8. <center>
  9. <button onclick="openGame()" > Play in Fullscreen </button>
  10. <script>
  11. function openGame() {
  12. var win = window.open ()
  13. var url = "URL BRUH"
  14. var iframe = win.document.createElement('iframe')
  15. iframe.style.width = "100%"
  16. iframe.style.height = "100%"
  17. iframe.style.border = "none"
  18. iframe.src = url
  19. win.document.body.appendChild(iframe)
  20. }
  21. </script>
  22. </center>
  23.  
  24. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  25.  
  26. (update log)
  27.  
  28. added the <center> part to the code so you don't have to fiddle around with the sizing
  29.  
  30. ---------------------------------------
  31. (rip url bruh)
  32.  
  33.  
  34. ░██████╗██╗░░░██╗██████╗░░██████╗░█████╗░██████╗░██╗██████╗░███████╗  ██╗███████╗  ██╗░░░██╗
  35. ██╔════╝██║░░░██║██╔══██╗██╔════╝██╔══██╗██╔══██╗██║██╔══██╗██╔════╝  ██║██╔════╝  ██║░░░██║
  36. ╚█████╗░██║░░░██║██████╦╝╚█████╗░██║░░╚═╝██████╔╝██║██████╦╝█████╗░░  ██║█████╗░░  ██║░░░██║
  37. ░╚═══██╗██║░░░██║██╔══██╗░╚═══██╗██║░░██╗██╔══██╗██║██╔══██╗██╔══╝░░  ██║██╔══╝░░  ██║░░░██║
  38. ██████╔╝╚██████╔╝██████╦╝██████╔╝╚█████╔╝██║░░██║██║██████╦╝███████╗  ██║██║░░░░░  ╚██████╔╝
  39. ╚═════╝░░╚═════╝░╚═════╝░╚═════╝░░╚════╝░╚═╝░░╚═╝╚═╝╚═════╝░╚══════╝  ╚═╝╚═╝░░░░░  ░╚═════╝░
  40.  
  41. ███████╗███╗░░██╗░░░░░██╗░█████╗░██╗░░░██╗███████╗██████╗░██╗
  42. ██╔════╝████╗░██║░░░░░██║██╔══██╗╚██╗░██╔╝██╔════╝██╔══██╗██║
  43. █████╗░░██╔██╗██║░░░░░██║██║░░██║░╚████╔╝░█████╗░░██║░░██║██║
  44. ██╔══╝░░██║╚████║██╗░░██║██║░░██║░░╚██╔╝░░██╔══╝░░██║░░██║╚═╝
  45. ███████╗██║░╚███║╚█████╔╝╚█████╔╝░░░██║░░░███████╗██████╔╝██╗
  46. ╚══════╝╚═╝░░╚══╝░╚════╝░░╚════╝░░░░╚═╝░░░╚══════╝╚═════╝░╚═╝
  47.  
Advertisement
Comments
  • User was banned
  • goldnera
    1 year
    # HTML 0.15 KB | 0 0
    1. Thanks mate
    2.  
    3. i used to use this code:
    4.  
    5. <button onclick="window.open('http://example.com', '_blank', 'fullscreen=yes');">Open Fullscreen</button>
    6.  
  • astrogorilla
    1 year
    # text 0.04 KB | 0 0
    1. how do i get rid of that white outline
  • adog1575
    1 year
    # text 1.85 KB | 0 0
    1. here's a better code that doesn't have an out line in the game and its bigger
    2.  
    3. <html><head><base target="_blank"></head><body><button class="c-button">PLAY FULLSCREEN</button>
    4. <style>
    5. .c-button {
    6. min-width: 100%;
    7. font-family: fantasy;
    8. appearance: none;
    9. border: 0;
    10. border-color: #fff;
    11. border-radius: 5px;
    12. background: #00008B;
    13. color: #fff;
    14. padding: 0px 46px;
    15. font-size: 20px;
    16. cursor: pointer;
    17. }
    18.  
    19. .c-button:hover {
    20. background: #add8e6;
    21. }
    22.  
    23. .c-button:focus {
    24. outline: none;
    25. box-shadow: 0 0 0 4px #cbd6ee;
    26. }
    27.  
    28. .c-button {
    29. display: flex;
    30. align-items: center;
    31. justify-content: center;
    32. height: 100%;
    33. }
    34.  
    35. </style>
    36.  
    37. <script>
    38. var urlObj = new window.URL(window.location.href);
    39. var url = "URL BRUH";
    40.  
    41. if (url) {
    42. var win;
    43.  
    44. document.querySelector('button').onclick = function() {
    45. if (win) {
    46. win.focus();
    47. } else {
    48. win = window.open();
    49. win.document.body.style.margin = '0';
    50. win.document.body.style.height = '100vh';
    51. var iframe = win.document.createElement('iframe');
    52. iframe.style.border = 'none';
    53. iframe.style.width = '100%';
    54. iframe.style.height = '100%';
    55. iframe.style.margin = '0';
    56. iframe.src = url;
    57. win.document.body.appendChild(iframe);
    58.  
    59.  
    60. var interval = setInterval(function() {
    61. if (win.closed) {
    62. clearInterval(interval);
    63. win = undefined;
    64.  
    65. }
    66. }, 500);
    67.  
    68.  
    69. }
    70. };
    71. }
    72. </script></body></html>
    73.  
    74.  
Add Comment
Please, Sign In to add comment
Advertisement