User:Canadabonk/sandbox.js: Difference between revisions
Content deleted Content added
Canadabonk (talk | contribs) No edit summary |
Canadabonk (talk | contribs) No edit summary |
||
Line 60: | Line 60: | ||
function updatecolors(){ |
function updatecolors(){ |
||
const |
const |
||
color = $(this).val(), |
|||
variable = $(this).closest('tr').attr('data-row'); |
variable = $(this).closest('tr').attr('data-row'); |
||
$(this).siblings('input').attr('value', |
$(this).siblings('input').attr('value', color); |
||
switch($(this).parent().attr('class')) { |
switch($(this).parent().attr('class')) { |
||
case 'lightcol': |
case 'lightcol': |
||
lightmodevars[variable] = |
lightmodevars[variable] = color; |
||
⚫ | |||
break; |
break; |
||
case 'darkcol': |
case 'darkcol': |
||
darkmodevars[variable] = |
darkmodevars[variable] = color; |
||
⚫ | |||
} |
} |
||
⚫ | |||
⚫ | |||
} |
} |
||
Line 79: | Line 79: | ||
colorlist += x + ": " + list[x] + '\n'; |
colorlist += x + ": " + list[x] + '\n'; |
||
} |
} |
||
document.getElementsByClassName(list)[0].innerHTML(colorlist); |
|||
} |
} |
||