customCSS 추가
장수 아이콘에 generalIcon 클래스 추가
This commit is contained in:
@@ -150,4 +150,9 @@ jQuery(function($){
|
||||
},
|
||||
html:true
|
||||
});
|
||||
|
||||
var customCSS = localStorage.getItem('sam_customCSS');
|
||||
if(customCSS){
|
||||
$('<style type="text/css">\n'+customCSS+'\n</style>').appendTo($('head'));
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -402,7 +402,7 @@ function activateMessageForm(){
|
||||
jQuery(function($){
|
||||
|
||||
//tmp_template.html은 추후 msg.js에 통합될 수 있음
|
||||
var getTemplate = $.get('js/templates/message.html',function(obj){
|
||||
var getTemplate = $.get('js/templates/message.html?3',function(obj){
|
||||
messageTemplate = obj;
|
||||
});
|
||||
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
@@ -5,9 +5,9 @@
|
||||
>
|
||||
<div class="msg_icon">
|
||||
<%if(src.icon){ %>
|
||||
<img width='64' height='64' src="<%encodeURI(src.icon)%>">
|
||||
<img class='generalIcon' width='64' height='64' src="<%encodeURI(src.icon)%>">
|
||||
<%} else {%>
|
||||
<img width='64' height='64' src="<%encodeURI(defaultIcon)%>">
|
||||
<img class='generalIcon' width='64' height='64' src="<%encodeURI(defaultIcon)%>">
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="msg_body">
|
||||
|
||||
Reference in New Issue
Block a user