Skip to content

Commit db19c46

Browse files
committed
lint
1 parent 1466dae commit db19c46

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

javascript/token-counters.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function setupTokenCounting(id, id_counter, id_button) {
5656
prompt.parentElement.style.position = "relative";
5757

5858
var func = onEdit(id, textarea, 800, function() {
59-
if(counter.classList.contains("token-counter-visible")){
59+
if (counter.classList.contains("token-counter-visible")) {
6060
gradioApp().getElementById(id_button)?.click();
6161
}
6262
});
@@ -68,20 +68,20 @@ function toggleTokenCountingVisibility(id, id_counter, id_button) {
6868
var counter = gradioApp().getElementById(id_counter);
6969

7070
counter.style.display = opts.disable_token_counters ? "none" : "block";
71-
counter.classList.toggle("token-counter-visible", ! opts.disable_token_counters);
71+
counter.classList.toggle("token-counter-visible", !opts.disable_token_counters);
7272
}
7373

74-
function runCodeForTokenCounters(fun){
74+
function runCodeForTokenCounters(fun) {
7575
fun('txt2img_prompt', 'txt2img_token_counter', 'txt2img_token_button');
7676
fun('txt2img_neg_prompt', 'txt2img_negative_token_counter', 'txt2img_negative_token_button');
7777
fun('img2img_prompt', 'img2img_token_counter', 'img2img_token_button');
7878
fun('img2img_neg_prompt', 'img2img_negative_token_counter', 'img2img_negative_token_button');
7979
}
8080

81-
onUiLoaded(function(){
81+
onUiLoaded(function() {
8282
runCodeForTokenCounters(setupTokenCounting);
8383
});
8484

85-
onOptionsChanged(function(){
85+
onOptionsChanged(function() {
8686
runCodeForTokenCounters(toggleTokenCountingVisibility);
8787
});

0 commit comments

Comments
 (0)