mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-06-08 09:12:22 +00:00
refactor a tiny bit
This commit is contained in:
parent
2e00ea05a0
commit
1131ccbf91
2 changed files with 2 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ export default class ConfigMenu {
|
||||||
|
|
||||||
const resetButton = elem.querySelector(".dribbblish-config-item-reset");
|
const resetButton = elem.querySelector(".dribbblish-config-item-reset");
|
||||||
if (resetButton) {
|
if (resetButton) {
|
||||||
elem.querySelector(".dribbblish-config-item-reset").addEventListener("click", () => {
|
resetButton.addEventListener("click", () => {
|
||||||
this.reset(options.key);
|
this.reset(options.key);
|
||||||
const defaultVal = this.get(options.key);
|
const defaultVal = this.get(options.key);
|
||||||
if (options.type == "checkbox") {
|
if (options.type == "checkbox") {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ export function waitForElement(els, func, timeout = 100) {
|
||||||
setTimeout(waitForElement, 300, els, func, --timeout);
|
setTimeout(waitForElement, 300, els, func, --timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function copyToClipboard(text) {
|
export function copyToClipboard(text) {
|
||||||
var input = document.createElement("textarea");
|
var input = document.createElement("textarea");
|
||||||
input.style.display = "fixed";
|
input.style.display = "fixed";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue