equal
deleted
inserted
replaced
11 * |
11 * |
12 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
12 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
14 */ |
14 */ |
15 |
15 |
|
16 // define('ENANO_JS_DEBUG', 1); |
|
17 |
16 /** |
18 /** |
17 * Returns a floating-point number with the current UNIX timestamp in microseconds. Defined very early because we gotta call it |
19 * Returns a floating-point number with the current UNIX timestamp in microseconds. Defined very early because we gotta call it |
18 * from very early on in the script to measure the starting time of Enano. |
20 * from very early on in the script to measure the starting time of Enano. |
19 * @return float |
21 * @return float |
20 */ |
22 */ |
30 } |
32 } |
31 |
33 |
32 $local_start = microtime_float(); |
34 $local_start = microtime_float(); |
33 |
35 |
34 // Disable for IE, it causes problems. |
36 // Disable for IE, it causes problems. |
35 if ( ( strstr(@$_SERVER['HTTP_USER_AGENT'], 'MSIE') /*|| true*/ ) && !isset($_GET['early']) ) |
37 if ( ( strstr(@$_SERVER['HTTP_USER_AGENT'], 'MSIE') || defined('ENANO_JS_DEBUG') ) && !isset($_GET['early']) ) |
36 { |
38 { |
37 header('HTTP/1.1 302 Redirect'); |
39 header('HTTP/1.1 302 Redirect'); |
38 header('Location: static/enano-lib-basic.js'); |
40 header('Location: static/enano-lib-basic.js'); |
39 exit(); |
41 exit(); |
40 } |
42 } |
70 // CONFIG |
72 // CONFIG |
71 |
73 |
72 // Files safe to run full (aggressive) compression on |
74 // Files safe to run full (aggressive) compression on |
73 $full_compress_safe = array( |
75 $full_compress_safe = array( |
74 // Sorted by file size, descending (du -b *.js | sort -n) |
76 // Sorted by file size, descending (du -b *.js | sort -n) |
|
77 'crypto.js', |
75 'ajax.js', |
78 'ajax.js', |
76 'libbigint.js', |
|
77 'editor.js', |
79 'editor.js', |
78 'functions.js', |
80 'functions.js', |
79 'login.js', |
81 'login.js', |
80 'acl.js', |
82 'acl.js', |
81 'misc.js', |
83 'misc.js', |
82 'comments.js', |
84 'comments.js', |
83 'rijndael.js', |
|
84 'autofill.js', |
85 'autofill.js', |
85 'dropdown.js', |
86 'dropdown.js', |
86 'paginate.js', |
87 'paginate.js', |
87 'md5.js', |
|
88 'enano-lib-basic.js', |
88 'enano-lib-basic.js', |
89 'SpryJSONDataSet.js', |
89 'SpryJSONDataSet.js', |
90 'pwstrength.js', |
90 'pwstrength.js', |
91 'sha256.js', |
|
92 'flyin.js', |
91 'flyin.js', |
93 'rank-manager.js', |
92 'rank-manager.js', |
94 'template-compiler.js', |
93 'template-compiler.js', |
95 'toolbar.js', |
94 'toolbar.js', |
96 'diffiehellman.js', |
|
97 'enanomath.js' |
|
98 ); |
95 ); |
99 |
96 |
100 // Files that should NOT be compressed due to already being compressed, licensing, or invalid produced code |
97 // Files that should NOT be compressed due to already being compressed, licensing, or invalid produced code |
101 $compress_unsafe = array('SpryEffects.js', 'json.js', 'fat.js', 'admin-menu.js', 'autofill.js'); |
98 $compress_unsafe = array('SpryEffects.js', 'json.js', 'fat.js', 'admin-menu.js', 'autofill.js'); |
102 |
99 |