09 December 2013

Apparently starting in the middle of November, an update to Internet Explorer changed its user agent so that it no longer contains MSIE. My IE user agent is: "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko". JavaScript that detects IE based on the user string now breaks in some browsers, as you might expect. This error was a result of one such problematic script.

The culprit that generates the alert "Scanstyles does nothing in Webkit/Firefox" is a jQuery plugin that creates rounded corners on your site for browsers that do not support the relevant CSS3 features. The curvycorners project appears to be defunct with no changes since March 2011 and an "official web site" that has been taken over by something else. However, suppressing the error is trivial. Just delete or disable the unnecessary alert call shown on line 3 below (still visible in the last source code release).

    // DISABLE: else curvyCorners.alert('Scanstyles does nothing in Webkit/Firefox/Opera');

Alternately, if you want to disable all curvycorner alerts without having to modify the script, you simply need to define "curvyCornersVerbose=0;" in the global context before including the script. That hides all output.

Obviously, there are better ways to get curvy corners now, especially if you do not need to support legacy browsers. However, this might at least help you with a stop-gap measure until you can test an alternate library on your site.


blog comments powered by Disqus