]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/question_edit.html
Adds the option to save filters in the node management.
[osqa.git] / forum / skins / default / templates / question_edit.html
index 47af6bf813a14012af33c86de73a25297ea9450f..402a0eb56b27a8e48214ad35c0053b8fe07564e4 100644 (file)
@@ -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;
             }
         }
 
         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);