Skip to content

Commit

Permalink
detect more flickr image urls
Browse files Browse the repository at this point in the history
  • Loading branch information
StigNygaard committed Jul 14, 2024
1 parent d0d5940 commit acb0f5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WebExtension/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ let keyShortcuts = (function KeyShortcuts() {
* @returns {string | undefined}
*/
function flickrEmbeddedId(imageUrl) {
return (/^https?:\/\/(?:farm|live)\d*\.static\.?flickr\.com\/\d+\/(?<imageId>\d+)_[0-9a-f]{4,}(?:_[a-z0-9]{1,3})?\.[a-z]{3,4}(?:$|\?|#|\/)/iu).exec(imageUrl)?.groups.imageId;
return (/^https?:\/\/(?:farm|live|c)\d*\.static\.?flickr\.com\/(\d\/)?\d+\/(?<imageId>\d+)_[0-9a-f]{4,}(?:_[a-z0-9]{1,3})?\.[a-z]{3,4}(?:$|\?|#|\/)/iu).exec(imageUrl)?.groups.imageId;
// https://www.flickr.com/services/api/misc.urls.html
}

Expand Down

0 comments on commit acb0f5d

Please sign in to comment.