Demo |
Code |
<!-- A 태그 or BUTTON 태그 -->
<p style="text-align: center;"><a id="logBtn" rel="noopener noreferrer">Log-In</a></p>
<!--<p style="text-align: center;"><button id="logBtn" style="background: #151515; color: #eee; padding: 12px 24px; border-radius: 8px" rel="noopener noreferrer">Log-In</button></p>-->
/* 사용자 설정 시작 */
// 버튼 타입 || 0 - A 태그 | 1 - BUTTON 태그
let iBtnType = 0;
// 버튼 문구
let lBtnText1 = '로그인';
let lBtnText2 = '로그아웃';
/* 사용자 설정 끝 */
var _0x587590=_0x9491;function _0x9491(_0x4a8787,_0x2d5e03){var _0x2226a3=_0x2226();return _0x9491=function(_0x9491b8,_0x125874){_0x9491b8=_0x9491b8-0x10b;var _0x535794=_0x2226a3[_0x9491b8];return _0x535794;},_0x9491(_0x4a8787,_0x2d5e03);}function _0x2226(){var _0x1aade8=['https://www.tistory.com/auth/logout/?redirectUrl=','6qnIEfZ','2QhCXWx','guest','href','user','click','querySelector','3jVvHEb','10700074iCKftE','#logBtn','3455324HpgycC','10uFwuzj','https://www.tistory.com/auth/login/?redirectUrl=','ROLE','innerText','owner','manager','5244624FheddD','622642GlKyMV','4893602DekOrL','setAttribute','6193035VHIdCg','addEventListener','config','4754275TCrnIf'];_0x2226=function(){return _0x1aade8;};return _0x2226();}(function(_0x13befd,_0x56a8fb){var _0x30944e=_0x9491,_0x49a524=_0x13befd();while(!![]){try{var _0x5213bc=-parseInt(_0x30944e(0x10c))/0x1*(-parseInt(_0x30944e(0x115))/0x2)+parseInt(_0x30944e(0x11b))/0x3*(-parseInt(_0x30944e(0x11e))/0x4)+-parseInt(_0x30944e(0x112))/0x5+-parseInt(_0x30944e(0x114))/0x6*(-parseInt(_0x30944e(0x10d))/0x7)+-parseInt(_0x30944e(0x10b))/0x8+parseInt(_0x30944e(0x10f))/0x9+parseInt(_0x30944e(0x11f))/0xa*(parseInt(_0x30944e(0x11c))/0xb);if(_0x5213bc===_0x56a8fb)break;else _0x49a524['push'](_0x49a524['shift']());}catch(_0x309629){_0x49a524['push'](_0x49a524['shift']());}}}(_0x2226,0x7d139),window[_0x587590(0x110)]('load',()=>{var _0x4e50fc=_0x587590;if(iBtnType==0x0){if(window['T'][_0x4e50fc(0x111)]['ROLE']==_0x4e50fc(0x116))document['querySelector']('#logBtn')[_0x4e50fc(0x10e)](_0x4e50fc(0x117),_0x4e50fc(0x120)+location[_0x4e50fc(0x117)]),document[_0x4e50fc(0x11a)](_0x4e50fc(0x11d))[_0x4e50fc(0x122)]=lBtnText1;else(window['T']['config']['ROLE']=='owner'||window['T'][_0x4e50fc(0x111)][_0x4e50fc(0x121)]==_0x4e50fc(0x124)||window['T'][_0x4e50fc(0x111)][_0x4e50fc(0x121)]==_0x4e50fc(0x118))&&(document[_0x4e50fc(0x11a)](_0x4e50fc(0x11d))[_0x4e50fc(0x10e)](_0x4e50fc(0x117),_0x4e50fc(0x113)+location[_0x4e50fc(0x117)]),document[_0x4e50fc(0x11a)](_0x4e50fc(0x11d))['innerText']=lBtnText2);}else{if(iBtnType==0x1){if(window['T'][_0x4e50fc(0x111)]['ROLE']==_0x4e50fc(0x116))document[_0x4e50fc(0x11a)]('#logBtn')[_0x4e50fc(0x122)]=lBtnText1,document[_0x4e50fc(0x11a)](_0x4e50fc(0x11d))['addEventListener'](_0x4e50fc(0x119),()=>{var _0x5e00ac=_0x4e50fc;location['href']=_0x5e00ac(0x120)+location[_0x5e00ac(0x117)];},{'once':!![]});else(window['T'][_0x4e50fc(0x111)][_0x4e50fc(0x121)]==_0x4e50fc(0x123)||window['T']['config'][_0x4e50fc(0x121)]==_0x4e50fc(0x124)||window['T']['config'][_0x4e50fc(0x121)]=='user')&&(document['querySelector'](_0x4e50fc(0x11d))[_0x4e50fc(0x122)]=lBtnText2,document[_0x4e50fc(0x11a)](_0x4e50fc(0x11d))[_0x4e50fc(0x110)](_0x4e50fc(0x119),()=>{var _0x53aa7c=_0x4e50fc;location[_0x53aa7c(0x117)]='https://www.tistory.com/auth/logout/?redirectUrl='+location[_0x53aa7c(0x117)];},{'once':!![]}));}}},{'once':!![]}));