Skip to content

Commit

Permalink
Correctly determine final part of path
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy committed Jul 31, 2024
1 parent bf9bd27 commit 4833a26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion radioUpdater/assets/js/contentScript.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const pathname = window.location.pathname
const pathname = window.location.pathname.split('?')[0].replace(/\/\s*$/, "")
const articleType = pathname.split('/')[1]
const finalPart = pathname.split('/').pop()

const isEdit = finalPart === 'edit' || finalPart === 'new'

if (articleType === 'articles' && isEdit) {
Expand Down
2 changes: 1 addition & 1 deletion radioUpdater/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RadioUpdater",
"version": "2.4",
"version": "2.5",
"description": "Replace references on Radiopaedia.",
"manifest_version": 3,
"content_scripts": [
Expand Down

0 comments on commit 4833a26

Please sign in to comment.