Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ariaLabel on Firefox ESR #83

Merged
merged 1 commit into from
Jul 2, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
node-version: 20

- name: "Update Manifest Version"
uses: cssnr/update-json-value-action@v1
if: ${{ github.event_name == 'release' }}
uses: cssnr/update-json-value-action@v1

- name: "Build All"
run: |
Expand All @@ -36,6 +36,7 @@ jobs:
path: web-ext-artifacts/

- name: "Upload to Release"
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 3 additions & 2 deletions src/js/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ function extractSelection() {
* @param {HTMLAnchorElement} element
*/
function pushElement(array, element) {
// console.debug('element:', element)
try {
const data = {
href: decodeURI(element.href),
text: element.textContent,
text: element.textContent?.trim(),
title: element.title,
label: element.ariaLabel,
label: element.ariaLabel || '',
rel: element.rel,
target: element.target,
origin: element.origin,
Expand Down
10 changes: 5 additions & 5 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ function extractURLs(text) {
const match = urlmatcharr[0]
const url = new URL(match)
const data = {
text: null,
title: null,
label: null,
target: null,
rel: null,
text: '',
title: '',
label: '',
target: '',
rel: '',
href: url.href,
origin: url.origin,
}
Expand Down