X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/c1a4dfda807ca08de7d3370fc421abc39d411264..ee7cd8daedc243f04e5f619b94239371c87e0fcc:/forum/skins/default/templates/question_edit.html diff --git a/forum/skins/default/templates/question_edit.html b/forum/skins/default/templates/question_edit.html index 47af6bf..402a0eb 100644 --- a/forum/skins/default/templates/question_edit.html +++ b/forum/skins/default/templates/question_edit.html @@ -62,7 +62,7 @@ }); function submitClicked(e) { - if(!is_chrome) { + if(!(browserTester('chrome') || browserTester('safari'))) { $("input.submit")[0].disabled=true; $("input.submit")[1].disabled=true; } @@ -70,14 +70,8 @@ } function beforeUnload(e) { - var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; - if($("input#id_title")[0].value != title || $("textarea#editor")[0].value != body || $("input#id_tags")[0].value != tag) { - if(is_chrome) { - return "You sure you want to leave? Your work will be lost."; - } else { - yourWorkWillBeLost(e); - } + return yourWorkWillBeLost(e); } } window.addEventListener('beforeunload', beforeUnload, true);