I am not going to take over the world...
Version vom
Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greasyfork.org/scripts/376248/662181/%E2%86%91%E2%86%92%E2%86%93%E2%86%90ABAB.js
// ==UserScript==
// @name ↑→↓←ABAB
// @namespace http://tampermonkey.net/
// @version 0.1
// @description I am not going to take over the world...
// @author You
// @run-at document-end
// @grant none
// ==/UserScript==
(function() {
function bootScript() {
isNaN(+$('.bilibili-player-danmaku-now').text())? getBootOption().then(hookData) : requestAnimationFrame(bootScript)
}
bootScript()
function getBootOption() {
return new Promise(function(resolve, reject) {
let hash = {}
let params = GrayManager.playerParams.split('&')
params.map(p=>hash[p.split('=')[0]] = p.split('=')[1])
window.BOOT_OPTION = hash
resolve()
})
}
function hookData() {
let cheatSheet = [
{a: '$.extend(this,{', b: '$.extend(this,{f,'},
{a: `{ee:24,time:2E3,
Me:b,background:"#000",ui:.7,Qh:!0,Dk:400,Ck:300,quality:80}`,
b: `{ee:24,time:b.time,Me:b.isStatic,background: b.background,ui:b.hi,Qh:!0,Dk:b.width,Ck:b.height,quality:b.quality}`}
]
let FnRaw = Fa.toString()
cheatSheet.map(ct => FnRaw = FnRaw.replace(ct.a, ct.b))
!eval(`var Fa = ${FnRaw}`) && Fa()
player = new bilibiliPlayer(window.BOOT_OPTION)
window.HOOKED_DATA = player.f
}
})();