summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2015-11-16 18:31:53 +0100
committerMatěj Cepl <mcepl@cepl.eu>2015-11-16 21:55:48 +0100
commit54114c2f19e66006aedfe008f2ff02b46dcbe1b8 (patch)
tree9fd7711dc847648e0e8bc748095b6cf4be2b212c
parent9d5a29c0e2e2e1fc17e82d9bb39d6935e381091f (diff)
downloadzalmy-54114c2f19e66006aedfe008f2ff02b46dcbe1b8.tar.gz
Remove some unnecessary debugging statements.
-rw-r--r--activePage.es19
-rw-r--r--zalmy.es5
2 files changed, 0 insertions, 24 deletions
diff --git a/activePage.es b/activePage.es
index 9d0338c..f2a0263 100644
--- a/activePage.es
+++ b/activePage.es
@@ -18,17 +18,14 @@ export class ActivePage {
var last_slash = cur_location.lastIndexOf('/');
var base_url = cur_location.slice(0, last_slash + 1) +
appName + '.webapp';
- console.log('base_url = ' + base_url);
this.app_record = null;
if ('mozApps' in navigator) {
var chk_inst_req = navigator.mozApps.getSelf();
chk_inst_req.onsuccess = function(e) {
- console.log('chk_inst_req.result = ' + chk_inst_req.result);
if (!chk_inst_req.result) {
var install_but_loc = document.getElementById('installButton');
- console.log('install_but_loc = ' + install_but_loc);
install_but_loc.style.display = 'block';
install_but_loc.innerHTML =
'<button id="installAction">Install App</button>';
@@ -53,7 +50,6 @@ export class ActivePage {
document.body.addEventListener("dblclick",
() => {
- console.log("dblclick");
this.display();
}, false);
@@ -61,14 +57,10 @@ export class ActivePage {
(evt) => {
this.swipe_pos_x = evt.screenX;
this.swipe_pos_y = evt.screenY;
- console.log("mousedown; pos = " + this.swipe_pos_x +
- " / " + this.swipe_pos_y);
}, false);
document.body.addEventListener("mouseup",
(evt) => {
- console.log("mouseup; end_pos = " + evt.screenX +
- " / " + evt.screenY);
this.handle_move(this.swipe_pos_x - evt.screenX,
this.swipe_pos_y - evt.screenY);
}, false);
@@ -77,15 +69,11 @@ export class ActivePage {
(evt) => {
this.swipe_pos_x = evt.changedTouches[0].screenX;
this.swipe_pos_y = evt.changedTouches[0].screenY;
- console.log("touchstart; pos = " + this.swipe_pos_x +
- " / " + this.swipe_pos_y);
}, false);
document.body.addEventListener("touchend",
(evt) => {
var end_pos = evt.changedTouches[evt.changedTouches.length - 1];
- console.log("touchend; end_pos = " + end_pos.screenX +
- " / " + end_pos.screenY);
// We want't opposite direction to Mouse gestures here
// so the difference should be opposite
this.handle_move(end_pos.screenX - this.swipe_pos_x,
@@ -94,7 +82,6 @@ export class ActivePage {
document.body.addEventListener("touchcancel",
() => {
- console.log("touchcancel");
this.swipe_pos_x = 0;
this.swipe_pos_y = 0;
}, false);
@@ -138,27 +125,21 @@ export class ActivePage {
*/
handle_move(distX, distY) {
var negligible = 100;
- console.log('distX = ' + distX);
- console.log('distY = ' + distY);
if (distX < -negligible) {
- console.log("swipe left");
this.next();
}
else if (distX > negligible) {
- console.log("swipe right");
this.prev();
}
}
next() {
- console.log("Next!");
this.cur_section += 1;
this.display();
}
prev() {
- console.log("Previous!");
this.cur_section -= 1;
this.display();
}
diff --git a/zalmy.es b/zalmy.es
index a40a0c2..3cffae4 100644
--- a/zalmy.es
+++ b/zalmy.es
@@ -14,9 +14,7 @@ export class Psalm extends ActivePage
// If this.cur_section has not been initialized yet, do it
if (!this.cur_section) {
var storedStr = localStorage.getItem("curPsalm");
- console.log('storedStr = ' + storedStr);
var stored = JSON.parse(storedStr);
- console.log('stored = ' + stored);
if ((stored == null) || (stored < 1) || (stored > 150)) {
this.cur_section = 1;
localStorage.setItem("curPsalm", JSON.stringify(this.cur_section));
@@ -57,7 +55,6 @@ export class Psalm extends ActivePage
display() {
super.display();
- console.log("cur_psalm = " + this.cur_psalm);
let psalm_id = `Ps.${this.cur_psalm}`;
console.log(`psalm_id = ${psalm_id}`);
document.getElementById(psalm_id).parentElement.
@@ -67,12 +64,10 @@ export class Psalm extends ActivePage
// We have to override activePage’s next() and prev() methods to call
// this.cur_psalm setter whcih does actual refresh of the page.
next() {
- console.log("Next!");
this.cur_psalm += 1;
}
prev() {
- console.log("Previous!");
this.cur_psalm -= 1;
}