Last active
May 29, 2023 16:24
-
-
Save biuuu/b5fca321fc232b79161095c71a26f43f to your computer and use it in GitHub Desktop.
一些小功能
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 碧蓝幻想小工具 | |
// @namespace https://gist.github.com/biuuu | |
// @version 0.1.2 | |
// @description 无 | |
// @icon http://game.granbluefantasy.jp/favicon.ico | |
// @author biuuu | |
// @match *://game.granbluefantasy.jp/* | |
// @match *://gbf.game.mbga.jp/* | |
// @run-at document-body | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
'use strict'; | |
const addStyle = (css) => { | |
const style = document.createElement('style') | |
style.innerText = css | |
document.head.appendChild(style) | |
} | |
// 隐藏滚动条 | |
addStyle(` | |
::-webkit-scrollbar { | |
display: none; | |
} | |
`) | |
// 隐藏Mobage侧边栏 | |
addStyle(` | |
body.jssdk>div:first-child>div:first-child>div:first-child[data-reactid] { | |
display: none; | |
} | |
body.jssdk>div:first-child>div:nth-child(2) { | |
margin-left: 0 !important; | |
} | |
`) | |
// 可以复制救援或房间码 | |
addStyle(` | |
.txt-info-content, | |
.txt-room-id, | |
.prt-battle-id { | |
user-select: text !important; | |
} | |
`) | |
// 保持BGM播放 | |
window.addEventListener('blur', function (e) { | |
e.stopImmediatePropagation() | |
}, false) | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment