Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We had javascript code (from an older version of the "Mp3 player" module) that included code like this:
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
The JSMin functionality stripped this comment out, breaking the module for IE.
JSMin+ seems to contain some special logic in regards to "@cc_on", but we haven't had a chance to test it yet.
Comments
Comment #1
derjochenmeyer CreditAttribution: derjochenmeyer commentedThis bug report is related to JSMin.
Anyway, these kinds of conditional comments must be considered hacks.
var isMSIE = /*@cc_on!@*/false;
There are cleaner ways to switch js behaviour:
http://api.jquery.com/jQuery.browser/
Comment #2
BillyIdle CreditAttribution: BillyIdle commentedI think this issue is somewhat important to fix. Even if it is a hack to use conditional compilation, there exists at least one important module here on drupal.org that utilizes a third party JS lib that uses contitional compilation, namely SWF Tools. After all this is more or less the de-facto lib for adding flash content to a page.
Searching the web I stumled across a further enhanced version of the JSMin lib already in use by this project, which incorporates a fix for this issue. It can be found here:
http://plugins.svn.wordpress.org/w3-total-cache/tags/0.9.2.1/lib/Minify/...
I hope you can update the lib in the module, such that we (and other people) don't have to run on a modified version of the module.