-
-
Save zzjtnb/1774e9c4445f25115d5b6800359874e8 to your computer and use it in GitHub Desktop.
betterncm plugin, MIT License
This file contains 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
globalThis.TrackHck = function (t) { | |
var o = this.eN()[t]; | |
var trk = o && (o.track && o.track.track ? o.track.track : o.track || o); | |
if (!trk) { | |
return o; | |
} | |
var f = trk.privilege; | |
if (!f) { | |
return o; | |
} | |
var bitrate = f.maxSongBr; | |
if (Number.isNaN(bitrate)) { | |
bitrate = f.maxFreeBr; | |
} | |
f.maxPlayBr = bitrate; | |
f.maxDownBr = bitrate; | |
f.payed = 1; | |
return o; | |
}; | |
plugin.onLoad(function () { | |
console.log("Hello!"); | |
}); |
This file contains 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
{ | |
"manifest_version": 1, | |
"name": "unblockprivileges", | |
"version": "0.0.1", | |
"author": "John Doe", | |
"description": "Unblock privileges of songs", | |
"betterncm_version": ">=0.2.5", | |
"injects": { | |
"Main": [ | |
{ | |
"file": "./main.js" | |
} | |
] | |
}, | |
"hijacks": { | |
"> 2.10.6 <= 2.10.8":{ | |
"orpheus://orpheus/pub/core":{ | |
"type": "replace", | |
"id": "privilegehck", | |
"from": "return this.eN()[t]", | |
"to": "if (!globalThis.TrackHck) return this.eN()[t]; return TrackHck.call(this, t)" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment