땀똔의 프로필 사진

티스토리, 책갈피 기능 만들기 with 인용문

    Information/For Tistory

 

   

 

Demo

 

에디터의 인용2, 인용3를 문단 제목으로 정하고 여기에 책갈피 기능을 넣는 것!

 

 

 

[Demo] Add Bookmark for Tistory

인용1 때아닌 비처럼 갑작스런 이별에 그냥 주저 앉아서 멍하니 하늘만 보네 이세상에 믿었던 내님 변할줄이야 누굴 믿고 사나 난 어디로 가야만 하나 비바람에 꺾어진 저나무처럼 처량하구나

dd-stuff.tistory.com

 

 

 

 

Code

 

 

/* Javascript */

function _0x29ac(_0x13ada6,_0xab3627){var _0x453085=_0x4530();return _0x29ac=function(_0x29ac66,_0x1822dc){_0x29ac66=_0x29ac66-0x1d5;var _0x3260fc=_0x453085[_0x29ac66];return _0x3260fc;},_0x29ac(_0x13ada6,_0xab3627);}function _0x4530(){var _0x230d0c=['44804485HJNPrv','insertAdjacentHTML','querySelectorAll','position','4773057FEJdgZ','5446132xAMLQy','display','\x22\x20style=\x22width:1px;\x20height:','offsetTop','405TiAujl','DOMContentLoaded','block','smooth','34497FCqQWO','#Bookmark','length','classList','scrollY','push','px;\x20position:absolute\x22></div>','none','active','getAttribute','style','</a></p>','querySelector','add','.container_postbtn','afterend','innerText','isIntersecting','34WwDrKc','70517PLuEjo','50034IXxLMS','3632lsuZAJ','\x27\x20title=\x27','setAttribute','observe','class','addEventListener','blockquote','forEach','tt-body-page','body',')\x20a','<div\x20id=\x22bm','remove','3170PHCeCH','replace','5516KCPERH','<p><a\x20position=\x27','#Bookmark\x20p\x20a'];_0x4530=function(){return _0x230d0c;};return _0x4530();}var _0xa2c589=_0x29ac;(function(_0x367167,_0x24d36f){var _0xbaa0cd=_0x29ac,_0x5cf72d=_0x367167();while(!![]){try{var _0xbbee89=-parseInt(_0xbaa0cd(0x1f9))/0x1*(parseInt(_0xbaa0cd(0x1f8))/0x2)+-parseInt(_0xbaa0cd(0x1dd))/0x3+-parseInt(_0xbaa0cd(0x1de))/0x4+parseInt(_0xbaa0cd(0x1e2))/0x5*(-parseInt(_0xbaa0cd(0x1fa))/0x6)+parseInt(_0xbaa0cd(0x1d6))/0x7*(parseInt(_0xbaa0cd(0x1fb))/0x8)+parseInt(_0xbaa0cd(0x1e6))/0x9*(parseInt(_0xbaa0cd(0x208))/0xa)+parseInt(_0xbaa0cd(0x1d9))/0xb;if(_0xbbee89===_0x24d36f)break;else _0x5cf72d['push'](_0x5cf72d['shift']());}catch(_0x171c30){_0x5cf72d['push'](_0x5cf72d['shift']());}}}(_0x4530,0xc7fcc),document[_0xa2c589(0x200)](_0xa2c589(0x1e3),function(){var _0x533714=_0xa2c589;if(document[_0x533714(0x1f2)]('body')['id']==_0x533714(0x203)&&document[_0x533714(0x1db)](_0x533714(0x201))[_0x533714(0x1e8)]>0x1){document['querySelector'](_0x533714(0x204))[_0x533714(0x1da)]('beforeend','<div\x20id=\x27Bookmark\x27></div>');var _0x4d2bfd=0x1;document['querySelectorAll'](_0x533714(0x201))[_0x533714(0x202)](function(_0x4127e5){var _0x39339a=_0x533714;_0x4127e5[_0x39339a(0x1fd)]('id','mark'+_0x4d2bfd);var _0x5be272=_0x4127e5[_0x39339a(0x1e1)];document[_0x39339a(0x1f2)](_0x39339a(0x1e7))[_0x39339a(0x1da)]('beforeend',_0x39339a(0x1d7)+_0x5be272+_0x39339a(0x1fc)+_0x4127e5[_0x39339a(0x1f6)]+'\x27>'+_0x4127e5[_0x39339a(0x1f6)]+_0x39339a(0x1f1)),_0x4d2bfd++;});var _0x41de6e=[];document[_0x533714(0x1db)](_0x533714(0x1d8))[_0x533714(0x202)](function(_0x32ece4,_0x60590d){var _0x4a9c7e=_0x533714;_0x32ece4['setAttribute'](_0x4a9c7e(0x1ff),'');var _0x1776f6;_0x60590d>0x0?_0x1776f6=Number(_0x32ece4[_0x4a9c7e(0x1ef)]('position')):_0x1776f6=_0x32ece4['getAttribute'](_0x4a9c7e(0x1dc)),_0x41de6e[_0x4a9c7e(0x1eb)](_0x1776f6);}),_0x41de6e[_0x533714(0x1eb)](document[_0x533714(0x1f2)](_0x533714(0x1f4))[_0x533714(0x1e1)]);var _0x14a240=[];for(var _0x2e60dd=0x0;_0x2e60dd<_0x41de6e[_0x533714(0x1e8)]-0x1;_0x2e60dd++){var _0x34b23d=_0x41de6e[_0x2e60dd]-_0x41de6e[_0x2e60dd+0x1];_0x34b23d=String(_0x34b23d)[_0x533714(0x1d5)]('-',''),_0x14a240[_0x533714(0x1eb)](_0x34b23d);}document['querySelectorAll'](_0x533714(0x201))[_0x533714(0x202)](function(_0x42ba91,_0x825d7a){var _0x1b5c87=_0x533714;_0x42ba91[_0x1b5c87(0x1da)](_0x1b5c87(0x1f5),_0x1b5c87(0x206)+_0x825d7a+_0x1b5c87(0x1e0)+(Number(_0x14a240[_0x825d7a])-0xc8)+_0x1b5c87(0x1ec));});const _0x6c80e2=new IntersectionObserver(_0x2fc0b0=>{var _0x2f81e3=_0x533714;_0x2fc0b0[_0x2f81e3(0x202)](_0x1ccd8f=>{var _0x5ad3e5=_0x2f81e3;const _0x530dda=_0x1ccd8f['target'];var _0x15850c=_0x530dda['id'];_0x15850c=_0x15850c[_0x5ad3e5(0x1d5)]('bm',''),_0x15850c=Number(_0x15850c)+0x1,_0x1ccd8f[_0x5ad3e5(0x1f7)]?document[_0x5ad3e5(0x1f2)]('#Bookmark\x20p:nth-child('+_0x15850c+_0x5ad3e5(0x205))[_0x5ad3e5(0x1e9)][_0x5ad3e5(0x1f3)](_0x5ad3e5(0x1ee)):document[_0x5ad3e5(0x1f2)]('#Bookmark\x20p:nth-child('+_0x15850c+_0x5ad3e5(0x205))[_0x5ad3e5(0x1e9)][_0x5ad3e5(0x207)](_0x5ad3e5(0x1ee));});}),_0x31cc58=document[_0x533714(0x1db)]('div[id*=bm]');_0x31cc58[_0x533714(0x202)](_0x2c9430=>{var _0x140362=_0x533714;_0x6c80e2[_0x140362(0x1fe)](_0x2c9430);}),document[_0x533714(0x200)]('scroll',function(){var _0x58ced1=_0x533714;if(window[_0x58ced1(0x1ea)]>=document['querySelector'](_0x58ced1(0x201))[_0x58ced1(0x1e1)])document[_0x58ced1(0x1f2)](_0x58ced1(0x1e7))[_0x58ced1(0x1f0)][_0x58ced1(0x1df)]=_0x58ced1(0x1e4);else window[_0x58ced1(0x1ea)]<document['querySelector']('blockquote')[_0x58ced1(0x1e1)]&&(document[_0x58ced1(0x1f2)](_0x58ced1(0x1e7))['style'][_0x58ced1(0x1df)]=_0x58ced1(0x1ed));window[_0x58ced1(0x1ea)]>document['querySelector'](_0x58ced1(0x1f4))[_0x58ced1(0x1e1)]&&(document[_0x58ced1(0x1f2)](_0x58ced1(0x1e7))['style'][_0x58ced1(0x1df)]=_0x58ced1(0x1ed));}),document[_0x533714(0x1db)]('#Bookmark\x20p\x20a')[_0x533714(0x202)](function(_0x5b4620){var _0x5b1270=_0x533714;_0x5b4620[_0x5b1270(0x200)]('click',function(){var _0x1dd61c=_0x5b1270;window['scrollTo']({'top':_0x5b4620[_0x1dd61c(0x1ef)](_0x1dd61c(0x1dc)),'behavior':_0x1dd61c(0x1e5)});});});}}));

 

 

/* CSS */

#Bookmark {
    display: none; position: fixed; width: 280px; right: 30px; top: 50%;
    transform: translateY(-50%); line-height: 1.6; background-color: #121212;
    color: #fff; border-radius: 3px; padding: 16px
}
#Bookmark p { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; cursor: pointer }
#Bookmark p a:before { content: "⚝ " }