mgcmFS - Play Magicami in Fullscreen

Adds a fullscreen button to browser-based versions of Magicami. Akisa best girl!

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         mgcmFS - Play Magicami in Fullscreen
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Adds a fullscreen button to browser-based versions of Magicami. Akisa best girl!
// @author       xnapx
// @match        https://api.magicami.jp/Top/Main*
// @match        https://api.magicami.johren.games/*
// @match        https://en-api.magicami.johren.games/Top/Main*
// @match        https://tw-api.magicami.johren.games/Top/Main*
// @grant        none
// @license      gpl-3.0
// ==/UserScript==

(function() {
    'use strict';
    var gameContainer = document.getElementById('gameContainer');
    var fs_button = document.createElement('button');
    fs_button.type = 'button';
    fs_button.style.fontSize = '1em';
    fs_button.style.color = 'white';
    fs_button.style.backgroundColor = 'black';
    fs_button.style.display = 'relative';
    fs_button.style.float = 'right';
    fs_button.style.padding = '10px 8px 4px';
    fs_button.style.margin = '-8px 0px 5px';
    fs_button.style.border = '2px solid purple';
    fs_button.style.borderRadius = '8px';
    fs_button.innerHTML = 'Fullscreen';
    fs_button.onclick = () => { gameInstance.SetFullscreen(1); };
    gameContainer.appendChild(fs_button);
})();