]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/layouts/site.html.erb
Trigger remote editor correctly
[rails.git] / app / views / layouts / site.html.erb
index 9927782ca66f49c825aaaa2a8f13a5023e066332..9e602b193628afb9753357654bf1c64c073fc847 100644 (file)
     </div>
 
     <script type="text/javascript">
-    document.observe("dom:loaded", function () {
-      var auth_token = $$("meta[name=csrf-token]")[0].content;
+    $(document).ready(function () {
+      var auth_token = $("meta[name=csrf-token]").attr("content");
 
-      $$("form input[name=authenticity_token]").each(function (input) {
-        input.value = auth_token;
-      });
+      $("form input[name=authenticity_token]").val(auth_token);
     });
     </script>