Showing
1 changed file
with
54 additions
and
0 deletions
js/common.js
0 → 100644
| 1 | +var isLimitedCheckbox = document.getElementById('is-limited') | ||
| 2 | +var isLimitedNumInput = document.getElementById('is-limited-num-input') | ||
| 3 | +var isLimitedAlerter = document.getElementById('is-limited-alerter') | ||
| 4 | + | ||
| 5 | +window.onload = function () { | ||
| 6 | + document.getElementsByTagName('body')[0].classList.remove('preload') | ||
| 7 | +} | ||
| 8 | +isLimitedCheckbox.onchange = function () { | ||
| 9 | + if (isLimitedCheckbox.checked) { | ||
| 10 | + document.getElementById('is-limited-wrapper').style = "background-color: #fff;" | ||
| 11 | + } else { | ||
| 12 | + document.getElementById('is-limited-wrapper').style = "background-color: rgba(0, 0, 0, 0);" | ||
| 13 | + } | ||
| 14 | +} | ||
| 15 | +isLimitedNumInput.onchange = function () { | ||
| 16 | + if (isLimitedNumInput.value < 12) { | ||
| 17 | + isLimitedAlerter.innerHTML = '12자리 이상!' | ||
| 18 | + } else { | ||
| 19 | + isLimitedAlerter.innerHTML = '글자수 제한' | ||
| 20 | + } | ||
| 21 | +} | ||
| 22 | + | ||
| 23 | + | ||
| 24 | +function umfinder (value) { | ||
| 25 | + if (value === '엄') {document.getElementById('supersecret-document').style.display = 'block'} | ||
| 26 | +} | ||
| 27 | + | ||
| 28 | +function joonsikfinder (value) { | ||
| 29 | + // 이걸 보고 있는 넌 너무 많은걸 알아버렸어 | ||
| 30 | + var bodyEle = document.getElementsByTagName('body')[0] | ||
| 31 | + var titleIdentifiers = document.getElementsByClassName('title-identifier') | ||
| 32 | + if (value === '엄준식') { | ||
| 33 | + bodyEle.className = '' | ||
| 34 | + //bodyEle.classList.add('joonsik') | ||
| 35 | + titleIdentifiers[0].innerHTML = '엄준식' | ||
| 36 | + titleIdentifiers[1].innerHTML = '엄준식을' | ||
| 37 | + } else if (value === '박원순') { | ||
| 38 | + } else if (value === '트럼프') { | ||
| 39 | + } else { | ||
| 40 | + bodyEle.className = '' | ||
| 41 | + titleIdentifiers[0].innerHTML = '악질 이름' | ||
| 42 | + titleIdentifiers[1].innerHTML = '악질 이름을' | ||
| 43 | + } | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | +var checkboxLabelers = document.getElementsByClassName('checkboxlabeler-input') | ||
| 47 | +for (checkboxLabeler in checkboxLabelers) { | ||
| 48 | + checkboxLabeler.onchange = function () { | ||
| 49 | + if (checkboxLabeler.checked) { | ||
| 50 | + } else { | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | +} | ||
| 54 | + |
-
Please register or login to post a comment