Closed (won't fix)
Project:
Javascript Aggregator
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2010 at 16:33 UTC
Updated:
27 May 2011 at 08:08 UTC
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 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 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.