-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtextFields.js
41 lines (38 loc) · 1.02 KB
/
textFields.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* Coded with love by Failfa.st
* LICENSE: AGPL 3.0
* https://github.com/failfa-st/failfast-comfyui-extensions/blob/main/LICENSE
*
* Visit https://github.com/failfa-st/failfast-comfyui-extensions for more info
*
* Homepage: https://failfa.st
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "/scripts/app.js";
import { $el } from "/scripts/ui.js";
/**
* Font size of prompt fields
*/
const connectionsWidthName = "Failfast.textFields";
app.registerExtension({
name: connectionsWidthName,
async init(app) {
const style = $el("style");
document.body.append(style);
app.ui.settings.addSetting({
id: connectionsWidthName,
name: "Font size for textareas",
type: "slider",
attrs: {
min: 10,
max: 24,
},
tooltip: "The size of the font in prompts.",
defaultValue: 10,
onChange(value) {
style.innerText = `.comfy-multiline-input {font-size: ${value}px}`;
},
});
},
});