Ondřej Hruška 7 years ago
parent 276d3af7da
commit a25d0a4c05
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 5
      js/term/themes.js

@ -1,3 +1,4 @@
const $ = require('../lib/chibi')
const themes = exports.themes = [
[ // 0 - Tango - terminator
@ -99,12 +100,12 @@ exports.SELECTION_FG = '#333'
exports.SELECTION_BG = '#b2d7fe'
exports.themePreview = function (themeN) {
document.querySelectorAll('[data-fg]').forEach((elem) => {
$('[data-fg]').forEach((elem) => {
let shade = elem.dataset.fg
if (/^\d+$/.test(shade)) shade = exports.toCss(shade, themeN)
elem.style.color = shade
})
document.querySelectorAll('[data-bg]').forEach((elem) => {
$('[data-bg]').forEach((elem) => {
let shade = elem.dataset.bg
if (/^\d+$/.test(shade)) shade = exports.toCss(shade, themeN)
elem.style.backgroundColor = shade

Loading…
Cancel
Save