Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[codespell]
ignore-words-list = nd,ans
5 changes: 5 additions & 0 deletions .github/linters/zizmor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rules:
unpinned-uses:
config:
policies:
"*": ref-pin
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v6
with:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
package-manager-cache: false
- name: Install dependencies
run: npm ci
- name: Run unit tests
Expand All @@ -40,11 +42,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
package-manager-cache: false
- name: Install dependencies
run: npm ci
- name: Set up Chrome for Testing
Expand All @@ -71,11 +75,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
package-manager-cache: false
- name: Install dependencies
run: npm ci
- name: Build development bundle
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ permissions:
packages: read
# To report GitHub Actions status checks
statuses: write
pull-requests: write
issues: write

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
Expand All @@ -33,20 +35,25 @@ jobs:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
persist-credentials: false

# Runs the Super-Linter action
- name: Run Super-Linter
uses: super-linter/super-linter@v7
uses: super-linter/super-linter@v8
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENT: true
SAVE_SUPER_LINTER_SUMMARY: true
# Don't validate CSS because it is too dumb to find my stylelintrc.json. Covered by the eslint job
VALIDATE_CSS: false
VALIDATE_HTML_PRETTIER: false
# Don't validate javascript, because it can't install packages
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JAVASCRIPT_PRETTIER: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_BASH_EXEC: false
# Not using biome
VALIDATE_BIOME: false
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
97 changes: 54 additions & 43 deletions cypress/test.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,60 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<head>
<meta charset="UTF-8" />
<title>Cypress Tooltip Test</title>
</head>
<body>
<div id="bible-previewer-cypress-test-container">
<div>A cool verse is John 4:24</div>
<div>Gen 4:24-25</div>
<div>Matt 4:24-5:3</div>
<div>Gal 3:5, 8</div>
<div class="multiple-verse-same-chapter">Joel 2:4, 9-10</div>
<div>1 Cor 3:6, 5:8</div>
<div>2 Cor 3:6; 5:8</div>
<div>Psalm 133:99-100, 144:89-200</div>
<div>Psalm 119:105</div>
<div>Jude 6</div>
<div>Jude 1:7</div>
<div class="jude-list-test">Jude 6 and 8, 10</div>
<div class="duplicate-verse-test">Ex 19:20</div>
<div class="duplicate-verse-test">Ex 19:20</div>
<div class="keep-existing-link-test">
I think that <a id="link-to-nowhere" href="#">Judges 14:22</a> is a pretty cool bible verse, but you can't
forget about Romans 12:2
</div>
<div class="keep-existing-link-test-with-html">
</head>
<body>
<div id="bible-previewer-cypress-test-container">
<div>A cool verse is John 4:24</div>
<div>Gen 4:24-25</div>
<div>Matt 4:24-5:3</div>
<div>Gal 3:5, 8</div>
<div class="multiple-verse-same-chapter">Joel 2:4, 9-10</div>
<div>1 Cor 3:6, 5:8</div>
<div>2 Cor 3:6; 5:8</div>
<div>Psalm 133:99-100, 144:89-200</div>
<div>Psalm 119:105</div>
<div>Jude 6</div>
<div>Jude 1:7</div>
<div class="jude-list-test">Jude 6 and 8, 10</div>
<div class="duplicate-verse-test">Ex 19:20</div>
<div class="duplicate-verse-test">Ex 19:20</div>
<div class="keep-existing-link-test">
I think that <a id="link-to-nowhere" href="#">Judges 14:22</a> is a
pretty cool bible verse, but you can't forget about Romans 12:2
</div>
<div class="keep-existing-link-test-with-html">
<a id="link-to-nowhere-with-html" href="#"><i>Col 7:4</i></a>
</div>
<div class="create-two-links-for-different-books">
</div>
<div class="create-two-links-for-different-books">
Sirach 1:20 and Song of Songs 4:3 are neat
</div>
<div class="following-verse-start-chapter-test">
Phil. 2:12, 1 Pet. 1:9
</div>
<div class="roman-prefix-test">II Tim 3:16</div>
<div class="word-prefix-test">First Kings 2:3</div>
<div class="unicode-dash-test">Gen 1:1–3 and Gen 1:4—5</div>
<div class="case-insensitive-test">jOhN 3:16</div>
<div class="john-disambiguation-test">
John 3:16, 1 John 3:16, First John 4:8, 2 John 1:6 and Third John 1:4
</div>
<div class="john-lookahead-test">
John 3:16, 1 John 2:3, 2 John 1:6 and 3 John 1:4
</div>
<div class="second-third-john-mixed-list-test">
2 John 1:6 and 3 john 3:16, 18
</div>
<div class="mixed-separators-test">Rev 1:1; 2-3, 4:5</div>
<div class="and-separator-test">
I Corinthians 5:11, 6:9-11, 6:18-20, 7:1-3 and 7:8-9
</div>
<div class="deutero-fallback-test">Sirach 2:1</div>
<div class="non-reference-test">
Johnson 4:24 should not be transformed into a bible link
</div>
<div id="hover-safe-zone">safe hover target</div>
</div>
<div class="following-verse-start-chapter-test">Phil. 2:12, 1 Pet. 1:9</div>
<div class="roman-prefix-test">II Tim 3:16</div>
<div class="word-prefix-test">First Kings 2:3</div>
<div class="unicode-dash-test">Gen 1:1–3 and Gen 1:4—5</div>
<div class="case-insensitive-test">jOhN 3:16</div>
<div class="john-disambiguation-test">John 3:16, 1 John 3:16, First John 4:8, 2 John 1:6 and Third John 1:4</div>
<div class="john-lookahead-test">John 3:16, 1 John 2:3, 2 John 1:6 and 3 John 1:4</div>
<div class="second-third-john-mixed-list-test">2 John 1:6 and 3 john 3:16, 18</div>
<div class="mixed-separators-test">Rev 1:1; 2-3, 4:5</div>
<div class="and-separator-test">I Corinthians 5:11, 6:9-11, 6:18-20, 7:1-3 and 7:8-9</div>
<div class="deutero-fallback-test">Sirach 2:1</div>
<div class="non-reference-test">Johnson 4:24 should not be transformed into a bible link</div>
<div id="hover-safe-zone">safe hover target</div>
</div>

</body>
</body>
</html>
77 changes: 46 additions & 31 deletions html/options.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,58 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<head>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Options</title>
<link rel="stylesheet" href="../css/options.css">
</head>
<body>
<div class="options-panel">
<p class="subtitle">Set default language and translation for verse previews.</p>
<link rel="stylesheet" href="../css/options.css" />
</head>
<body>
<div class="options-panel">
<p class="subtitle">
Set default language and translation for verse previews.
</p>

<div class="field-grid">
<div class="field-grid">
<div class="field">
<label for="language">Language</label>
<select id="language">
<option value="eng">English (US)</option>
</select>
<label for="language">Language</label>
<select id="language">
<option value="eng">English (US)</option>
</select>
</div>
<div class="field">
<label for="bible-version">Bible Version</label>
<select disabled id="bible-version">
<option disabled selected value>--- Select a version ---</option>
</select>
<label for="bible-version">Bible Version</label>
<select disabled id="bible-version">
<option disabled selected value>--- Select a version ---</option>
</select>
</div>
</div>
</div>

<div class="action-row">
<div class="action-row">
<div id="save-status"></div>
<button class="button" id="save-button" type="button">Save Settings</button>
</div>
<button class="button" id="save-button" type="button">
Save Settings
</button>
</div>

<p class="credits">
Icons made by <a href="https://www.flaticon.com/authors/roundicons" title="Roundicons">Roundicons</a> from
<a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by
<a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" title="Creative Commons BY 3.0">CC 3.0 BY</a>
</p>
</div>

<script src="../js/options.js"></script>
<p class="credits">
Icons made by
<a href="https://www.flaticon.com/authors/roundicons" title="Roundicons"
>Roundicons</a
>
from
<a href="https://www.flaticon.com/" title="Flaticon"
>www.flaticon.com</a
>
is licensed by
<a
href="https://creativecommons.org/licenses/by/3.0/"
target="_blank"
title="Creative Commons BY 3.0"
>CC 3.0 BY</a
>
</p>
</div>

</body>
<script src="../js/options.js"></script>
</body>
</html>
51 changes: 27 additions & 24 deletions html/popup.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<head>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Options</title>
<link rel="stylesheet" href="../css/popup.css">
</head>
<body>
<div class="popup">
<h1 class="title">Bible Previewer</h1>
<link rel="stylesheet" href="../css/popup.css" />
</head>
<body>
<div class="popup">
<h1 class="title">Bible Previewer</h1>

<div class="field">
<div class="field">
<label for="language">Language</label>
<select id="language">
<option value="eng">English (US)</option>
<option value="eng">English (US)</option>
</select>
</div>
<div class="field">
</div>
<div class="field">
<label for="bible-version">Bible Version</label>
<select disabled id="bible-version">
<option disabled selected value>--- Select a version ---</option>
<option disabled selected value>--- Select a version ---</option>
</select>
</div>
<div id="save-status"></div>
<div class="button" id="reload-button" title="Re-run verse link detection on this page">
</div>
<div id="save-status"></div>
<div
class="button"
id="reload-button"
title="Re-run verse link detection on this page"
>
Re-Scan This Page
</div>
</div>
</div>
<!--<div class="button" id="blacklist-button" title="Click to prevent the extension from running on this website">-->
<!-- Blacklist Website-->
<!--</div>-->

<script src="../js/popup.js"></script>
<!--<div class="button" id="blacklist-button" title="Click to prevent the extension from running on this website">-->
<!-- Blacklist Website-->
<!--</div>-->

</body>
<script src="../js/popup.js"></script>
</body>
</html>