bible270 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +3 -4
- data/app/helpers/bible270/plan_helper.rb +15 -3
- data/app/views/bible270/days/_reading.html.erb +6 -6
- data/app/views/bible270/shared/_interaction_ui.html.erb +29 -0
- data/lib/bible270/configuration.rb +1 -3
- data/lib/bible270/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1a655ad0a130cd6a4106374efb885fa76856b7f93c7fc05284062648a330125e
|
|
4
|
+
data.tar.gz: d23e6b7180c152f1b452e6eac5db9523f0e8cb7683ee50492fc8bbdc00d271cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 791373f6597dde62c9a6ce8eaab3251868f4b19bbf24615fec46613ebab7e918e4f90e3eb8f318ed85502b1a769eb71c7290adb4973f17d3400eb411d2664202
|
|
7
|
+
data.tar.gz: 71b588c2a184a1939ee9c7c79dce661fcc017e2199ea732e334ebc2ba49412ec3bfcd029880e4cdffe64724c21d33a5e157c7f9dc886feda1d583f9b56e64db4
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to bible270. Format follows [Keep a Changelog](https://keepa
|
|
|
4
4
|
|
|
5
5
|
## Unreleased Changes
|
|
6
6
|
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- reuse one dedicated browser tab for Bible Gateway and Blue Letter Bible Scripture links instead of opening an unlimited series of tabs
|
|
10
|
+
|
|
11
|
+
### Removed
|
|
12
|
+
|
|
13
|
+
- remove the unused `passage_url_builder` configuration hook; Bible Gateway and Blue Letter Bible are now the intentionally fixed passage providers
|
|
14
|
+
|
|
7
15
|
**[Full Changelog](https://github.com/avonderluft/bible270/compare/v1.1.3...main)**
|
|
8
16
|
|
|
9
17
|
## [1.1.3] - 2026-08-23
|
data/README.md
CHANGED
|
@@ -415,9 +415,6 @@ Bible270.configure do |config|
|
|
|
415
415
|
config.after_sign_out_path = nil
|
|
416
416
|
|
|
417
417
|
config.bible_version = "NKJV"
|
|
418
|
-
config.passage_url_builder = ->(reference, version) {
|
|
419
|
-
"https://www.biblegateway.com/passage/?search=#{URI.encode_www_form_component(reference)}&version=#{version}"
|
|
420
|
-
}
|
|
421
418
|
end
|
|
422
419
|
```
|
|
423
420
|
### Footer
|
|
@@ -460,7 +457,9 @@ It's emitted by the engine's layout, so if you point `config.layout` at your own
|
|
|
460
457
|
References link to Bible Gateway by default. Readers choose Bible Gateway or Blue Letter Bible from
|
|
461
458
|
their profile, and an admin can set the same source for any reader. The `HEB/GRK` option always uses
|
|
462
459
|
Blue Letter Bible: WLC for Old Testament, Psalms, and Proverbs readings, and mGNT for New Testament
|
|
463
|
-
readings.
|
|
460
|
+
readings. Scripture links share one dedicated browser tab so moving among the day's passages does not
|
|
461
|
+
leave a trail of open tabs; Ctrl-click, Cmd-click, middle-click, and the browser's context menu still
|
|
462
|
+
open additional tabs when a reader wants to compare passages.
|
|
464
463
|
|
|
465
464
|
## With ComfortableMediaSurfer
|
|
466
465
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Bible270
|
|
4
4
|
module PlanHelper
|
|
5
|
+
PASSAGE_LINK_TARGET = 'bible270_scripture'
|
|
6
|
+
|
|
5
7
|
def b270_track(track)
|
|
6
8
|
Plan::TRACKS.fetch(track.to_s)
|
|
7
9
|
end
|
|
@@ -117,7 +119,18 @@ module Bible270
|
|
|
117
119
|
return Translations.passage_url(reference, selected_version, blue_letter: true)
|
|
118
120
|
end
|
|
119
121
|
|
|
120
|
-
|
|
122
|
+
Translations.passage_url(reference, selected_version)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# The named target and noopener are the secure no-JavaScript fallback.
|
|
126
|
+
# Interaction UI retains one opener-backed tab handle on desktop. iOS Safari
|
|
127
|
+
# cannot foreground a reused background tab, so it closes and replaces that
|
|
128
|
+
# script-opened tab on each click. The two fixed providers are intentionally
|
|
129
|
+
# trusted for this enhanced path.
|
|
130
|
+
def b270_passage_link(reference, **options)
|
|
131
|
+
data = options.fetch(:data, {}).merge(b270_passage_link: true)
|
|
132
|
+
options.merge!(data: data, target: PASSAGE_LINK_TARGET, rel: 'noopener')
|
|
133
|
+
link_to reference, b270_passage_url(reference), options
|
|
121
134
|
end
|
|
122
135
|
|
|
123
136
|
# Small grey "(NKJV)" after a reading, so it's clear which translation the
|
|
@@ -224,8 +237,7 @@ module Bible270
|
|
|
224
237
|
reference = readings[track]
|
|
225
238
|
next if reference.blank?
|
|
226
239
|
|
|
227
|
-
|
|
228
|
-
class: 'b270-reflink', target: '_blank', rel: 'noopener'
|
|
240
|
+
b270_passage_link reference, class: 'b270-reflink'
|
|
229
241
|
end
|
|
230
242
|
|
|
231
243
|
safe_join(links, ' · ')
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
b270_success: (part_done ? "Reading marked unread." : "Reading marked read."),
|
|
28
28
|
b270_failure: "Couldn’t update that reading. Try again." } },
|
|
29
29
|
aria: { label: (part_done ? "Mark #{part_ref} unread" : "Mark #{part_ref} read") } do %>
|
|
30
|
-
<span class="b270-check"><svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg></span>
|
|
30
|
+
<span class="b270-check"><svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12" /></svg></span>
|
|
31
31
|
<% end %>
|
|
32
32
|
<% else %>
|
|
33
|
-
<span class="b270-check"><svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg></span>
|
|
33
|
+
<span class="b270-check"><svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12" /></svg></span>
|
|
34
34
|
<% end %>
|
|
35
35
|
<span class="b270-ref">
|
|
36
|
-
<%=
|
|
36
|
+
<%= b270_passage_link part_ref %>
|
|
37
37
|
</span>
|
|
38
38
|
</li>
|
|
39
39
|
<% end %>
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
b270_success: (done ? "Reading marked unread." : "Reading marked read."),
|
|
52
52
|
b270_failure: "Couldn’t update that reading. Try again." } },
|
|
53
53
|
aria: { label: (done ? "Mark #{t[:label]} unread" : "Mark #{t[:label]} read") } do %>
|
|
54
|
-
<span class="b270-check"><svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg></span>
|
|
54
|
+
<span class="b270-check"><svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12" /></svg></span>
|
|
55
55
|
<% end %>
|
|
56
56
|
<% else %>
|
|
57
|
-
<span class="b270-check"><svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"/></svg></span>
|
|
57
|
+
<span class="b270-check"><svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12" /></svg></span>
|
|
58
58
|
<% end %>
|
|
59
59
|
<div class="b270-rbody">
|
|
60
60
|
<div class="b270-cat"><%= t[:label] %></div>
|
|
61
|
-
<div class="b270-ref"><%=
|
|
61
|
+
<div class="b270-ref"><%= b270_passage_link ref %> <%= b270_version_tag(track: track) %></div>
|
|
62
62
|
</div>
|
|
63
63
|
<% end %>
|
|
64
64
|
</div>
|
|
@@ -30,6 +30,35 @@
|
|
|
30
30
|
document.querySelectorAll("form[data-b270-submit='true']").forEach(resetForm);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
let scriptureWindow = null;
|
|
34
|
+
const replacesBackgroundTabs = /iPad|iPhone|iPod/.test(navigator.userAgent) ||
|
|
35
|
+
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
|
36
|
+
|
|
37
|
+
document.addEventListener("click", (event) => {
|
|
38
|
+
const target = event.target;
|
|
39
|
+
const link = target.closest && target.closest("a[data-b270-passage-link='true']");
|
|
40
|
+
if (!link || event.defaultPrevented || event.button !== 0) return;
|
|
41
|
+
if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
if (replacesBackgroundTabs && scriptureWindow && !scriptureWindow.closed) {
|
|
45
|
+
scriptureWindow.close();
|
|
46
|
+
scriptureWindow = null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (!scriptureWindow || scriptureWindow.closed) {
|
|
50
|
+
scriptureWindow = window.open(link.href, "_blank");
|
|
51
|
+
if (!scriptureWindow) return;
|
|
52
|
+
} else {
|
|
53
|
+
scriptureWindow.location = link.href;
|
|
54
|
+
}
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
scriptureWindow.focus();
|
|
57
|
+
} catch (_error) {
|
|
58
|
+
scriptureWindow = null;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
33
62
|
document.addEventListener("submit", (event) => {
|
|
34
63
|
const form = event.target.closest("form[data-b270-submit='true']");
|
|
35
64
|
if (!form) return;
|
|
@@ -271,7 +271,6 @@ module Bible270
|
|
|
271
271
|
PROVIDER_LABELS[key.to_sym] || key.to_s.tr('_', ' ').split.map(&:capitalize).join(' ')
|
|
272
272
|
end
|
|
273
273
|
|
|
274
|
-
# Default Bible translation and a builder for external passage links.
|
|
275
274
|
# Which translations readers may choose from. Defaults to all of
|
|
276
275
|
# Bible270::Translations::VERSIONS; narrow it to offer fewer.
|
|
277
276
|
attr_accessor :bible_versions
|
|
@@ -297,7 +296,7 @@ module Bible270
|
|
|
297
296
|
# application owns scheduling the bible270:reminders:send task.
|
|
298
297
|
attr_accessor :daily_reminders
|
|
299
298
|
|
|
300
|
-
attr_accessor :after_sign_out_path, :email_sign_in_max_per_window, :
|
|
299
|
+
attr_accessor :after_sign_out_path, :email_sign_in_max_per_window, :tagline, :footer_html, :footer, :favicon, :avatar_max_bytes, :chapter_breaks, :admin_emails, :admin_resolver, :bible_version, :header_mark, :remember_for, :require_sign_in_to_participate
|
|
301
300
|
|
|
302
301
|
# Public labels.
|
|
303
302
|
attr_accessor :app_name
|
|
@@ -355,7 +354,6 @@ module Bible270
|
|
|
355
354
|
@after_sign_out_path = nil
|
|
356
355
|
@bible_version = 'NKJV'
|
|
357
356
|
@bible_versions = Translations::VERSIONS.keys
|
|
358
|
-
@passage_url_builder = ->(reference, version) { Translations.passage_url(reference, version) }
|
|
359
357
|
@app_name = 'Daily Bread'
|
|
360
358
|
@tagline = 'Journeying through Scripture in 9 months'
|
|
361
359
|
@time_zone = nil
|
data/lib/bible270/version.rb
CHANGED