diff --git a/main.js b/main.js index 2de2709..5c7c85f 100644 --- a/main.js +++ b/main.js @@ -19,7 +19,8 @@ var defaultsettings = password: "", sync: false, tagsinlists: true, - tagfilter: "" + tagfilter: "", + darkcode: true }; //builtin @@ -2013,17 +2014,26 @@ function rawline2html(line, index, options) { options.code = true; options.language = line.substring(3); - line = "
" + line.replace(new RegExp("(" + options.language + ")"), "$1") + "
"; + if (settings.darkcode) + { + line = "
" + line.replace(new RegExp("(" + options.language + ")"), "$1") + "
"; + } } else if (line == "```" && options.code) { options.code = false; options.language = ""; - line = "
" + line + "
"; + if (settings.darkcode) + { + line = "
" + line + "
"; + } } else if (options.code) { - line = "
" + (line || emptyline) + "
"; + if (settings.darkcode) + { + line = "
" + (line || emptyline) + "
"; + } if (languagekeywords[options.language]) { var keywords = languagekeywords[options.language]; diff --git a/style.css b/style.css index 99b4e93..51a28c2 100644 --- a/style.css +++ b/style.css @@ -136,4 +136,10 @@ body::-webkit-scrollbar-thumb { cursor: pointer; background-color: darkgray; margin: 2px 2px 2px 2px; +} + +/* colors */ +.color-code { + color:white; + background-color:black; } \ No newline at end of file