From ee4c4a1b5a5840c1b9d2d8c74b3f4298dd52928b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 11 Mar 2006 21:01:48 +0100 Subject: Automatic draft saving DokuWiki now automatically creates a draft file of the currently edited page. In case of an editing interuption (eg. Browsercrash) the draftfile can be continued later. darcs-hash:20060311200148-7ad00-919337a51e001136178d175a1755cd26122e9726.gz --- lib/scripts/script.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/scripts/script.js') diff --git a/lib/scripts/script.js b/lib/scripts/script.js index e05aeb0fe..87fd8e503 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -40,6 +40,16 @@ function $() { return elements; } +/** + * Simple function to check if a global var is defined + * + * @author Kae Verens + * @link http://verens.com/archives/2005/07/25/isset-for-javascript/#comment-2835 + */ +function isset(varname){ + return(typeof(window[varname])!='undefined'); +} + /** * Get the X offset of the top left corner of the given object * -- cgit v1.2.3