Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Check .pdf extension in the url pathname. #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions src/components/CoolLightBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,8 @@ export default {
return false
}

const str = new String(url)
const urlObj = new URL(url)
const str = new String(urlObj.pathname)
if(str.endsWith('.pdf')){
return url
}
Expand Down Expand Up @@ -2622,4 +2623,4 @@ $breakpoints: (
transform: rotate(360deg);
}
}
</style>
</style>