From b1a4fe22eac2a6d5a864d987f37fdc87e3e55d80 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 7 May 2006 18:53:08 +0200 Subject: empty default title for inserted images #770 darcs-hash:20060507165308-7ad00-3526c8c4e5d8c10a8e003068008e2344e94e1739.gz --- lib/exe/js.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/exe/js.php') 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 */ function js_runonstart($func){ - echo "addInitEvent(function(){ $func; });\n"; + echo "addInitEvent(function(){ $func; });".NL; } /** -- cgit v1.2.3