Skip to content

Instantly share code, notes, and snippets.

@oriadam
Last active April 16, 2020 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oriadam/3b77af6f9c5e941f9586b0ff0e698acd to your computer and use it in GitHub Desktop.
Save oriadam/3b77af6f9c5e941f9586b0ff0e698acd to your computer and use it in GitHub Desktop.
@oriadam
Copy link
Author

oriadam commented Apr 16, 2020

from http trampt . com / artists / 224 / chris-ryniak

@oriadam
Copy link
Author

oriadam commented Apr 16, 2020

replace m.jpg with t.jpg for small thumbnail. replace m.jpg with o.jpg for large original image.

@oriadam
Copy link
Author

oriadam commented Apr 16, 2020

create html of all images:

    let text = document.body.textContent;
    let ar = text.split('\n');
    let cont = document.createElement('div');
    ar.forEach(x => {
        let img = document.createElement('img');
        let a = document.createElement('a');
        a.href = x;
        a.target='_blank';
        img.src=x.replace('m.jpg','t.jpg');
        a.appendChild(img);
        cont.appendChild(a);
    });
    document.querySelector('body').appendChild(cont);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment