↑→↓←ABAB

I am not going to take over the world...

目前為 2019-01-06 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/376248/659933/%E2%86%91%E2%86%92%E2%86%93%E2%86%90ABAB.js

  1. // ==UserScript==
  2. // @name ↑→↓←ABAB
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description I am not going to take over the world...
  6. // @author You
  7. // @match https://bilibili.com/video/*
  8. // @match https://bilibili.com/bangumi/*
  9. // @run-at document-end
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. function bootScript() {
  15. !!$('.video-state-pause svg')[0]? getBootOption().then(hookData) : requestAnimationFrame(bootScript)
  16. }
  17. bootScript()
  18.  
  19. function getBootOption() {
  20. return new Promise(function(resolve, reject) {
  21. let hash = {}
  22. let params = GrayManager.playerParams.split('&')
  23. params.map(p=>hash[p.split('=')[0]] = p.split('=')[1])
  24. window.BOOT_OPTION = hash
  25. resolve()
  26. })
  27. }
  28.  
  29. function hookData() {
  30. let cheatSheet = [
  31. {a: '$.extend(this,{', b: '$.extend(this,{f,'},
  32. {a: '{Xd:24,time:2E3,Ie:b,background:"#000",hi:.7,Gh:!0,nk:400,mk:300,quality:80}',
  33. b: `{Xd:24,time:2E3,Ie:b,background:"#000",hi:.7,Gh:!0,nk:${player.getWidth()},mk:${player.getHeight()},quality:100}`}
  34. ]
  35.  
  36. let GaRaw = Ga.toString()
  37. cheatSheet.map(ct => GaRaw = GaRaw.replace(ct.a, ct.b))
  38. !eval(`var Ga = ${GaRaw}`) && Ga()
  39.  
  40. player = new bilibiliPlayer(window.BOOT_OPTION)
  41. window.HOOKED_DATA = player.f
  42. }
  43. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址