[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-07-01 Thread Launchpad Bug Tracker
This bug was fixed in the package webbrowser-app - 0.23+14.10.20140630.1-0ubuntu1 --- webbrowser-app (0.23+14.10.20140630.1-0ubuntu1) utopic; urgency=low [ Olivier Tilloy ] * Add a user script that prevents so-called "smart banners" generated by the smartbanner jQuery plugin t

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-07-01 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/utopic-proposed/webbrowser-app -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1329799 Title: CNN.com advertises Google Play app to Ubuntu users To manage notifications ab

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-27 Thread Adnane Belmadiaf
My recommendation is to use the same system used by smartbanner.js which uses a cookie to detect if the use has already clicked on the close button so the banner will only show up just after X days. https://github.com/jasny/jquery.smartbanner/blob/master/jquery.smartbanner.js#L177 https://github.c

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-26 Thread Olivier Tilloy
The linked branch has a user script that hides and removes the smart banners generated by the smartbanner jQuery plugin. The only gotcha with the current implementation is that it doesn’t actually prevent the banner from being instantiated and inserted in the DOM in the first place, it merely hide

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-26 Thread Launchpad Bug Tracker
** Branch linked: lp:~osomon/webbrowser-app/smartbanners -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1329799 Title: CNN.com advertises Google Play app to Ubuntu users To manage notifications abou

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-26 Thread Olivier Tilloy
It appears simply removing the "shown" class on the div doesn’t actually hide it. The following two alternatives work better: document.getElementById("smartbanner").style.display = "none"; var smartbanner = document.getElementById("smartbanner"); smartbanner.parentNode.removeChild(sm

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-26 Thread Olivier Tilloy
Another interesting data point: cnn.com seems to be using the jQuery smartbanner plugin (http://jasny.github.io/jquery.smartbanner/) to display the app banner (see http://z.cdn.turner.com/cnn/tmpl_asset/static/mobile_phone/4009/js /global-min.js). The generated div looks like this: … So pres

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-26 Thread Olivier Tilloy
Some more information on this specific case: cnn.com’s main page has some code like this: if (window.device.isAndroid) { $( '.android-link' ).removeClass('hide'); } where window.device.isAndroid is true whenever the lowercased user-agent string matches /android/. So unless we remove the andr

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-16 Thread Olivier Tilloy
I unmarked this bug as being a duplicate of bug #1328183. Bug #1328183 is too generic, specific bug reports for individual issues are a better way of tracking them. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpa

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-16 Thread Olivier Tilloy
While the idea of a custom style sheet that hides all blocks that point to market:// URLs sounds good, unfortunately in this specific instance it wouldn’t work as the banner is dynamically generated, and the link doesn’t have a href attribute, instead a very obfuscated onclick handler is installed

[Bug 1329799] Re: CNN.com advertises Google Play app to Ubuntu users

2014-06-13 Thread Matthew Paul Thomas
*** This bug is a duplicate of bug 1328183 *** https://bugs.launchpad.net/bugs/1328183 ** This bug has been marked a duplicate of bug 1328183 User-Agent string results in poor UX on web -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to U