mirror of
https://github.com/EndPwnArchive/EndPwn3Plugins.git
synced 2024-08-14 23:57:06 +00:00
20 lines
No EOL
647 B
JavaScript
20 lines
No EOL
647 B
JavaScript
exports.meta = {
|
|
author: "Cynosphere, Jiiks",
|
|
name: "Double Click Edit",
|
|
desc: "Double click messages to edit them."
|
|
}
|
|
exports.start = function(){
|
|
document.addEventListener("dblclick", ev => {
|
|
let target = ev.target;
|
|
if(target.className.includes("markup")) {
|
|
let msg = target;
|
|
let opt = msg.parentNode.querySelector(".btn-option");
|
|
opt.click();
|
|
let options = document.querySelectorAll(".option-popout .btn-item");
|
|
for(i in options){
|
|
let o = options[i];
|
|
if(o.innerHTML == "Edit") o.click();
|
|
}
|
|
}
|
|
});
|
|
} |