蔚蓝档案网页迷你游戏双击全屏

等待小游戏加载完成后,双击小游戏区域即可全屏游玩

  1. // ==UserScript==
  2. // @name Blue Archive Minigame DoubleClick Fullscreen
  3. // @name:zh-CN 蔚蓝档案网页迷你游戏双击全屏
  4. // @name:zh-TW 蔚藍檔案網頁迷你遊戲雙擊全螢幕
  5. // @description After the mini-game is loaded, double-click the mini-game area to play in full screen.
  6. // @description:zh-CN 等待小游戏加载完成后,双击小游戏区域即可全屏游玩
  7. // @description:zh-TW 等待小遊戲載入完成後,雙擊小遊戲區域即可全螢幕遊玩
  8. // @license MIT
  9. // @namespace https://greasyfork.org/zh-CN/users/220174-linepro
  10. // @match *://bluearchive.nexon.com/events/2023/12/minigame
  11. // @match *://*/events/2023/12/minigame
  12. // @grant none
  13. // @version 1.1
  14. // @author LinePro
  15. // @run-at document-end
  16. // ==/UserScript==
  17. // const minigameElem = document.querySelector("div.minigame");
  18. const canvasElem = document.querySelector("canvas#unity-canvas");
  19. canvasElem.ondblclick = function () {
  20. if (!document.fullscreenElement) {
  21. canvasElem.requestFullscreen();
  22. } else {
  23. document.exitFullscreen();
  24. }
  25. }
  26. console.log("fullscreen enabled");