diff options
Diffstat (limited to 'lib/scripts')
-rw-r--r-- | lib/scripts/edit.js | 7 | ||||
-rw-r--r-- | lib/scripts/script.js | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index 5320c9419..215e647b5 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -341,9 +341,13 @@ function changeCheck(msg){ * JSnocheck class), add handlers to monitor changes * * Sets focus to the editbox as well + * + * @fixme this is old and crappy code. needs to be redone */ function initChangeCheck(msg){ - if(!document.getElementById){ return false; } + var edit_text = document.getElementById('wiki__text'); + if(!edit_text) return; + // add change check for links var links = document.getElementsByTagName('a'); for(var i=0; i < links.length; i++){ @@ -374,7 +378,6 @@ function initChangeCheck(msg){ btn_prev.onclick = function(){ textChanged = false; }; // add change memory setter - var edit_text = document.getElementById('wiki__text'); edit_text.onchange = function(){ textChanged = true; //global var summaryCheck(); diff --git a/lib/scripts/script.js b/lib/scripts/script.js index be3339525..948375a64 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -17,9 +17,6 @@ if (clientPC.indexOf('opera')!=-1) { var is_opera_seven = (window.opera && document.childNodes); } -// prepare empty toolbar for checks by lazy plugins -var toolbar = ''; - /** * Handy shortcut to document.getElementById * |