Skip to content

Instantly share code, notes, and snippets.

@cayuu
Last active April 12, 2017 02:01
Show Gist options
  • Save cayuu/7134360 to your computer and use it in GitHub Desktop.
Save cayuu/7134360 to your computer and use it in GitHub Desktop.
Mute Rdio Ads (copy + paste into browser console) [24 Oct 2013]
var r = R.player, oVol = r.volume(), tf = r._onTrackFinished, ar = r._onAudioReady, n = r._next;
r._onTrackFinished = function() {
return .001 !== r.volume() && (oVol = r.volume()), r.volume(.001), tf.apply(this, arguments);
};
r._onAudioReady = function() {
return r.playingAd() || r.volume(oVol), ar.apply(this, arguments);
};
r._next = function() {
arguments[0] = false;
return n.apply(this, arguments);
};
@nitinhayaran
Copy link

Works like a charm 😄 Thanks.

@allanforms
Copy link

It works on chromium too.
I just Love it!
Thanks a lot!

@valentin-hc
Copy link

Works perfect, thank you so much !

@allanforms
Copy link

Hi there! I've been using this from some days ago and I just loved it!
The only thing I'd add is the manual skip, it still plays the ad.
So if you want to add to your code here is what I did (thanks a lot for your code!!!)

var r = R.player, oVol = r.volume(), tf = r._onTrackFinished, ar = r._onAudioReady, n = r._next;

r._onTrackFinished = function() {
  return .001 !== r.volume() && (oVol = r.volume()), r.volume(.001), tf.apply(this, arguments);
};

r._onAudioReady = function() {
  return r.playingAd() || r.volume(oVol), ar.apply(this, arguments);
};

r._next = function() {
  arguments[0] = false;
  return n.apply(this, arguments);
};

@Maiklas3000
Copy link

It took me a while to figure out a way to make this code "stick", since I rarely use Chrome or Chromium. Install the "Custom Javascript for websites" extension for Chrome, go to the rdio.com website, click on the extension's icon ("cjs"), paste the above code in the box that appears, and save. Done. It might give you an error and tell you to refresh, so try that. I use allanforever's code and actually I'm on Chromium, but it will work for Chrome too.

@paulus76
Copy link

paulus76 commented Jul 6, 2015

Thanks for the scripts! Muting works great during "regular" playback for me, but it does not mute after (inbetween) manual track skip. Is this working for others?

@cayuu
Copy link
Author

cayuu commented Jul 30, 2015

@allanforever thanks! Added to the gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment