Last active
March 17, 2017 18:47
-
-
Save dvingerh/6f6853f5ec7613a008d2c8d752a4e1fa to your computer and use it in GitHub Desktop.
Discord Userscript: Adds functionality to edit messages by doubleclicking them. (Discord Double Click Edit)
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
// ==UserScript== | |
// @name Discord Double Click Edit | |
// @description Adds functionality to edit messages by doubleclicking them | |
// @namespace Violentmonkey Scripts | |
// @grant GM_addStyle | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// @match *://discordapp.com/* | |
// | |
// ==/UserScript== | |
$('body').on('dblclick', '.message', function() { | |
var dropdown = $(this).find('.btn-option'); | |
dropdown.trigger( "click" ); | |
$(".popout .btn-item").parent().css("opacity", 0); | |
$.each($(".popout .btn-item"), (index, value) => { | |
var option = $(value); | |
if(option.text() === "Edit") { | |
option.click(); | |
} | |
}); | |
}); | |
//Credit https://github.com/Jiiks/BetterDiscordApp/blob/master/Plugins/dblClickEdit.plugin.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment