Created
September 4, 2016 00:36
-
-
Save AldanaQuintana/ea8f16d6dc1c4b72e5bd340709a6f060 to your computer and use it in GitHub Desktop.
This file contains 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
javascript:(function(){ | |
if(window.location["href"].match("slack") == null){ return; } | |
var editIfDblClick = function(){ | |
document.addEventListener('dblclick', function(e){ | |
var target = e.target; | |
if(target.hasAttribute('class', 'message_body')){ | |
target.closest("ts-message").getElementsByClassName("action_hover_container")[0].querySelector("a[data-action='actions_menu']").click(); | |
document.getElementById("edit_link").click(); | |
} | |
}) | |
} | |
editIfDblClick(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment