refactor a tiny bit

This commit is contained in:
Send_Nukez 2021-11-10 23:02:26 +01:00
parent 2e00ea05a0
commit 1131ccbf91
2 changed files with 2 additions and 1 deletions

View file

@ -128,7 +128,7 @@ export default class ConfigMenu {
const resetButton = elem.querySelector(".dribbblish-config-item-reset");
if (resetButton) {
elem.querySelector(".dribbblish-config-item-reset").addEventListener("click", () => {
resetButton.addEventListener("click", () => {
this.reset(options.key);
const defaultVal = this.get(options.key);
if (options.type == "checkbox") {

View file

@ -6,6 +6,7 @@ export function waitForElement(els, func, timeout = 100) {
setTimeout(waitForElement, 300, els, func, --timeout);
}
}
export function copyToClipboard(text) {
var input = document.createElement("textarea");
input.style.display = "fixed";