customCSS 추가

장수 아이콘에 generalIcon 클래스 추가
This commit is contained in:
2018-08-31 20:25:10 +09:00
parent 0483c75dd7
commit f79fc98ba6
31 changed files with 136 additions and 22 deletions
+34
View File
@@ -0,0 +1,34 @@
jQuery(function($){
var initCustomCSSForm = function(){
var lastTimeOut = null;
var $obj = $('#custom_css');
var key = 'sam_customCSS';
var text = localStorage.getItem(key);
if(text){
$obj.val(text);
console.log(text);
}
if($obj.on('change keyup paste', function(){
var newText = $obj.val();
if(text == newText){
return;
}
if(lastTimeOut){
clearTimeout(lastTimeOut);
}
$obj.css('background-color', '#222222');
lastTimeOut = setTimeout(function(){
text = $obj.val();
localStorage.setItem(key, text);
$obj.css('background-color', 'black');
}, 500);
}));
}
initCustomCSSForm();
});