Greasy Fork

gbf 弹窗定位补全

try to take over the world!

目前为 2019-05-04 提交的版本。查看 最新版本

// ==UserScript==
// @name         gbf 弹窗定位补全
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://game.granbluefantasy.jp/
// @grant        none
// ==/UserScript==
/* jshint esversion: 6 */
(function() {
    'use strict';

    // Your code here...
    const style = document.createElement("style");
    style.innerHTML = `
.element-1 {
display: flex;
position: absolute;
height: 100%;
}

.element-2 {
overflow-x: hidden;
}
`;

    const element1 = document.createElement("div");
    element1.className = "element-1";

    const element2 = document.createElement("div");
    element2.className = "element-2";

    document.querySelector("head").appendChild(style);
    document.body.appendChild(element1);
    element1.appendChild(element2);
    element2.appendChild(document.querySelector("#mobage-game-container"));

})();