aboutsummaryrefslogtreecommitdiffstats
path: root/hesla.ts
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-04-15 00:38:37 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-04-15 00:42:43 +0200
commitc09f366c7f22d666c9f535b6b321c809b636868a (patch)
tree1ca900753ca2927a867fc66773de21de7e1acf72 /hesla.ts
parent8b859019a61484a31aa3d3cde96f9fe85b3c95af (diff)
downloadhesla-c09f366c7f22d666c9f535b6b321c809b636868a.tar.gz
Partially revert 8b85901
Unfortunately read.andbible.org API is currently broken (gh#AndBible/and-bible#3210), so we have to revert back to https://www.crosswire.org/study/.
Diffstat (limited to 'hesla.ts')
-rw-r--r--hesla.ts19
1 files changed, 3 insertions, 16 deletions
diff --git a/hesla.ts b/hesla.ts
index f7b8711..aee251a 100644
--- a/hesla.ts
+++ b/hesla.ts
@@ -99,22 +99,9 @@ export class Hesla extends ActivePage {
super.display();
console.log("cur_watchword = " + toISODateString(this.cur_watchword));
- var disp_watchword = document.getElementById(toISODateString(this.cur_watchword));
- disp_watchword.classList.add("visible");
-
- // Complete mobile device identification /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/
- if (/Android/i.test(navigator.userAgent)) {
- // true for mobile device
- var href_attr = "";
- Array.prototype.forEach.call(disp_watchword.getElementsByTagName("a"), a_elem => {
- href_attr = a_elem.getAttribute("href");
- console.log("before replacement: href_attr = " + href_attr);
- href_attr = href_attr.replace(/http:\/\/www\.crosswire\.org\/study\/passagestudy\.jsp\?key=([^&]+)&mod=([a-zA-Z]+)/,
- "https://read.andbible.org/$1?v11n=$2");
- console.log("after replacement: href_attr = " + href_attr);
- a_elem.setAttribute("href", href_attr);
- });
- }
+ document.getElementById(toISODateString(this.cur_watchword)).
+ classList.add("visible");
+
window.scroll(0, 0);
}