Update web/templates/entry_view.html

This commit is contained in:
Joshua Laymon 2025-09-02 03:15:22 +00:00
parent 765a24ce6a
commit 9b7c5cab44

View File

@ -608,7 +608,7 @@ function showToast(message, duration = 3000) {
<script src="{% static 'js/scripture-validator.v1.js' %}"></script>
<script src="{% static 'js/source-validator.v1.js' %}"></script>
<!-- Upgrade Source link to WOL if valid (no other logic changed) -->
<!-- Upgrade Source link to WOL if valid; otherwise keep Google and tint red -->
<script>
(function () {
const link = document.querySelector('#source-text .js-source-link');
@ -618,9 +618,11 @@ function showToast(message, duration = 3000) {
if (SourceValidator.isWOLSource(srcText)) {
link.href = SourceValidator.buildWOLSearchURL(srcText);
link.title = (link.title ? link.title + ' • ' : '') + 'Open in WOL';
link.classList.remove('scripture-pill-invalid'); // ensure its not red if previously set
} else {
// already points to Google; keep it
// Keep Google link, but flag visually like invalid scripture
link.title = (link.title ? link.title + ' • ' : '') + 'Search on Google';
link.classList.add('scripture-pill-invalid');
}
})();
</script>