diff options
author | Scott Ullrich <sullrich@pfSense.org> | 2010-02-07 15:22:32 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfSense.org> | 2010-02-07 15:22:32 -0500 |
commit | 838fa668b965233eac4b780fc28451ac5aa1ad6d (patch) | |
tree | 28f48d627e16225b9fcabea7b0e209f81fecb1f7 /usr/local/www | |
parent | 2494295a68cec082d335ee464beb67233042586a (diff) | |
download | pfsense-838fa668b965233eac4b780fc28451ac5aa1ad6d.zip pfsense-838fa668b965233eac4b780fc28451ac5aa1ad6d.tar.gz |
Link to javascript file instea of including it on every request saving WAN bandwidth
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/index.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index b03d4f0..77cfaaa 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -696,7 +696,8 @@ echo $jscriptstr; domTT_activate('welcome1', null, 'x', 287, 'y', 107, 'content', document.getElementById('welcome-container'), 'type', 'sticky', 'closeLink', '','delay', 1000, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle'); <?php } ?> }); - <?php +</script> +<?php //build list of javascript include files $jsincludefiles = array(); $directory = "widgets/javascript/"; @@ -707,10 +708,10 @@ echo $jscriptstr; } foreach($jsincludefiles as $jsincludename) { if(!stristr($jsincludename, ".js")) - continue; - include($directory . $jsincludename); + continue; + echo "<script src='{$directory}{$jsincludename}' type='text/javascript'></script>\n"; } - ?> +?> </script> </form> </body> |