diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-05-07 18:53:08 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-05-07 18:53:08 +0200 |
commit | b1a4fe22eac2a6d5a864d987f37fdc87e3e55d80 (patch) | |
tree | dab3cf2bb85d47854a74475afeefd8da09c50a38 /lib/exe/js.php | |
parent | 1e8c9c9094d245009ab154e0d54487da0b7c833d (diff) | |
download | rpg-b1a4fe22eac2a6d5a864d987f37fdc87e3e55d80.tar.gz rpg-b1a4fe22eac2a6d5a864d987f37fdc87e3e55d80.tar.bz2 |
empty default title for inserted images #770
darcs-hash:20060507165308-7ad00-3526c8c4e5d8c10a8e003068008e2344e94e1739.gz
Diffstat (limited to 'lib/exe/js.php')
-rw-r--r-- | lib/exe/js.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/exe/js.php b/lib/exe/js.php index 05dfabac1..05effd31a 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -8,6 +8,7 @@ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) +if(!defined('NL')) define('NL',"\n"); require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/pageutils.php'); require_once(DOKU_INC.'inc/io.php'); @@ -130,10 +131,10 @@ function js_out(){ js_runonstart('scrollToMarker()'); // initialize init pseudo event - echo 'if (document.addEventListener) {'; - echo ' document.addEventListener("DOMContentLoaded", window.fireoninit, null);'; - echo '}'; - echo 'addEvent(window,"load",window.fireoninit);'; + echo 'if (document.addEventListener) {'.NL; + echo ' document.addEventListener("DOMContentLoaded", window.fireoninit, null);'.NL; + echo '}'.NL; + echo 'addEvent(window,"load",window.fireoninit);'.NL; // end output buffering and get contents $js = ob_get_contents(); @@ -205,7 +206,7 @@ function js_escape($string){ * @author Andreas Gohr <andi@splitbrain.org> */ function js_runonstart($func){ - echo "addInitEvent(function(){ $func; });\n"; + echo "addInitEvent(function(){ $func; });".NL; } /** |