mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
[api-minor] Remove the unused onlyStripPath
option from the getFilenameFromUrl
helper function
This commit is contained in:
parent
2b69fb76ac
commit
a790f2df5d
2 changed files with 2 additions and 12 deletions
|
@ -803,13 +803,10 @@ function isPdfFile(filename) {
|
|||
/**
|
||||
* Gets the filename from a given URL.
|
||||
* @param {string} url
|
||||
* @param {boolean} [onlyStripPath]
|
||||
* @returns {string}
|
||||
*/
|
||||
function getFilenameFromUrl(url, onlyStripPath = false) {
|
||||
if (!onlyStripPath) {
|
||||
[url] = url.split(/[#?]/, 1);
|
||||
}
|
||||
function getFilenameFromUrl(url) {
|
||||
[url] = url.split(/[#?]/, 1);
|
||||
return url.substring(url.lastIndexOf("/") + 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue