Stem_Cell
09/12/13 03:31PM
Yay! New version out! This took a long time (the file is already at 474 lines), but man, this thing is taking shape!

Mindwipe said:
[...] would it ever be possible to make the image display on links and the hover zoom on posts separate settings?

Can now be configured!

Vanndril said:
[...] I'd imagine it's due to the delay that Mindwipe doesn't wanna try using it.

Can now be configured too!

Mindwipe said:
I've just noticed a weird effect of this feature. This makes the "View larger version" and "Download larger version" links into zoomable links too, since they're image links, which is...rather useless.

Fixed!

Vanndril said:
Oh, so I noticed that links that can be hover zoomed with your script all have a different background color around them. That's actually pretty nifty...but would it be possible to have that only happen when the script is enabled? Seems out of place when you're not really using it atm. ;)

Fixed too!

Without further ado, <<gist.github.com/anonymous/6535972|here's the script>>, and it's also available above in the first post, with the full changelog.

Do note that you'll have to re-enable it, as it now has two separate settings.
Vanndril
09/13/13 01:04AM
Awesome work, bro! Uploaded.
Stem_Cell
09/13/13 01:36AM
Awesome!

Now I'd like some comments about what you'd want next. The tags support? Also if you find any issues, do comment about them too.

And since I cooked up such a nice plugin support, we can have more than just direct image URL previews - we could have stuff like previews for fav.me/deviantart post URLs. Since these are relatively easier to make than other features, maybe we could have priorities for which to make first.

A lot of links which point to images can be made to work with the hover zoom feature.
Vanndril
09/13/13 02:06AM
I noticed something interesting, though I'm not sure much could be done about it from just your javascript file. It seems Chrome's mouse-cursor disappearing feature when an image is hover viewed works now, but still doesn't work if the list of tags that traditionally pop up due to a feature of this software pops up before the preview window.

If adding tag support could get rid of that problem, then I'd focus on that. Killing two birds with one stone is usually a good thing.
Stem_Cell
09/13/13 03:06AM
Chrome's mouse cursor does not disappear all the time.

Explaining why is a bit tricky.

Hmm... if you put a long delay, it won't disappear. A short delay will have it disappear because the mouse did move a little, but not enough to move the cursor by even a single pixel. You can still make the cursor disappear by moving your mouse so slightly that it will register the event, but won't be enough for it to move a single pixel, and therfore the proper event will be fired, but the cursor won't have moved a whole pixel and therefore the image won't be dismissed (my script checks if the cursor has moved, and obviously it stores this data in terms of pixels).

That's what I could make of it.

It's pretty annoying, because I'm placing an area of don't-show-the-cursor where the mouse is, and it only recognizes that when the mouse moves.

I still want to find a fix.
KinkyLoli
09/13/13 05:06AM
So... Maybe hover zoom for sta.sh links? Isn't much used, but I saw some people using.
Also, for thumbnails, in the comments page, and is possible for avatars?

(sometimes I feel so lazy for open a image in new tab, but yet curious about how is the full image of some avatar...)

I'm really enjoying with hover zoom, all sites should have this option, like deviantART, but the site can't even fix old bugs, argh.
Stem_Cell
09/13/13 05:18AM
KinkyLoli said:
is possible for avatars?

(sometimes I feel so lazy for open a image in new tab, but yet curious about how is the full image of some avatar...)

The problem with avatars is that it's ok to include a safe portion of say, a loli pic, even though people may have it blacklisted.
But, one could have an option for it (disabled by default), and warn that it won't check for blacklists before opening the image.

KinkyLoli said:
So... Maybe hover zoom for sta.sh links?

IIRC, the whole of deviantART uses the same API. If I implement it for dA, I can have it work for almost any dA link.

KinkyLoli said:
Also, for thumbnails, in the comments page

Yeah! Sorely missing.

KinkyLoli said:
I'm really enjoying with hover zoom, all sites should have this option, like deviantART, but the site can't even fix old bugs, argh.

I have the impression that internally dA is absolutely FUBAR and their code base is a <<en.wikipedia.org/wiki/Big_ball_of_mud|big ball of mud>>. Otherwise they wouldn't have SO MANY BUGS.
Stem_Cell
09/14/13 06:53AM
New version out: added plugin that provides support for the big ball of mud website. Handles deviantART, sta.sh, and fav.me URLs.

Let's check some URLs. We're running version <<hhhz.version|please enable goddamn javascript to see which version>>, and this will work on versions 1.3+.

A stashed image: sta.sh/01eey046t95x

Same thing but using decimal instead of hexatridecimal in the URL identifier: sta.sh/15120158007011749

Now a deviantART url:
kinkyloli.deviantart.com/art/Hypno-tan-396324122

And one fav.me'd:
fav.me/d6jylne

And what happens to literature posts?
fallenpoeticlover.deviantart.com/art/Love-it-43850242

That's about it :)
Go upload it, Vanndril!
gist.github.com/anonymous/6558409
Vanndril
09/14/13 09:21AM
Stem_Cell said:
Go upload it, Vanndril!

*thumbs up* It's a go!
Stem_Cell
09/16/13 04:33AM
Yay! Now we have more features - thumnails in the comments page are hover-zoomable, and post # links will work!

All the following should work:

loli warning on all
post #9516
hypnohub.net/post/show/9551
hypnohub.net/post/show/93...sh-cables-dress-drool-ere

But to make it work and not abuse the server's resources in the process (by <<en.wikipedia.org/wiki/Web_scraping|web-scraping>> the data I needed), I coded a small PHP script which does what I need with very little overhead.

As you may see, <<gist.github.com/anonymous/6575432|today's gist>> includes two files: a .js and a .php. the .js one should go under the same folder as before:

.../myimouto/javascripts/hypnohub-hover-zoom.js


But the PHP one will be looked for here:

.../myimouto/hypnohub-hover-zoom.php


It is comparatively small and implements a simple API that allows me to use this as an image URL:

.../hypnohub-hover-zoom.php?post=1234


Where "1234" would be the post ID. It also caches the data so the browser won't have to ask for it twice, and it also can provide a JSON API by passing &format=json like this:

.../hypnohub-hover-zoom.php?post=1234&format=json


so that more options will open up in the future (like getting the tags and other info for a post, or maybe even handling blacklists!).

Just in case, make sure you upload the PHP file first :P
Vanndril
09/16/13 09:16AM
You've been busy. XD
It's a go!

Edit:
Lol, a few things that are not links in comments are recognized as links to the image in your script. XD Like the time when a comment was posted.

Also, avatars are zoomable. This is bad, because we allow safe sections of loli/shota images to be used. This needs to be disabled.

Bunch of random links in the post view page is also zooming when they shouldn't be.

"There's text here, let's zoomify it!" - 1.4

Yeah, I'm gonna revert it to 1.3 for now to avoid "problems".
Stem_Cell
09/16/13 09:45AM
Vanndril said:
You've been busy. XD

Haha yes :D

Vanndril said:
Edit:
Lol, a few things that are not links in comments are recognized as links to the image in your script. XD Like the time when a comment was posted.

Ow shit, please elaborate on it. What was recognized as a link? do you mean the "17 minutes ago" comment dates? This shouldn't happen :(

Vanndril said:
Also, avatars are zoomable. This is bad, because we allow safe sections of loli/shota images to be used. This needs to be disabled.

I didn't think of that, they are zoomable because they are links to posts *facepalm*
That needs a config option (and maybe a warning about un-blacklist-ness).

Vanndril said:
Bunch of random links in the post view page is also zooming when they shouldn't be.

"There's text here, let's zoomify it!" - 1.4

Script, see what you did, script. -_-'

I'll have a fixed version in the near-ish future.
Vanndril
09/16/13 10:36AM
Stem_Cell said:
What was recognized as a link? do you mean the "17 minutes ago" comment dates?

Yes, that exactly. XD To add to the list of bullshit zooms, it also decided to zoomify the favorites "stars", the "Flag For Deletion" link, and other such things. XD It was really too big a list to compile while it was running on the main site. Besides, you may be better off seeing it yourself (it's really quite funny XD) on your local xampp install.

Stem_Cell said:
I didn't think of that, they are zoomable because they are links to posts *facepalm*
That needs a config option (and maybe a warning about un-blacklist-ness).

Agreed.

Stem_Cell said:
Script, see what you did, script. -_-'

Hehe.

Stem_Cell said:
I'll have a fixed version in the near-ish future.

All good. Take your time. :)
Stem_Cell
09/26/13 12:05PM
Ok, there have been not only bug-fixes but also some great changes under the hood, for which the version is bumped to 2.0.

Now it has blacklist support! If you try to hover-preview an image that appears to match your blacklist, it will show an image which says "image blacklisted". Of course, you can still go to the page and see it by yourself by clicking through as normal.

Do note though that the blacklist support was re-implemented from scratch by reading the database myself. it should support most people's blacklists, but it won't support fancy search queries in blacklists (which it ignores). It works for simple blacklist items like "mlp rating:s char:kaa".

Also it includes the bug-fixed features of 1.4, which include comment thumbnails and user avatars, both of which not only can be enabled/disabled in the config (disabled by default as always) but also support the blacklists too, like everything else now.

I've also included a special code path which should use a caching mechanism which may or may not be installed in this server, and in case it is available, fingers crossed because I wrote that part of the code just by reading the function definintions, didn't test it.

But all should work, hopefully :) Everything else has been tested.

So please Vann, check <<gist.github.com/anonymous/6710959|this gist>> and if all goes well next thing I do is fix the thread links.
Vanndril
09/27/13 12:39AM
Stem_Cell said:
So please Vann, check <<gist.github.com/anonymous/6710959|this gist>> and if all goes well next thing I do is fix the thread links.

Done and done! Looks like it works well and good, too.

Did notice an oddity, though.

* When a pic on the comments listing has more than 7 or so comments, a link appears to the top-right of that image's frame (on the list) that says "Hidden #". The number is a link that leads to that image's full list of comments. The javascript pics this up as a link to the image because, technically, it is. It's no big deal. It just seems awkward.

Good work, Stem_Cell. And thanks. :D
<<<1 2 34>>>


Reply | Forum Index