HTML5user

Eaglercraft

Aug 22nd, 2024
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. <html><head><base target="_blank"></head><body><button class="c-button">CLICK TO PLAY NEW*</button>
  2. <style>
  3. .c-button {
  4. min-width: 100%;
  5. font-family: fantasy;
  6. appearance: none;
  7. border: 0;
  8. border-radius: 5px;
  9. background: #000000;
  10. color: #fff;
  11. padding: 0px 46px;
  12. font-size: 24px;
  13. cursor: pointer;
  14. }
  15.  
  16. .c-button:hover {
  17. background: #320d90;
  18. }
  19.  
  20. .c-button:focus {
  21. outline: none;
  22. box-shadow: 0 0 0 4px #cbd6ee;
  23. }
  24.  
  25. .c-button {
  26. display: flex;
  27. align-items: center;
  28. justify-content: center;
  29. height: 100%;
  30. }
  31.  
  32. </style>
  33.  
  34. <script>
  35. var urlObj = new window.URL(window.location.href);
  36. var url = "https://sd592g.github.io/zj684od4lfg/";
  37.  
  38. if (url) {
  39. var win;
  40.  
  41. document.querySelector('button').onclick = function() {
  42. if (win) {
  43. win.focus();
  44. } else {
  45. win = window.open();
  46. win.document.body.style.margin = '0';
  47. win.document.body.style.height = '100vh';
  48. var iframe = win.document.createElement('iframe');
  49. iframe.style.border = 'none';
  50. iframe.style.width = '100%';
  51. iframe.style.height = '100%';
  52. iframe.style.margin = '0';
  53. iframe.src = url;
  54. win.document.body.appendChild(iframe);
  55.  
  56.  
  57. var interval = setInterval(function() {
  58. if (win.closed) {
  59. clearInterval(interval);
  60. win = undefined;
  61.  
  62. }
  63. }, 500);
  64.  
  65.  
  66. }
  67. };
  68. }
  69. </script></body></html>
Advertisement
Add Comment
Please, Sign In to add comment