{"id":15025,"date":"2025-08-18T14:34:00","date_gmt":"2025-08-18T06:34:00","guid":{"rendered":"https:\/\/dg66.net\/?page_id=15025"},"modified":"2025-08-28T11:06:34","modified_gmt":"2025-08-28T03:06:34","slug":"opengame","status":"publish","type":"page","link":"https:\/\/dg66.net\/th\/opengame\/","title":{"rendered":"opengame"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"15025\" class=\"elementor elementor-15025\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-401df92f e-con-full e-flex e-con e-parent\" data-id=\"401df92f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-11d9b285 elementor-widget elementor-widget-html\" data-id=\"11d9b285\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\r\nhtml,body{margin:0;padding:0;background:#000;}\r\n<\/style>\r\n\r\n<iframe\r\n  id=\"ifrm\"\r\n  scrolling=\"yes\"\r\n  src=\"https:\/\/dg66.net\/freegame.php\"\r\n  frameborder=\"0\"\r\n  style=\"border:0;display:block;width:100vw;height:100dvh;background:#000;\"\r\n  allowfullscreen\r\n  allow=\"fullscreen; autoplay; gamepad *\">\r\n<\/iframe>\r\n\r\n\r\n\r\n<script>\r\n(function () {\r\n  const ifrm = document.getElementById('ifrm');\r\n\r\n  function injectStyles(doc) {\r\n    const css = `\r\n      html, body { margin:0 !important; padding:0 !important; height:100% !important; overflow:hidden !important; background:#000 !important; }\r\n      * { border-radius:0 !important; }\r\n      :root, #app, #root, main, .app, .root, .container, .wrapper, .wrap, .content, .inner, .game, .game-wrap {\r\n        margin:0 !important; padding:0 !important; width:100% !important; height:100% !important; max-width:none !important;\r\n        background:#0000 !important;\r\n      }\r\n      \/* \u76e1\u91cf\u79fb\u9664\u5167\u9801\u53ef\u80fd\u52a0\u7684\u5916\u6846 *\/\r\n      header, footer, .site-footer, .bottom-bar, .cookie-notice, .grecaptcha-badge { display:none !important; }\r\n    `;\r\n    const style = doc.createElement('style');\r\n    style.setAttribute('type', 'text\/css');\r\n    style.appendChild(doc.createTextNode(css));\r\n    (doc.head || doc.documentElement).appendChild(style);\r\n  }\r\n\r\n  function forceFullbleedLargest(doc) {\r\n    \/\/ \u627e\u51fa\u8996\u7a97\u4e2d\u9762\u7a4d\u6700\u5927\u7684\u53ef\u898b\u5143\u7d20\uff0c\u7576\u4f5c\u4e3b\u5bb9\u5668\u585e\u6eff\r\n    const all = Array.from(doc.body.querySelectorAll('body, #app, #root, main, .app, .root, .container, .wrapper, .wrap, .content, .inner, .game, .game-wrap, div, section'));\r\n    let best = doc.body;\r\n    let bestArea = 0;\r\n    all.forEach(el => {\r\n      const r = el.getBoundingClientRect();\r\n      const area = r.width * r.height;\r\n      if (area > bestArea && r.width && r.height && getComputedStyle(el).display !== 'none') {\r\n        best = el; bestArea = area;\r\n      }\r\n    });\r\n    Object.assign(best.style, {\r\n      position: 'fixed',\r\n      top: '0', left: '0', right: '0', bottom: '0',\r\n      width: '100vw',\r\n      height: '100dvh',\r\n      overflow: 'hidden',\r\n      margin: '0', padding: '0',\r\n      background: '#000'\r\n    });\r\n  }\r\n\r\n  function fixInnerIframes(doc) {\r\n    const innerIframes = Array.from(doc.querySelectorAll('iframe'));\r\n    innerIframes.forEach(child => {\r\n      try {\r\n        \/\/ \u82e5\u540c\u7db2\u57df\uff0c\u5c0d\u5b50 iframe \u4e5f\u505a\u540c\u6a23\u8655\u7406\r\n        const cdoc = child.contentDocument || child.contentWindow.document;\r\n        child.style.border = '0';\r\n        child.style.position = 'fixed';\r\n        child.style.top = '0';\r\n        child.style.left = '0';\r\n        child.style.width = '100vw';\r\n        child.style.height = '100dvh';\r\n        child.style.background = '#000';\r\n        injectStyles(cdoc);\r\n        forceFullbleedLargest(cdoc);\r\n      } catch (e) {\r\n        \/\/ \u5b50 iframe \u82e5\u8de8\u7db2\u57df\uff0c\u81f3\u5c11\u628a\u5916\u6846\u6490\u6eff\r\n        child.style.border = '0';\r\n        child.style.position = 'fixed';\r\n        child.style.top = '0';\r\n        child.style.left = '0';\r\n        child.style.width = '100vw';\r\n        child.style.height = '100dvh';\r\n        child.style.background = '#000';\r\n      }\r\n    });\r\n  }\r\n\r\n  function hardFullbleed() {\r\n    try {\r\n      const doc = ifrm.contentDocument || ifrm.contentWindow.document;\r\n      injectStyles(doc);\r\n      forceFullbleedLargest(doc);\r\n      fixInnerIframes(doc);\r\n\r\n      \/\/ \u5167\u9801\u5e38\u662f SPA\uff0c\u665a\u9ede\u518d\u88dc\u4e00\u6b21\uff0c\u907f\u514d\u6846\u67b6\u6e32\u67d3\u8986\u84cb\r\n      setTimeout(() => {\r\n        try {\r\n          const d2 = ifrm.contentDocument || ifrm.contentWindow.document;\r\n          injectStyles(d2);\r\n          forceFullbleedLargest(d2);\r\n          fixInnerIframes(d2);\r\n        } catch(_) {}\r\n      }, 500);\r\n\r\n      \/\/ \u76e3\u770b DOM \u8b8a\u5316\uff08React\/Vue \u8def\u7531\u5207\u63db\u6642\u518d\u58d3\u4e00\u6b21\uff09\r\n      const mo = new (ifrm.contentWindow.MutationObserver || MutationObserver)(() => {\r\n        try {\r\n          const d3 = ifrm.contentDocument || ifrm.contentWindow.document;\r\n          forceFullbleedLargest(d3);\r\n        } catch(_) {}\r\n      });\r\n      mo.observe(doc.documentElement, { childList: true, subtree: true });\r\n    } catch (e) {\r\n      \/\/ \u5982\u679c\u9084\u6c92\u53ef\u53d6\u7528\uff08\u5f88\u5feb\u5c31 onload \u4e86\uff09\uff0c\u5ef6\u9072\u5617\u8a66\r\n      setTimeout(hardFullbleed, 100);\r\n    }\r\n  }\r\n\r\n  ifrm.addEventListener('load', hardFullbleed);\r\n})();\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"footnotes":""},"class_list":["post-15025","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/dg66.net\/th\/wp-json\/wp\/v2\/pages\/15025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dg66.net\/th\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dg66.net\/th\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dg66.net\/th\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dg66.net\/th\/wp-json\/wp\/v2\/comments?post=15025"}],"version-history":[{"count":61,"href":"https:\/\/dg66.net\/th\/wp-json\/wp\/v2\/pages\/15025\/revisions"}],"predecessor-version":[{"id":15887,"href":"https:\/\/dg66.net\/th\/wp-json\/wp\/v2\/pages\/15025\/revisions\/15887"}],"wp:attachment":[{"href":"https:\/\/dg66.net\/th\/wp-json\/wp\/v2\/media?parent=15025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}