Uassets: dashradio.com

Created on 15 Jul 2018  路  11Comments  路  Source: uBlockOrigin/uAssets

URL(s) where the issue occurs

https://dashradio.com/

Describe the issue

When accessing the site, the default radio station should start playing. When clicking "Play" on any of the radio stations, its music should start. None of this happens.
I narrowed the filter to /fingerprint2.min.js from EasyPrivacy.

A workaround would be to deactivate this filter entirely like this:
@@||dashradio.com/wp-content/themes/dash-2.1.4/library/js/libs/fingerprint2.min.js$script,first-party
but I don't want to load this tracker if possible.

I tried this
dashradio.com##script:inject(abort-on-property-write.js, Fingerprint2)
But it only changes the error message from
ReferenceError: Fingerprint2 is not defined
to
TypeError: Fingerprint2 is not a constructor
And still no music.

Is it possible to fake this js and how ?

Screenshot(s)

I don't think there is a need for these

Versions

  • Browser/version: Firefox 61.0.1 and Chrome 67.0.3396.99
  • uBlock Origin version: 1.16.12
  • OS: Ubuntu 18.04

Settings

  • EasyPrivacy

Notes

I also tried to get some help from EasyList/EasyPrivacy guys but their suggestion did not work either:
||dashradio.com^*/fingerprint2.$script,important,redirect=noopjs

Most helpful comment

Thanks for looking into it.
I tried another way: a userscript which injects the bare minimum for the site to work.
It just injects this in a script tag:
Fingerprint2 = function() { return Fingerprint2.prototype = {get:function(){}} }

And voil脿, no tracking and music can go on !

All 11 comments

I don't see how, with the filters uBO can use, even if I set Fingerprint2, by adding
dashradio.com##script:inject(set-constant.js, Fingerprint2, noopFunc)
I get
Uncaught TypeError: (intermediate value).get is not a function at g (ajax.min.js:1) at A (ajax.min.js:1) at HTMLAnchorElement.<anonymous> (ajax.min.js:1) at HTMLDocument.dispatch (jquery.js:3) at HTMLDocument.r.handle (jquery.js:3)
if I click play, so allowing
@@||dashradio.com/*/library/js/libs/fingerprint2.min.js$script,first-party
seems to be the only way for uBO to unbreak the player.
I will add the filter, as the site is basically useless if the radio statons won't play any music ;).

Thanks for looking into it.
I tried another way: a userscript which injects the bare minimum for the site to work.
It just injects this in a script tag:
Fingerprint2 = function() { return Fingerprint2.prototype = {get:function(){}} }

And voil脿, no tracking and music can go on !

I can ask if we would add such a script to uBO-resources.

Indeed it works and is very bare minimum to restore the functionality, I quickly added a scriptlet like this -

# fingerprint-defuser
fp-defuser.js application/javascript
var Fingerprint2 = function() { return Fingerprint2.prototype = { get:function(){} } };

Given how much it fingerprints, it would definitely be preferable to avoid whitelisting.

With the new scriptlet, the following works on my side to unbreak the site while not allowing fingerprint script:

||dashradio.com^*/fingerprint2.min.js$script,redirect=fingerprint2.js,first-party

@gorhill What prevents from making it generic?

*/fingerprint2.js$script,important,redirect=fingerprint2.js
*/fingerprint2.min.js$script,important,redirect=fingerprint2.js

Thanks.

I added the minimal API to unbreak the case here. If wholly blocking fingerprint2.js does not cause breakage, than it's preferable to replacing it with a partial API which could cause more breakage.

Wait, what happened to the scriptlet? I thought redirect=fingerprint2.js was going to replace the whitelist.

uBlock-resources auto updates every 7 days.
https://github.com/gorhill/uBlock/blob/master/assets/assets.json#L20

To be sure that every user has redirect=fingerprint2.js, we have to wait a week before we can remove the exception and add the redirect filter.

In Firefox and uBO from AMO resources.txt updates only with extension.

Sorry, I forgot about that, I tested with the dev version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

melnation-com picture melnation-com  路  4Comments

sebastianbell picture sebastianbell  路  3Comments

macheteBadger picture macheteBadger  路  3Comments

KiLL4FuNK picture KiLL4FuNK  路  4Comments

krystian3w picture krystian3w  路  3Comments