aboutsummaryrefslogtreecommitdiffstats
path: root/hesla.es
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2015-09-23 16:55:05 +0200
committerMatěj Cepl <mcepl@cepl.eu>2015-09-23 16:55:05 +0200
commit4a19b19a3cc2dfac0588ff44f4fd3ccde7940afb (patch)
tree831972c023c7774a2e205e34738ca46c6717ff60 /hesla.es
parent0f710f142448b591032ee711571dfbf2bcfde5cf (diff)
downloadhesla-4a19b19a3cc2dfac0588ff44f4fd3ccde7940afb.tar.gz
Refactor part of the Hesla.display() method to ActivePage.display().
Diffstat (limited to 'hesla.es')
-rw-r--r--hesla.es11
1 files changed, 1 insertions, 10 deletions
diff --git a/hesla.es b/hesla.es
index 4952662..69b65ef 100644
--- a/hesla.es
+++ b/hesla.es
@@ -81,20 +81,11 @@ export class Hesla extends ActivePage {
/**
* Display losungen for given day
*
- * @param new_date String with ISO formatted date (optional)
- * or Number with the relative distance of the day from the date
- * currently displayed.
- *
* Displays the Losungen for the given date (or today if not defined)
*/
display() {
- // first scroll then switch to avoid blinking of the page
- window.scroll(0, 0);
+ super.display();
- var visibleElems = document.getElementsByClassName("visible");
- Array.prototype.forEach.call(visibleElems, function(e) {
- e.classList.remove("visible");
- });
console.log("cur_watchword = " + this.cur_watchword);
document.getElementById(this.cur_watchword.toISODateString()).
classList.add("visible");