PageSourceSearch

https://kart-bros.online/js/fullscreen.js

js kart-bros.online collected 2026-10-05 01:33:56 UTC 769 bytes, 29 lines download raw bytes

1/**
2 * fullscreen.js - 游戏全屏逻辑
3 *
4 * 重要:对 .game-embed-stack(霓虹框 + 框外底栏遮挡)全屏,勿对 iframe 全屏。
5 * 若对 iframe 全屏,Gameflare 等嵌入站的底部信息栏会随 iframe 内部 DOM 一起出现。
6 */
7
8/**
9 * 获取当前全屏元素(兼容 webkit / ms 前缀)
10 */
11function getFullscreenElement() {
12    return (
13        document.fullscreenElement ||
14        document.webkitFullscreenElement ||
15        document.msFullscreenElement ||
16        null
17    );
18}
19
20/**
21 * 退出全屏(兼容各浏览器前缀)
22 */
23function exitGameFullscreen() {
24    const exit =
25        document.exitFullscreen ||
26        document.webkitExitFullscreen ||
27        document.msExitFullscreen;
28    if (exit) exit.call(document);
29}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.