refacor: customCSS 코드 분리

This commit is contained in:
2021-12-16 03:23:11 +09:00
parent 7631d99ce6
commit d736e2d947
3 changed files with 16 additions and 15 deletions
+5 -9
View File
@@ -11,21 +11,17 @@ import { nl2br } from "@util/nl2br";
import jQuery from "jquery";
import "@scss/common_legacy.scss";
import { insertCustomCSS } from "./util/customCSS";
import { htmlReady } from "./util/htmlReady";
exportWindow(jQuery, '$');
exportWindow(jQuery, 'jQuery');
jQuery(function ($) {
htmlReady(function(){
initTooltip();
activateFlip();
const customCSS = localStorage.getItem('sam_customCSS');
if (customCSS) {
const $style = $('<style type="text/css"></style>');
$style.text(customCSS);
$style.appendTo($('head'));
}
});
insertCustomCSS();
})
/**
* {0}, {1}, {2}형태로 포맷해주는 함수