|
@@ -54,8 +54,6 @@ let currentSlide = 0
|
|
|
function truncateFraction (number) {
|
|
|
try {
|
|
|
let strNum = String(number).split('.')
|
|
|
- console.log(strNum)
|
|
|
- console.log(strNum[1].length)
|
|
|
if(strNum[1].length > 3) {
|
|
|
strNum[1] = strNum[1].slice(0, 3)
|
|
|
}
|
|
@@ -75,7 +73,6 @@ function isValidInput (value) {
|
|
|
|
|
|
function invokeError(bool, element, dependent) {
|
|
|
try {
|
|
|
- console.log(bool)
|
|
|
if(bool) {
|
|
|
if(element.getElementsByTagName('small')[0]) {
|
|
|
element.getElementsByTagName('small')[0].remove()
|
|
@@ -108,16 +105,15 @@ container.addEventListener('input', (e) => {
|
|
|
})
|
|
|
|
|
|
reader.addEventListener('click', (e) => {
|
|
|
- console.log(e.target.id)
|
|
|
switch(e.target.id) {
|
|
|
case 'goleft':
|
|
|
if(currentSlide <= 0) {
|
|
|
currentSlide = texts.length - 1
|
|
|
- console.log(currentSlide)
|
|
|
} else {
|
|
|
currentSlide--
|
|
|
}
|
|
|
break;
|
|
|
+
|
|
|
case 'goright':
|
|
|
if(currentSlide >= texts.length - 1) {
|
|
|
currentSlide = 0
|
|
@@ -126,7 +122,6 @@ reader.addEventListener('click', (e) => {
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
- console.log(e.currentTarget)
|
|
|
reader.getElementsByTagName('h2')[0].innerHTML = texts[currentSlide].title
|
|
|
reader.getElementsByTagName('p')[0].innerHTML = texts[currentSlide].text
|
|
|
reader.getElementsByTagName('p')[1].remove()
|