Last active
May 2, 2023 09:38
-
-
Save rsp4jack/ab10fe71c690a87bcd4a90f8caf2d568 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