-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch and display all the collection's images in the sidebar #1013
Comments
Let's be aware that we'll need jQuery in there -- with and Leaflet used to use the same shortcut - Quoting from #998 --
$.get('https://archive.org/metadata/texas-barnraising/',function(response) { console.log(response) })
{readyState: 1, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
=> VM8221:1 {created: 1657632500, d1: 'ia600904.us.archive.org', d2: 'ia800904.us.archive.org', dir: '/27/items/texas-barnraising', files: Array(25), …}
// Then we add "https://archive.org/download/" + collection_name + "/" + filename like this:
i = new Image; i.src = "https://archive.org/download/texas-barnraising/IMG_0764.JPG";
=> 'https://archive.org/download/texas-barnraising/IMG_0764.JPG'
// That will redirect/resolve to something like: https://ia801507.us.archive.org/34/items/texas-barnraising/IMG_0764.JPG
i.width
=> 2592 See a full example returned response for the above query here: https://gist.github.com/jywarren/12d0d2b8483339e9c2c7b1ad635f6d79 |
Hmmm...I used pure JS with axios instead. And yes, there's no clash of any sort. Is this okay, or must we use jQuery? |
It looks super, thank you!!
…On Mon, Sep 19, 2022, 11:47 PM Peculiar Erhisohwode < ***@***.***> wrote:
Hmmm...I used pure JS with axios instead. And yes, there's no clash of any
sort. Is this okay, or must we use jQuery?
—
Reply to this email directly, view it on GitHub
<#1013 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6JZXOVAHJONCPVNWB7TV7EXVZANCNFSM57GJ7BFA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Alright! Thanks, Jeff 😄 |
On inputting a valid Internet Archive URL, the images saved in that collection should be displayed on the sidebar.
The text was updated successfully, but these errors were encountered: