Little HTML experiment (dA MC pics viewer)
So, my girlfriend asked me if there were MC pics on dA, because she was a bit shy to post any, even if she's using an alternate account as of now (which I mentioned her...).
Are there any MC pics on dA? Of course there are! So I wanted her to see the sheer amount of it, even if some spell "quantity" louder than "quality". I just wanted to give her a big list.
A few moments later I had a big bunch of URLs on a .txt file. It may have been enough, but it's kinda sucky. So I ran some regexps on the file and turned the URLs into HTML links.
But then I thought: I have been coding PHP lately, which I'm hating. I wanted some javascript fun! So I added a few more tags and a sprinkle of CSS, and a list of HTML links became a "MC pics viewer".
What it does: you open the HTML (which contains links only), and through javascript magic it creates a list of thumbnails too. Then, you click on a thumbnail and it opens the image in big resolution at the right, and if you click that image you can toggle between "auto-scale" and "let me scroll it in 100% zoom".
It's just a simple thing but since I made it I thought, why not post it here? :)
You can view it live hosted here: http://jsbin.com/isoxih
But you can also download it, it's a single .html file that you can put on your computer, there's no attached images :D (these are aquired from deviantART's servers when you open the HTML).
Here's the HTML file stand-alone: http://mir.cr/FWFNWY2O
(And non-messed-with, as jsbin.com adds some things like Google Analytics tracking code. You may prefer this version.)
This also means that if you replace the URL list in the <nav> section, you can use it to show other URLs of your preference (as long as they're dA URLs - fav.me will also work) in the same fashion.
P.S.: PHP sucks big time. <3 javascript.
Are there any MC pics on dA? Of course there are! So I wanted her to see the sheer amount of it, even if some spell "quantity" louder than "quality". I just wanted to give her a big list.
A few moments later I had a big bunch of URLs on a .txt file. It may have been enough, but it's kinda sucky. So I ran some regexps on the file and turned the URLs into HTML links.
But then I thought: I have been coding PHP lately, which I'm hating. I wanted some javascript fun! So I added a few more tags and a sprinkle of CSS, and a list of HTML links became a "MC pics viewer".
What it does: you open the HTML (which contains links only), and through javascript magic it creates a list of thumbnails too. Then, you click on a thumbnail and it opens the image in big resolution at the right, and if you click that image you can toggle between "auto-scale" and "let me scroll it in 100% zoom".
It's just a simple thing but since I made it I thought, why not post it here? :)
You can view it live hosted here: http://jsbin.com/isoxih
But you can also download it, it's a single .html file that you can put on your computer, there's no attached images :D (these are aquired from deviantART's servers when you open the HTML).
Here's the HTML file stand-alone: http://mir.cr/FWFNWY2O
(And non-messed-with, as jsbin.com adds some things like Google Analytics tracking code. You may prefer this version.)
This also means that if you replace the URL list in the <nav> section, you can use it to show other URLs of your preference (as long as they're dA URLs - fav.me will also work) in the same fashion.
P.S.: PHP sucks big time. <3 javascript.