summaryrefslogtreecommitdiff
path: root/lib/scripts/script.js
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-03-11 21:01:48 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-03-11 21:01:48 +0100
commitee4c4a1b5a5840c1b9d2d8c74b3f4298dd52928b (patch)
treeec7011afc97d0159819e8b334709fe0680cab9b1 /lib/scripts/script.js
parent6d8affe6a4c62d13d1cd6051c23ab305145f9db6 (diff)
downloadrpg-ee4c4a1b5a5840c1b9d2d8c74b3f4298dd52928b.tar.gz
rpg-ee4c4a1b5a5840c1b9d2d8c74b3f4298dd52928b.tar.bz2
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
Diffstat (limited to 'lib/scripts/script.js')
-rw-r--r--lib/scripts/script.js10
1 files changed, 10 insertions, 0 deletions
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
@@ -41,6 +41,16 @@ function $() {
}
/**
+ * 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
*
* @link http://www.quirksmode.org/index.html?/js/findpos.html