Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
Removed remains of previous attempt to display correct bitrate in player
  • Loading branch information
kerenon authored Mar 18, 2024
1 parent eb9d75b commit 5efeea5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const originalSetup = iBroadcastPlay.prototype.setup;

iBroadcastPlay.prototype.setup = function() {
originalSetup.call(this);

// Redefine `ongettrackurl` within setup to change the replacement
this.ongettrackurl = (trackId)=>{
if (trackId == undefined || trackId == null) {
return null;
Expand All @@ -15,10 +13,9 @@ iBroadcastPlay.prototype.setup = function() {
}
if (! cookies.origbitrate && music.user.premium) {
playurl = playurl.replace(/128/, 320);
document.getElementsByClassName('mgr-player-bitrate').innerHTML = ' • 320Kbps"'
}
playurl += "?Expires=" + music.library.expires + "&Signature=" + music.user.token + "&platform=" + ib.client + "&version=1.1&user_id=" + music.user.id + "&file_id=" + trackId;
ib.log("- play url: " + playurl, this);
return (playurl);
};
};
};

0 comments on commit 5efeea5

Please sign in to comment.