Created
October 9, 2013 23:16
-
-
Save vly/6910198 to your computer and use it in GitHub Desktop.
create an edit button. Paste into the Console.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var test = function() { | |
| var a = $('.answer-official-heading').parent(), | |
| _id = a[0].getAttribute('id').split('-')[1], | |
| _url = window.location.pathname; | |
| _url += '/answers/' + _id + '/edit'; | |
| a.children()[1].insertAdjacentHTML('beforeend', '<span class="answer-published"><a href="' + _url + '">Edit</a></span>'); | |
| };test() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment