summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-10-28 13:09:39 -0400
committerChristopher Speller <crspeller@gmail.com>2015-10-28 13:09:39 -0400
commitc86df0f0c6c79c98238e8a1a84cb9fab5a69a635 (patch)
treef83da6b274ffc8ebb3e9cf67eb74d154d7e2983e /web/react/utils/utils.jsx
parentc6f3361d3caf671ca64b798d5ac9eca97c387f9e (diff)
downloadchat-c86df0f0c6c79c98238e8a1a84cb9fab5a69a635.tar.gz
chat-c86df0f0c6c79c98238e8a1a84cb9fab5a69a635.tar.bz2
chat-c86df0f0c6c79c98238e8a1a84cb9fab5a69a635.zip
Revert "PLT-395: Add syntax highlighting to Markdown code blocks"
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r--web/react/utils/utils.jsx26
1 files changed, 0 insertions, 26 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 3140a5d77..b643c6012 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -408,11 +408,6 @@ export function toTitleCase(str) {
}
export function applyTheme(theme) {
- if (!theme.codeTheme) {
- theme.codeTheme = Constants.DEFAULT_CODE_THEME;
- }
- updateCodeTheme(theme.codeTheme);
-
if (theme.sidebarBg) {
changeCss('.sidebar--left, .settings-modal .settings-table .settings-links, .sidebar--menu', 'background:' + theme.sidebarBg, 1);
}
@@ -599,27 +594,6 @@ export function rgb2hex(rgbIn) {
return '#' + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}
-export function updateCodeTheme(theme) {
- const path = '/static/css/highlight/' + theme + '.css';
- const $link = $('link.code_theme');
- if (path !== $link.attr('href')) {
- changeCss('code.hljs', 'visibility: hidden');
- var xmlHTTP = new XMLHttpRequest();
- xmlHTTP.open('GET', path, true);
- xmlHTTP.onload = function onLoad() {
- $link.attr('href', path);
- if (isBrowserFirefox()) {
- $link.one('load', () => {
- changeCss('code.hljs', 'visibility: visible');
- });
- } else {
- changeCss('code.hljs', 'visibility: visible');
- }
- };
- xmlHTTP.send();
- }
-}
-
export function placeCaretAtEnd(el) {
el.focus();
if (typeof window.getSelection != 'undefined' && typeof document.createRange != 'undefined') {