edit: autostart mode on #edit hash
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 14 Sep 2017 15:40:39 +0000 (17:40 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 18 Sep 2017 18:21:28 +0000 (20:21 +0200)
edit.js

diff --git a/edit.js b/edit.js
index 0d45de956e133ee68256e4d2701cfe76e910adcd..164cc1ef9829a2add8472ebe617771bd99a90c70 100644 (file)
--- a/edit.js
+++ b/edit.js
@@ -99,6 +99,9 @@ if (pagebody) {
                document.body.className = toggled ? '' : 'edit';
                return false;
        };
+       if (window.location.hash == '#edit') {
+               editlink.onclick();
+       }
        document.querySelector('header ul').appendChild(editlink);
 }