땀똔의 프로필 사진

[티스토리] 첫 접속 시, 인사말 출력하기

    Information/For Tistory

 

 

   

 

Demo

 

 

 

보관함

 

dd-stuff.tistory.com

 

 

 

 

 

 

Installation

 

 

스킨 편집 - HTML에서,

</body> 태그 윗 라인에 스크립트 삽입.

 

 

 

 

 

 

Code

 

 

// 인사말
let fMsg = '환영합니다!';

// 인사말 지속시간 | 단위 - ms
let msgTimeout = 3000;

// 인사말 뒤에 아이콘 첨부 유무 | 0 - OFF | 1 - ON
let plusIcon = 1;

// 아이콘 링크
let msgIcon = 'https://t1.daumcdn.net/keditor/emoticon/face/small/049.png';

const _0x3560db=_0x5450;function _0x5450(_0x2cf128,_0x488082){const _0x9ebb6c=_0x9ebb();return _0x5450=function(_0x54501a,_0x5f2cdc){_0x54501a=_0x54501a-0x1bc;let _0x19f8ba=_0x9ebb6c[_0x54501a];return _0x19f8ba;},_0x5450(_0x2cf128,_0x488082);}(function(_0x2d7d20,_0x571f0d){const _0x868468=_0x5450,_0x32190b=_0x2d7d20();while(!![]){try{const _0x4a44bd=-parseInt(_0x868468(0x1c7))/0x1+-parseInt(_0x868468(0x1c5))/0x2*(parseInt(_0x868468(0x1bd))/0x3)+parseInt(_0x868468(0x1d1))/0x4*(-parseInt(_0x868468(0x1ce))/0x5)+parseInt(_0x868468(0x1ca))/0x6+parseInt(_0x868468(0x1cc))/0x7*(parseInt(_0x868468(0x1bc))/0x8)+parseInt(_0x868468(0x1cd))/0x9*(-parseInt(_0x868468(0x1cb))/0xa)+parseInt(_0x868468(0x1c2))/0xb*(parseInt(_0x868468(0x1c0))/0xc);if(_0x4a44bd===_0x571f0d)break;else _0x32190b['push'](_0x32190b['shift']());}catch(_0x5ce20a){_0x32190b['push'](_0x32190b['shift']());}}}(_0x9ebb,0x4edff));if(sessionStorage['getItem'](_0x3560db(0x1be))!='yes'){let userName,firstMsg;T['config']['USER'][_0x3560db(0x1c1)]==null?userName='':userName=T['config'][_0x3560db(0x1c3)]['name']+'님\x20';document[_0x3560db(0x1c8)]('body')[_0x3560db(0x1c4)](_0x3560db(0x1d0),'<div\x20id=\x22toast\x22\x20class=\x22reveal\x22>'+(userName+fMsg)+_0x3560db(0x1bf));plusIcon==0x1&&document['querySelector'](_0x3560db(0x1cf))['insertAdjacentHTML']('beforeend','\x20<img\x20src=\x22'+msgIcon+'\x22>');sessionStorage[_0x3560db(0x1c6)](_0x3560db(0x1be),'yes');let removeToast=setTimeout(()=>{const _0xc6312f=_0x3560db;document[_0xc6312f(0x1c8)]('#toast')['classList'][_0xc6312f(0x1c9)]('reveal'),clearTimeout(removeToast);},msgTimeout);}function _0x9ebb(){const _0x2cf40b=['2168QzcBPr','27ggOeEU','firstMsg','</div>','9156456ypKHih','name','11PmHWeW','USER','insertAdjacentHTML','121330Rrdbym','setItem','406315fPfOAx','querySelector','remove','2326674FbKhLe','10FkGcdK','8127HDDZnJ','904437RDZDqR','223960MvWYWS','#toast','afterbegin','8JYMNYq'];_0x9ebb=function(){return _0x2cf40b;};return _0x9ebb();}

 

#toast {
	position: fixed; width: fit-content; height: fit-content;
    padding: 24px; background-color: #171717; color: #fff;
    font-size: 20px; left: 50%; bottom: 100px;
    transform: translate(-50%); text-align: center;
    border-radius: 4px; z-index: 9999; display: none
}
#toast.reveal { display: block }
#toast > img { width: 64px; height: auto; vertical-align: middle }

@media (max-width: 860px) {
	#toast {
    	width: 80%; padding: 36px 20px;
        left: 50%; top: 50%;
        transform: translate(-50%, -50%)
	}
}