Skip to content

Commit

Permalink
Fix highlights bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed Dec 26, 2024
1 parent ba23c6b commit 3c7ad1e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app",
"version": "5.6.66",
"version": "5.6.67",
"description": "All-in-one bookmark manager",
"author": "Rustem Mussabekov",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion src/modules/format/url/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './getDomain'
export * from './normalizeURL'
export * from './normalizeURL'
export * from './isSPA'
7 changes: 7 additions & 0 deletions src/modules/format/url/isSPA.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export function isSPA(url) {
try {
return new URL(url).hash.includes('/')
} catch {
return false
}
}
4 changes: 2 additions & 2 deletions src/target/extension/background/links.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import browser from 'webextension-polyfill'
import { normalizeURL } from '~modules/format/url'
import { normalizeURL, isSPA } from '~modules/format/url'
import Api from '~data/modules/api'
import debounce from '~modules/format/callback/debounce'
import * as action from './action'
Expand All @@ -14,7 +14,7 @@ var loading = false

function simplifyURL(url) {
return normalizeURL(url, {
stripHash: !new URL(url).hash.includes('/'), //do not strip hash when it seems an SPA
stripHash: !isSPA(url), //do not strip hash when it seems an SPA
stripWWW: true,
removeQueryParameters: [
//tracking
Expand Down

0 comments on commit 3c7ad1e

Please sign in to comment.