Any desire for a fanart.tv user script?

Post Reply
User avatar
akovia
Admin
Admin
Posts: 441
Joined: Wed Dec 18, 2013 3:37 pm

Re: Any desire for a fanart.tv user script?

Post by akovia »

I've been think this thread could probably be moved to the app section now that it really is an app/ext.
Just a thought.
User avatar
Paszt
Veteran
Veteran
Posts: 40
Joined: Tue Dec 24, 2013 7:26 pm

Re: Any desire for a fanart.tv user script?

Post by Paszt »

Mordred wrote:Paszt's logo text function is awesome. Used it verbatim other than increasing the size of the images just a little bit.
Thanks for that by-the-way.
Just a heads up here: the reason I made the logo smaller was because when there is no background, you make the section smaller. With the logo the size it is now, if there is no background there's a line through the bottom of the logo (the bottom borders of the .title_background & .title_background:after classes). Removing/not setting all the heights (or setting the height to inherit) is one possible fix.

Here's an example: http://fanart.tv/series/248012/a-bridge ... rry-skies/

The smaller size is also an issue without replacing the title text with the logo when the title is really long and spans two or more lines: http://fanart.tv/series/251457/the-hero ... gs-castle/
User avatar
akovia
Admin
Admin
Posts: 441
Joined: Wed Dec 18, 2013 3:37 pm

Re: Any desire for a fanart.tv user script?

Post by akovia »

Mordred,
Was wondering if we could keep current versions of files in the first post.
I'm happy to keep up with it if you don't want to be bothered with it.
At least a link to the extension.
User avatar
Mordred
Moderator
Moderator
Posts: 72
Joined: Sun Dec 22, 2013 8:03 am

Re: Any desire for a fanart.tv user script?

Post by Mordred »

I'll add the link.

0.4.0 now live. Spent all evening working on lazy loading images. Seems to work pretty well... although there are some issues on the admin/approval pages. It's disabled by default, but give it a test on member pages (and admin).

Here's the logic:
If the page has less than 24 images, or the page finishes loading a quarter second after my script starts, just load regularly. Otherwise, create a list of all image elements on the page, and store the original src. Then I call window.stop() to kill the page from loading further. Then I set a scroll handler on the page which will wait 250ms after the last scrolling event and then loops through the saved image list, find all that are either currently visible, or within one page above or below the current window, and then set their src's back to the original values which causes the image to actually load.

There are probably some quirks, however it makes it possible to view leepenny's moviediscs relatively easily.
leepenny
Moderator
Moderator
Posts: 224
Joined: Fri Dec 20, 2013 1:53 am
Location: the grid

Re: Any desire for a fanart.tv user script?

Post by leepenny »

yeah - this is great - snappy and functional - a great addition - coooooooooooool !
User avatar
Tobby
Veteran
Veteran
Posts: 153
Joined: Fri Dec 20, 2013 4:17 pm
Location: Sweden

Re: Any desire for a fanart.tv user script?

Post by Tobby »

Tried going into leepenny's disc art collection, but my browser slowed me down anyway :/
User avatar
Mordred
Moderator
Moderator
Posts: 72
Joined: Sun Dec 22, 2013 8:03 am

Re: Any desire for a fanart.tv user script?

Post by Mordred »

Did you enable lazy loading first?

That page is still pretty huge, so it's not going to be fast but it ought to be usable at least. If it's not, blame leepenny for being too prolific. There might be something else I can do if you guys aren't seeing any benefit, but I'm not sure.

BTW, expect some other images on the page to never load properly if lazyloading is enabled. Particularly the chat bar. I can probably do something to fix that, but we'll see.
User avatar
Tobby
Veteran
Veteran
Posts: 153
Joined: Fri Dec 20, 2013 4:17 pm
Location: Sweden

Re: Any desire for a fanart.tv user script?

Post by Tobby »

Mordred wrote:Did you enable lazy loading first?

That page is still pretty huge, so it's not going to be fast but it ought to be usable at least. If it's not, blame leepenny for being too prolific. There might be something else I can do if you guys aren't seeing any benefit, but I'm not sure.
I most certainly did not. Works now. Big improvment! :D
leepenny
Moderator
Moderator
Posts: 224
Joined: Fri Dec 20, 2013 1:53 am
Location: the grid

Re: Any desire for a fanart.tv user script?

Post by leepenny »

I take all the blame - I have broad shoulders - LOL
'prolific' - hehe - I like that
Why does everyone want to browse my disc section (no euphemism) - is it a benchmark test LOL
User avatar
Tobby
Veteran
Veteran
Posts: 153
Joined: Fri Dec 20, 2013 4:17 pm
Location: Sweden

Re: Any desire for a fanart.tv user script?

Post by Tobby »

leepenny wrote:I take all the blame - I have broad shoulders - LOL
'prolific' - hehe - I like that
Why does everyone want to browse my disc section (no euphemism) - is it a benchmark test LOL
Indeed it is
Post Reply