모두의계산기

브라우저탭 알림_V6(0-1.kr/45)

by 최매슨생 2023. 12. 18.
본문글자
브라우저탭 알림 V6

브라우저탭 알림_V6_261015

탭 제목과 아이콘으로 알려주는 알람 · 타이머 · 루틴

미리보기

전체 제목:
아래 설정을 바꾸면 바로 반영됩니다. 알림은 이 페이지가 열려 있는 동안 울립니다.
자동저장 4초마다

1. 알람 · 스크롤 메모

알람 시간이 되면 탭 제목에 문구가 나오고 깜빡입니다. 문구와 메모를 쓰고 [알람 추가]를 누르면 목록에 쌓입니다.

    탭을 실수로 닫았을 때 안내 초안
    1. 같은 기기와 브라우저라면 이 페이지를 다시 열면 4초마다 저장된 설정이 돌아옵니다.
    2. [공유]로 만든 링크를 댓글에 남겨 두면, 다른 기기에서도 그 링크로 열어 복구합니다.
    3. 잘못 바꿨다면 되돌리기로 직전 상태를 불러옵니다.
    0-1.kr/45 · 출처: 스타트업ex _ cds1981@naver.com
    ' +'

    '+esc(VER)+' 으로 이동합니다. 이동하지 않으면 여기를 누르세요.

    ' +' \n'; } function refreshSave(){ var u=buildUrl(); $('bt-x-box').value=toText(buildRows(),'\t'); $('bt-h-len').textContent=u.length+'자'; $('bt-h-stat').textContent=u.length>8000?'주소가 길어 일부 브라우저에서 열리지 않을 수 있습니다. 엑셀(CSV)도 함께 저장하세요.':'파일을 열면 0-1.kr/45로 이동하고 설정이 채워집니다.'; } function closeUI(){ if(curPop){$(curPop).hidden=true;} curPop=''; document.body.classList.remove('bt-popup-open'); document.body.style.overflow=prevOverflow; popOpen=false; } function openPop(id){ if(popOpen){closeUI();} if(id==='bt-pop'){refreshPop();}else{refreshSave();} $(id).hidden=false; curPop=id; document.body.classList.add('bt-popup-open'); prevOverflow=document.body.style.overflow; document.body.style.overflow='hidden'; popOpen=true; hideTip(); try{if(location.hash!=='#btp'){location.hash='btp';}}catch(err){} } function closePop(){ if(!popOpen){return;} closeUI(); try{if(location.hash==='#btp'){history.back();}}catch(err){} } window.addEventListener('hashchange',function(){ if(popOpen&&location.hash!=='#btp'){closeUI();} },false); document.addEventListener('keydown',function(e){ if(popOpen&&(e.key==='Escape'||e.keyCode===27)){closePop();} },false); function makeShort(){ var st=$('bt-s-stat'); st.textContent='단축 URL을 만드는 중입니다…'; fetch('https://is.gd/create.php?format=json&url='+encodeURIComponent(origUrl)).then(function(r){return r.json();}).then(function(d){ if(d&&d.shorturl){ shortUrl=d.shorturl; $('bt-s-box').value=shortUrl; $('bt-s-len').textContent=shortUrl.length+'자 (원래의 '+Math.round(shortUrl.length/origUrl.length*100)+'%)'; st.textContent='만들었습니다. 복사하거나 공유하세요.'; }else{ throw new Error((d&&d.errormessage)||'응답 오류'); } }).catch(function(err){ st.textContent='단축에 실패했습니다. 잠시 뒤 다시 시도하거나 원래 URL을 쓰세요. ('+(err&&err.message?err.message:'네트워크 오류')+')'; }); } bind($('bt-share'),function(){openPop('bt-pop');}); bind($('bt-save'),function(){openPop('bt-spop');}); bind($('bt-pop-close'),closePop); bind($('bt-pop-bg'),closePop); bind($('bt-spop-close'),closePop); bind($('bt-spop-bg'),closePop); bind($('bt-o-copy'),function(){copyText(origUrl,'원래 URL을 복사했습니다');}); bind($('bt-o-qr'),function(){showQR('o',origUrl,true);}); bind($('bt-o-qrsave'),function(){saveQR('o');}); bind($('bt-o-share'),function(){shareText(origUrl);}); bind($('bt-s-make'),makeShort); bind($('bt-s-copy'),function(){if(!shortUrl){toast('먼저 단축 URL을 만드세요');return;}copyText(shortUrl,'단축 URL을 복사했습니다');}); bind($('bt-s-qr'),function(){showQR('s',shortUrl,false);}); bind($('bt-s-qrsave'),function(){saveQR('s');}); bind($('bt-s-share'),function(){shareText(shortUrl);}); bind($('bt-x-copy'),function(){copyText($('bt-x-box').value,'엑셀에 붙여넣을 내용을 복사했습니다');}); bind($('bt-x-file'),function(){saveFile(fname('csv'),''+toText(buildRows(),','),'text/csv;charset=utf-8');}); bind($('bt-h-file'),function(){saveFile(fname('html'),redirectHtml(buildUrl()),'text/html;charset=utf-8');}); bind($('bt-h-copy'),function(){copyText(redirectHtml(buildUrl()),'HTML 내용을 복사했습니다');}); /* ---------- 타이틀바 버튼 ---------- */ var resetArmed=false,resetTimer=null,b1=$('bt-b1'); function disarm(){ resetArmed=false; clearTimeout(resetTimer); b1.textContent='완전초기화'; b1.classList.remove('bt-danger'); } function doReset(){ clearTimeout(histTimer);pushHist(); resetAll(); tm.run=false;tm.rem=0; rings.length=0; stripBt(); setApply(false,true); setMode('al'); markDirty(); clearTimeout(histTimer);pushHist(); autosave(true); toast('설정을 모두 지웠습니다. 되돌리기로 복구할 수 있습니다'); } bind(b1,function(){ if(!resetArmed){ resetArmed=true; b1.textContent='한 번 더 누르면 지웁니다'; b1.classList.add('bt-danger'); resetTimer=setTimeout(disarm,4000); return; } disarm(); doReset(); }); bind($('bt-b2'),function(){ if(!shareState()){toast('입력한 설정이 없습니다. 먼저 설정을 입력하세요');return;} var u=buildUrl(); copyText(u,'URL을 만들어 복사했습니다 ('+u.length+'자)'); openPop('bt-pop'); }); bind($('bt-bulb'),function(){ var h=$('bt-h0'),body=$('bt-p0'); h.setAttribute('aria-expanded','true'); body.hidden=false; try{$('bt-sec1').scrollIntoView({behavior:'smooth',block:'start'});}catch(err){} toast('사용설명서를 열었습니다'); }); bind($('bt-addr-copy'),function(){copyText($('bt-addr').value,'주소를 복사했습니다');}); window.addEventListener('scroll',hideTip,false); window.addEventListener('resize',hideTip,false); window.addEventListener('pagehide',function(){autosave(true);},false); $('bt-title').setAttribute('data-ver',VER); /* ---------- 시작 ---------- */ (function boot(){ var sv; if(restoreFromUrl()){ toast('링크의 설정을 불러왔습니다'); }else{ sv=loadSaved(); if(sv){setState(sv,true);toast('이전 설정을 복구했습니다');} else{setState(null,false);} } pushHist(); render(); updateLive(); setSaved(); $('bt-saved').textContent='자동저장 4초마다'; setInterval(function(){autosave(false);},4000); startTicker(); })(); })();

    '모두의계산기'의 다른글

    • 현재글브라우저탭 알림_V6(0-1.kr/45)