Skip to content

Instantly share code, notes, and snippets.

@biuuu
Last active May 29, 2023 16:24
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save biuuu/b5fca321fc232b79161095c71a26f43f to your computer and use it in GitHub Desktop.
Save biuuu/b5fca321fc232b79161095c71a26f43f to your computer and use it in GitHub Desktop.
一些小功能
// ==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