diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2015-09-23 16:55:05 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2015-09-23 16:55:05 +0200 |
commit | 4a19b19a3cc2dfac0588ff44f4fd3ccde7940afb (patch) | |
tree | 831972c023c7774a2e205e34738ca46c6717ff60 /hesla.es | |
parent | 0f710f142448b591032ee711571dfbf2bcfde5cf (diff) | |
download | hesla-4a19b19a3cc2dfac0588ff44f4fd3ccde7940afb.tar.gz |
Refactor part of the Hesla.display() method to ActivePage.display().
Diffstat (limited to 'hesla.es')
-rw-r--r-- | hesla.es | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -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"); |