Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

BayImg.com - Sweet Interface 2.71

Improves the interface of BayImg.com, adds image preview, preloading with progress bar, sort for clouds, keyboard shortcuts, and more.

Shows the searches on BayImg.com full-page, in a more ergonomic look.

It Also adds a full-screen preview of images so when you click the thumbnails a full-screen version appears of it. It's resized to fit the screen if it's too big, and an animated progress bar shows it's loading progress. Click anywhere to return to the search results.

It adds the following Keyboard Shortcuts:
> - Next Page
< - Previous Page
M - Next Image (in Preview mode) and Start Preview Mode (in Normal mode)
N - Previous Image (in Preview mode)
ESCAPE - Exit Preview Mode

The page uses AJAX to change search results pages so the page doesn't refresh at all and loads very fast. Talk about Web 2.0 :)

Normal View:

Image Preview (while image is loading):

Image Preview:

New in version 2.1:
- Centered Image on preview correctly.
- The load bar doesn't show at all if showing a cached image.
- Minor bug fixes.

New in version 2.51:
- Interface improvements for the entire site, among which:
+ The image pages now has a "Direct link to image" button and cleaner interface.
+ The clouds page now has visited links in orange.
- Precaching of images for faster preview, with progress bar (displayed under the menu).
- Fixed a few minor bugs.

New in version 2.55:
- Changed source code to reflect changes made to the site.

New in version 2.6:
- Added Sort by buttons in cloud page, you can sort by date, name or count (it caches the sorted html links for faster execution, but is still a bit slow, suggestions are welcome).

New in version 2.7:
- Updated script to support interface changes.
- Optimized parts of code.

New in version 2.71:
- Minor bug fix to image precaching bar which dissapeared when changing page.

For suggestions or impressions leave a comment.






Sep 3, 2007
Marvin4684 User

I fixed this script up a little to allow for album view and allow 'next image' to move to next page and continue. Patch is as follows:

8a9
> var pageMatcher = new RegExp("^http://bayimg.com/(tag|album)/[^/]+$")
11c12
< /*|PAGES|*/ if (new RegExp("^http://bayimg.com/tag/[^/]+$").test(D.location)) {
---
> /*|PAGES|*/ if (pageMatcher.test(D.location)) {
17a19,23
> var section = pageMatcher.exec(D.location)[1];
>
> var resetToFirstImg = false;
> var resetToLastImg = false;
>
22c28,40
< new unsafeWindow.Ajax.Updater('thumbs', '/ajax_tags.php', {method: 'post', parameters: 'page='+nr+'&tag='+t, onComplete: changeThumbs});
---
> if (section == 'tag'){
> new unsafeWindow.Ajax.Updater('thumbs', '/ajax_tags.php', {method: 'post', parameters: 'page='+nr+'&tag='+t, onComplete: changeThumbs});
> } else if (section == 'album'){
> new unsafeWindow.Ajax.Updater('thumbs', '/ajax_album.php', {method: 'post', parameters: 'page='+nr+'&id='+t, onComplete: changeThumbs});
> }
> }
> function NextPage(){
> if (pageNr < pagesCount)
> ChangePage(++pageNr);
> }
> function PrevPage(){
> if (pageNr > 1)
> ChangePage(--pageNr); // <
39a58,75
>
> function NextImage(){
> if (imgId < imagesCount-1)
> ChangeImage(++imgId);
> else{
> resetToFirstImg = true;
> NextPage();
> }
> }
> function PrevImage(){
> if (imgId > 0)
> ChangeImage(--imgId);
> else {
> resetToLastImg = true;
> PrevPage();
> }
> }
>
165a202,212
> if(resetToFirstImg){
> imgId = 0;
> ChangeImage(imgId);
> resetToFirstImg = false;
> }
>
> if(resetToLastImg){
> imgId = imagesCount-1;
> ChangeImage(imgId);
> resetToLastImg = false;
> }
199,202c246,249
< if (e.keyCode == 188 && pageNr > 1) ChangePage(--pageNr); // <
< else if (e.keyCode == 190 && pageNr < pagesCount) ChangePage(++pageNr); // >
< else if (e.keyCode == 78 && imgId > 0) ChangeImage(--imgId); // N
< else if (e.keyCode == 77 && imgId < imagesCount-1) ChangeImage(++imgId); // M
---
> if (e.keyCode == 188) PrevPage(); // <
> else if (e.keyCode == 190) NextPage(); // >
> else if (e.keyCode == 78) PrevImage(); // N
> else if (e.keyCode == 77) NextImage(); // M

You could comment on this script if you were logged in.