Skip to content

Instantly share code, notes, and snippets.

@AldanaQuintana
Created September 4, 2016 00:36
Show Gist options
  • Save AldanaQuintana/ea8f16d6dc1c4b72e5bd340709a6f060 to your computer and use it in GitHub Desktop.
Save AldanaQuintana/ea8f16d6dc1c4b72e5bd340709a6f060 to your computer and use it in GitHub Desktop.
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