]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/answer_edit.html
should now be working for chrome/safari/firefox. still need to fix markdown display...
[osqa.git] / forum / skins / default / templates / answer_edit.html
index fbea230c6cff3fd536d8b07486b0aa4abd399197..4265a3e28fac37d2b67df14a21d91f034268cfce 100644 (file)
@@ -36,7 +36,7 @@
 
 
         function submitClicked(e) {
-            if(!is_chrome) {
+            if(!(browserTester('chrome') || browserTester('safari'))) {
                 $("input.submit")[0].disabled=true;
                 $("input.submit")[1].disabled=true;
             }
         }
 
         function beforeUnload(e) {
-            var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
             if($("textarea#editor")[0].value != answer) {
-                 if(is_chrome) {
-                     return "Are you sure you want to leave?  Your work will be lost.";
-                 } else {
-                     yourWorkWillBeLost(e);
-                 }
+                 return yourWorkWillBeLost(e);
             }
         }
         window.addEventListener('beforeunload', beforeUnload, true);