Skip to content

Instantly share code, notes, and snippets.

@cayuu
Last active April 12, 2017 02:01
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • 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);
};
@skarekrow
Copy link

This is going to be a noob question, but how can one access the webapp console? Is it by going Tools>JavaScript console inside Chrome and pasting this in there?

@marcelopm
Copy link

I was wondering the same as the fellow above

UPDATE: http://askubuntu.com/questions/293152/rdio-quicklists
i.e google-chrome --app=http://www.rdio.com/
to open console: right click, inspect element, console tab .. then copy and past
I haven't tested though

@prepri-zz
Copy link

This works like a charm. Thanks a lot!

@fhpriamo
Copy link

Works very well. Thanks!

@mattborn
Copy link

You can access the console in the Mac desktop app as well.

In Terminal, defaults write com.rdio.desktop WebKitDeveloperExtras -bool true

Restart Rdio, right click in the app and you should now see the same “Inspect Element” option although it’s the Safari inspector, not Chrome. You can still paste this code, although I get songs that go silent, too... so we might need an update.

This is great for when you’re hanging out at a friends’ place and the host doesn’t yet pay for Rdio and you don’t want Home Depot ads killing the vibe. If you use the service everyday, tho, pay for it.

@mmahota
Copy link

mmahota commented Jan 21, 2015

This seems exactly what I am looking for - could someone please explain in a little further detail how and where to paste the code? I am using Chrome and opened console as directed above, i.e. right click, inspect element, console tab ... but was not allowing me to paste in the console.

Really appreciate any help I could get on this, thanks!!

@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