태그에 장비명 기록을 편리하게.. |
태그를 많이 쓰는 입장에서 90여개의 태그를 항상 정확하게 입력하기는 무리더라.. 그래서 확장앱이 필수였는데, 매크로 입력기 확장앱이 오락가락일 때가 왕왕 있고 알파벳 순서대로 정렬하는 것이 일인지라... 한 번 더 타이핑 한다는 생각으로 만들어본 스크립트.. 속이 시원하다.....
사용법 |
- 티스토리 에디터에서, F12 키를 눌러서 개발자도구를 로드.
- 콘솔 메뉴에서 아래의 코드를 붙여넣기 한 다음 엔터.
- 티스토리 에디터의 태그입력 칸을 클릭하면 에디터 좌측에 목록이 출력됨.
- 목록의 항목을 클릭하면 태그입력 칸이 포커스 됨.
- 붙여넣기.Ctrl + V
Code |
let gear = [];
gear = [
// 각 항목의,
// 첫번째 인자는 목록에 표시될 이름
// 두번째 인자는 실제로 입력될 내용
/*
['====== LENS ======', ''],
['A.Schacht 50mm', 'A.Schacht Ulm Edixa-Travenar-A 50mm F2.8'],
['Nikkor 50.8G', 'Nikkor AF-S 50mm F1.8G'],
['Zenit Zenitar 50.7', 'ZENIT Zenitar-M 50mm F1.7'],
['====== ETC ======', ''],
['켄코 텔레컨버터', 'Kenko 2X Tele Converter'],
['SB-800', 'Nikon SB-800'],
['TT350', 'Godox TT350'],
['====== BODY ======', ''],
['Canon G12', 'Canon PowerShot G12'],
['Kodak C875', 'Kodak EasyShare C875'],
['Sony A7R III', 'SONY ILCE-7RM3']
*/
['====== LENS ======', ''],
['', ''],
['', ''],
['', ''],
['====== ETC ======', ''],
['', ''],
['', ''],
['', ''],
['====== BODY ======', ''],
['', ''],
['', ''],
['', '']
];
function _0x21a3(_0x3a7a6d,_0x289b66){var _0x55e547=_0x55e5();return _0x21a3=function(_0x21a340,_0x384639){_0x21a340=_0x21a340-0x111;var _0x579e3f=_0x55e547[_0x21a340];return _0x579e3f;},_0x21a3(_0x3a7a6d,_0x289b66);}var _0xdbe3fa=_0x21a3;function _0x55e5(){var _0x35f5cd=['.editor_tag\x20.inp_tag','7147740mWnsOr','#gear\x20li:last-child','querySelector','4LGxJro','focus','indexOf','93878oEdmAx','clear','%cCopy\x20That!','remove','insertAdjacentHTML','#gear','2151280nNWCQK','288114NsBugy','tagName','large','clipboard','844004FEzIaU','3TdEvCV','49VxQIaH','11NZvWsO','color','beforeend','2302985keCsXn','2356767DnGkek','click','writeText','<li\x20id=gr'];_0x55e5=function(){return _0x35f5cd;};return _0x55e5();}(function(_0x1f78a2,_0x5a5e1a){var _0x2b4f96=_0x21a3,_0x472e9c=_0x1f78a2();while(!![]){try{var _0x3cbd5f=-parseInt(_0x2b4f96(0x118))/0x1+parseInt(_0x2b4f96(0x123))/0x2*(-parseInt(_0x2b4f96(0x124))/0x3)+-parseInt(_0x2b4f96(0x115))/0x4*(-parseInt(_0x2b4f96(0x129))/0x5)+-parseInt(_0x2b4f96(0x11f))/0x6*(parseInt(_0x2b4f96(0x125))/0x7)+-parseInt(_0x2b4f96(0x11e))/0x8+parseInt(_0x2b4f96(0x12a))/0x9+parseInt(_0x2b4f96(0x112))/0xa*(parseInt(_0x2b4f96(0x126))/0xb);if(_0x3cbd5f===_0x5a5e1a)break;else _0x472e9c['push'](_0x472e9c['shift']());}catch(_0x19558e){_0x472e9c['push'](_0x472e9c['shift']());}}}(_0x55e5,0x4d397),console[_0xdbe3fa(0x119)](),document['querySelector'](_0xdbe3fa(0x111))['addEventListener']('click',function(){var _0x53f72d=_0xdbe3fa;!document['querySelector']('#gear')&&(document[_0x53f72d(0x114)]('body')[_0x53f72d(0x11c)]('beforeend','<div\x20id=\x22gear\x22\x20style=\x22width:fit-content;\x20height:70%;\x20position:\x20absolute;\x20padding:14px;\x20background-color:#000;\x20color:#fff;\x20left:200px;\x20top:50%;\x20transform:translateY(-50%);\x20overflow-y:auto;\x20line-height:\x2034px;\x20cursor:pointer\x22></div>'),gear['forEach'](function(_0x4e89e4,_0x440d40){var _0x1cafe3=_0x53f72d;document['querySelector'](_0x1cafe3(0x11d))[_0x1cafe3(0x11c)](_0x1cafe3(0x128),_0x1cafe3(0x12d)+_0x440d40+'>'+_0x4e89e4[0x0]+'</li>'),document[_0x1cafe3(0x114)]('#gear\x20li:last-child')['innerText'][_0x1cafe3(0x117)]('======')!=-0x1&&(document['querySelector'](_0x1cafe3(0x113))['style'][_0x1cafe3(0x127)]='red',document[_0x1cafe3(0x114)]('#gear\x20li:last-child')['style']['fontSize']=_0x1cafe3(0x121));}),document['querySelector'](_0x53f72d(0x11d))['addEventListener'](_0x53f72d(0x12b),function(_0x447a64){var _0x5e376f=_0x53f72d;if(_0x447a64['target'][_0x5e376f(0x120)]=='LI'){var _0x370916=_0x447a64['target']['id'];_0x370916=Number(_0x370916['replace']('gr','')),_0x370916=gear[_0x370916][0x1],_0x370916!=''&&(navigator[_0x5e376f(0x122)][_0x5e376f(0x12c)](_0x370916),console['clear'](),setTimeout(console['log']['bind'](console,_0x5e376f(0x11a),'color:orange;\x20font-size:22px'),0xa)),setTimeout(()=>{var _0x232855=_0x5e376f;document[_0x232855(0x114)]('.editor_tag\x20.inp_tag\x20input')[_0x232855(0x116)]();},0x32);}else document['querySelector'](_0x5e376f(0x11d))[_0x5e376f(0x11b)]();}));}));