PDA

View Full Version : Weasyl Enhancer extension



Noxid
11-20-2014, 12:46 AM
Hi dudes and doodles!
In response to some claims that there are features that Weasyl's UI is lacking in, and because I will jump at any opportunity to procrastinate while still feeling like I'm accomplishing something, I've put together a couple scripts to enrich the weasyl browsing experience. Currently, there are two Fun Features you can enjoy:


Thumbnail Previews
http://i.imgur.com/QgtKOCe.png

http://i.imgur.com/gXsPhc5.png
Hover over a thumbnail for a second and a preview box will load showing up to 50 words of the description and the tags, as well as the submitter's avatar. After a preview has been loaded, the next time you mouse-over the thumb it will appear immediately.


Expandable Submissions

http://i.imgur.com/TjhPtVR.png
Personal annoyance of mine is that sometimes, very large submissions will be taller than my screen. So, I have to either zoom out or view the original submission file to see the whole thing at once. With this, significantly tall submissions will be resized to approximately the height of your browser window, and a button is added to allow you to view the larger size.

Search Builder
http://i.imgur.com/SAM7PNS.png
A form to help you make more powerful searches in case you forget what all the different modifiers are.

Folder nav buttons
http://i.imgur.com/CpD9emW.png
Additional folder navigation buttons on submissions so you don't have to scroll as far

The addon has an option menu you can use to tweak just what you want it to display, accessible from the extension/addon management page in your browser.

The GitHub repo is here:
https://github.com/taedixon/WeasylPreviews .

On the chrome store:
https://chrome.google.com/webstore/detail/weasyl-enhancer/cebpdikfnkboikhaeoeniojhhkondccl
On the firefox addon place:
https://addons.mozilla.org/en-US/firefox/addon/weasyl-enhancer/


umm... well, if people think it's useful I might keep working on it. Let me know if you have issues so I can tell you you're Doing It Wrong.

Kurk2288
11-20-2014, 02:52 AM
It appears this doesn't work for "character submissions", and journals (which don't need a preview anyways)
Regardless of that, thanks for the effort! Now I can see tags, without having to view the image! C:

Swanda
11-20-2014, 06:45 AM
Ohh, very nice <3

Noxid
11-20-2014, 08:50 AM
It appears this doesn't work for "character submissions", and journals (which don't need a preview anyways)
Regardless of that, thanks for the effort! Now I can see tags, without having to view the image! C:

Yeah, unfortunately the Weasyl API doesn't have an endpoint for "Characters", just "Submissions". So, I don't have an easy way to get information on them right now. Same story with journals, although tbh I mostly forgot about those which is why they have the same error message.

But hey, glad it's working out for ya! It can be tricky to tell sometimes, with just thumbnails alone...

Noxid
11-22-2014, 01:32 PM
Firefox addon (https://addons.mozilla.org/en-US/firefox/addon/weasyl-enhancer/) version of the extension completed!
Previews are now available to those that wish to use "the other browser".

The app has recently been submitted for preliminary review, so it requires a clickthrough warning for the next few days until that finishes. But, it's the same stuff that's in the chrome version so it should go through ok.

Noxid
12-03-2014, 11:47 PM
You mean SoFurry right? Because I've never seen FA do that :v

Anyway.. as far as programming it, I doubt it'd be too hard, however it'd necessitate basically loading the whole image and that may not be ideal for someone with slow internet like DSL (such as me lol) cuz then you'd have to wait longer for your previews.
It'd be nice if it was an optional feature you could tick on/off.
I'll see about adding an "options" page to the extension, I know it's not too hard on chrome but I'm not super familiar with how firefox addons work. And there I could also add some other stuff like whether you want large submissions to be fullsize or small by default, and enable more specific enhancements.

Storm
12-04-2014, 07:57 AM
First of all, nice work! Thanks for taking the time and effort! :)

I personally would REALLY love th medium thumbnail on hover, I think it's much more useful than the tags - this however doesn't mean you couldn't have both the thumbnail and tags. I would strip the image description preview in favor of the thumbnail.

sphrog
12-23-2014, 01:49 AM
Yeah, if it's possible (and not too taxing on the site) a midsized image preview on hover would dramatically improve the site's usability for me. Chrome has had something similar via HoverZoom for a while, but unfortunately the equivalent Firefox extension has never picked up this site on its support list. Best of luck.

sphrog
12-27-2014, 01:05 PM
Sorry for the double post, but it appears that the Firefox version has been removed. I figure you're probably busy with the holidays, but when you get a chance, please re-upload it so we can give it a try. Thanks!

Noxid
12-27-2014, 04:49 PM
Sorry for the double post, but it appears that the Firefox version has been removed. I figure you're probably busy with the holidays, but when you get a chance, please re-upload it so we can give it a try. Thanks!

Ah, that simply won't do :I
I guess they finally got around to reviewing it and there was an issue, so I've patched that up and uploaded a new version. Sorry for any inconvenience!
This "patch" version (V1.4) doesn't have any of the new features, just rewriting a bit of code so it follows the rules better. Chrome version is unchanged.

Noxid
12-28-2014, 12:43 AM
http://i.imgur.com/gXsPhc5.png
ok, I think I got something going on here
Is this what you wanted?

sphrog
12-28-2014, 03:13 AM
Precisely! I'd be happy to test it, if you have a working build available. Thanks for developing this :D

Noxid
12-28-2014, 09:15 AM
If you want to give it a shot while I mirror these features on the chrome side, you can download a firefox XPI for V1.5 here: http://noxid.ca/files/weasyl_enhancer.xpi
just drag that onto firefox I think and it should install it. It seems to be working ok but more testing never hurts.

sphrog
12-28-2014, 02:46 PM
Oh man, that works way better than I anticipated. I was just about to provide feedback for some configuration options you could add (even though I like the default settings, for the most part) and was pleased to discover that you'd already implemented them. I'll let you know if I find any functional inconsistencies, but from what I'm seeing this is exactly the kind of extension I've been wanting for Weasyl since I set up a gallery here more than a year ago. Thanks, friend!

Noxid
12-28-2014, 09:16 PM
Okay, I've pushed V1.5 to both firefox and chrome. It should appear or update uh... sooner or later.
Both have options that can be accessed via your browser's respective addon/extension management page (about:addons for firefox and chrome://extensions for chrome).
I have it set to not show image previews by default, to remain consistent with the previous version and so it's not an issue for people with limited connections but it should be easy to turn on.
There is a known issue where certain special characters show up as their HTML equivalent in the text descriptions i.e. "<" appears as "&lt;", but otherwise it seems to work okay for me. As usual, let me know if there are any issues!

Storm
12-31-2014, 06:11 AM
Oh cool! Thanks! :D

Now, if I may have another suggestion: Can you give it options to enable/disable the things (thumbnail, tags, user avatar, descr.) that are visible? That way people could customize it to their preferences.

For me for example, the only thing I want to see is the thumbnail, nothing else. Sure, I can use local CSS (via the Stylish addon) to remove the rest, but not everyone knows how to do that.


I hope you don't take this as complaining, I'm just trying to give feedback to make it even better! Honestly though, the thumbnail preview should be a built in feature of Weasyl really. I hope they add it some day.

- - - Updated - - -

I experienced a bug. One time one of the preview panels got stuck on my screen, until I once again hovered over the thumbnail it belonged to. I don't know what triggered it, and couldn't reproduce it, but most likely related to scrolling the page while a preview is active.

Noxid
12-31-2014, 10:40 AM
you should already be able to do that!
in chrome:

go to chrome://extensions
click the options button
uncheck what you don't want to see
http://i.imgur.com/vq8xwJl.png

in firefox:

click the hamburger in the top right
go to the addons menu
click "extensions"
click "options" under Weasyl Enhancer 1.5
http://i.imgur.com/BUKcyo7.png
If these options don't appear then you might have the old version, just try reinstalling it.

As for the other point, it's possible that the browser glitched/lagged and didn't send the mouse event for when the cursor left the thumbnail - I'm not sure what I can do to combat that, but I'll make a note of it for sure.

piņardilla
01-09-2015, 12:15 AM
Great work on this, I'm using it and loving it.

Feature idea if you feel like implementing it: I think it'd be awesome to be able to add tags from the preview popup, so you never even have to click anything to tag art. Like, there'd be a text field at the bottom of the preview (options-configurable ofc) that already has focus when it comes up, and you just type in some tags, hit Enter, and boom it's done.

Granted, I don't even know if this is even possible through Weasyl's API right now, but it'd be a neat feature if it is!

piņardilla
01-09-2015, 03:35 PM
Huh. Sorry to doublepost, but Avast just threw a fit at me for having this installed because it "has a bad reputation amongst Avast users (1 star)" and recommended I remove it for security risk. Now I doubt that there's an actual issue because nobody's actually spoken up about one, I'm just left kinda wondering what the hell, why?

Noxid
01-09-2015, 09:55 PM
I don't know <_>
Someone mentioned that to me.. in the IRC once? and I don't know why it could be saying that.
The extension is open-source, so if there were anything untoward it would be pretty easy to find out. For the firefox version, you can even view the source of the exact files that are being distributed at https://addons.mozilla.org/en-US/firefox/files/browse/290632/

I don't know whether it's just because someone is trying to punk me or it's some kind of yelp-tier scam to make me pay to remove the negative review. If there is a genuine issue, then by all means let me know and I'd be glad to fix it - I'm not the best, but I do the best I can to write my software well.

Storm
01-17-2015, 05:32 PM
Hey!

Sorry for the slow reply. And wow, I somehow managed to completely miss that it already has settings! Cool, I just disabled everything I didn't need and now it's exactly what I want! :) Thanks again!

As for Avast... I used to for many years until I switched to Linux, I never had an issue with it. Probably you should try to contact them and ask about it. I wonder if it has only one rating, if yes then someone is being an ass, and Avast should know better than issue warnings based on a single report.

piņardilla
01-31-2015, 12:55 PM
One thing I noticed: when the description contains a user icon inline, it simply gets ignored, so I see a lot of previews that say "Commission for ." Could it maybe be parsed and displayed as the username the icon belongs to?

Noxid
02-01-2015, 05:41 PM
Hokay, V1.6 should be making its way through the pipes soon. I believe I fixed the issue with the user icons, and some special characters, namely <, &, >, not displaying properly.
I'll look into your suggestion about tags now and see how easy that'll be.

As well, I looked into piņardilla's previous suggestion, and it doesn't look like it can be easily done at the moment. Sorry!

Noxid
03-24-2015, 10:44 PM
Hey everyone!
Hope the extension is working well for you. If you have any issues or suggestions, please let me know and I'll try my best to help!

Speaking of helping, someone rated the Chrome extension one star :<
There's no review so I have no idea what they disliked about it, but if you've used the extension and found it useful, it would be a big help if you could rate it so people know it's not a bad extension!
https://chrome.google.com/webstore/detail/weasyl-enhancer/cebpdikfnkboikhaeoeniojhhkondccl/reviews this should take you to the rate/review page, if you would be willing.
Uh, if you used it and didn't find it useful you can rate it too, but at least lemme know what's wrong :0

Tara
03-28-2015, 04:08 PM
As far as I can tell, it's working well in Firefox for me! Good job! And thanks for the effort. It's good to have a way to counter those square thumbnails.

Noxid
04-02-2015, 12:58 AM
Thanks! Glad you're enjoying it.

I'm working on some new stuff spurred by.. recent discussion.

Biggest thing is the "Search Builder", which allows you to simply create advanced searches without having to look at the documentation for the search terms. How it works is, you click this button here:
http://i.imgur.com/R1QEVMs.png

And then this little form appears, and you can fill in what you want to search and it'll automatically put the right stuff in the search bar for you like so:
http://i.imgur.com/pcrRgHv.png

And then you can press enter in any of those fields and it'll perform the search. There'll also be an option to turn it off if you really don't care / don't need it. I have it almost ready to go but it's late and I wanna take another day to test it and think about the design some more, plus port it over to the firefox side.

If you're a bit savvy and want to try it out early and lemme know what you think then you can download a crx of the current build here: http://noxid.ca/files/weasylEnhance_chrome_1_7.crx

I'm also considering making the preview image size customizable, but I'm not entirely convinced it's necessary. It is a *preview*, after all.

I've also had some suggestions elsewhere about some efficiency features like faving/commenting from thumbs. Unfortunately, this isn't within the scope of the extension right now, for a couple reasons. Primarily, because the currently-documented API is just read-only, meaning I can't use it to "do" things like watch someone, add a favourite, etc. There are probably some "hack-y" ways I could make it work but it would be a nightmare to implement and keep up to date.
The other reason is that even if it were possible you'd probably need to create and give the extension an authorization key which is some more complicated stuff that I don't really want to have to make people do.
So thank you for those suggestions but unfortunately I don't think I'll be able to do that any time soon!

I'll be happy if they update the API to include Journals and Character submissions :P

Swanda
04-02-2015, 11:00 AM
Oh that Is super neat and helpful!
I really don't think the previews need to be bigger either, they work fine for what they were intended as at the very least.
hehe, now the only thing I'll need out of Weasyl is some prober <Previous| and |Next> buttons when browsing peoples submissions :'D

piņardilla
04-07-2015, 06:25 AM
Oh that Is super neat and helpful!
I really don't think the previews need to be bigger either, they work fine for what they were intended as at the very least.
hehe, now the only thing I'll need out of Weasyl is some prober <Previous| and |Next> buttons when browsing peoples submissions :'D

Lower right corner, beneath the tags. Admittedly, they're not currently in the most obvious location.

Swanda
04-07-2015, 03:41 PM
Which is why I said prober <Previous| and |Next> buttons... and not the waaaay out of sight we got right now D:

Noxid
04-07-2015, 03:50 PM
I could probably like, move those too
or do something
y/n? where would you put it?

Swanda
04-07-2015, 04:28 PM
Under the submission itself, which can be a problem with really tall submissions I figure, as Weasyl handles them kinda poorly from the start. Eeeh dunno...
Like if my dreams were to come true and tech did this themself, it would be awesome to have the prev/next things next to the submission, and then have them move below in smaller screen formats.

I mean, look how easy it would be to navigate peoples galleries:

https://40.media.tumblr.com/4a12729152a51457249011a0b3a75d34/tumblr_nmgdpwTzKG1seevvco3_1280.png
https://41.media.tumblr.com/97d973fbf3f388f3aa25b23446221d5b/tumblr_nmgdpwTzKG1seevvco1_1280.png

These are of cause super quick and ugly photo edits, but they give a general idea X)

Noxid
04-08-2015, 05:56 PM
I like the suggestion to have them on the side, but there's a problem with that - for submissions with a wide aspect ratio, and that are particularly large, the image can take up the entire width of the site area. For those cases, it wouldn't work to put them on the side no matter how large your display is.
I could have checked dynamically to see if there was enough room on the sides to cram something in, but, I think that would have been weird to have the buttons move around from submission to submission

So what I went with was putting some small links underneath the image like your second image. I think it'll give the most consistent experience. I also left the old ones where they were since they weren't hurtin nobody.

Also, I keep forgetting that you can navigate through folders using the left/right arrow keys. Secret features.


Anyway, these changes should be rolling out soonish. Hope they work for ya'.

Swanda
04-08-2015, 06:28 PM
Yeaaah figured as much, as I said it would be a dream feature, not a realistic one X)
But thanks for the putting even more work into this! It’ll help a lot.
Also hidden features are bad features D: You can use anything that you don’t know is there, and ehh, arrows are convenient, cuz then you'll never have to move your hand over to the keyboard while browsing.

piņardilla
05-03-2015, 10:19 PM
Bugfix suggestion: add a line of code when a preview popup is generated that closes any existing popups? Once in a while I manage to make a preview popup that doesn't go away once I move the mouse away.

Noxid
05-04-2015, 12:03 PM
Yeah, I guess it is possible to get the popups into a bad state somehow. I'll fix it when I get a chance.

CartelSaide
05-16-2015, 11:13 PM
This is extremely helpful, thank you :D I've subbed to the thread and will be sure to get back to you should I find that there are any issues in the Chrome add-on c:

Iscin
05-20-2015, 02:59 AM
Good stuff!

Tartii
06-22-2015, 08:50 PM
Is it at all possible to also hover over the submission thumb to display the full image too? Aside from just the description? c: It looked like you could do that in the screenshots you shared, but for some reason I do not get that result on my end.

Noxid
06-22-2015, 09:02 PM
You might need to modify the options to suit your preferences. It's at chrome://extensions on chrome, or about:addons in firefox (just type either of those into the url bar)

Tartii
06-22-2015, 10:40 PM
You might need to modify the options to suit your preferences. It's at chrome://extensions on chrome, or about:addons in firefox (just type either of those into the url bar)

Ah wonderful, it's fixed! Thanks :D

Noxid
07-05-2015, 10:51 PM
Just a heads up for everyone in light of the pending Thumbnail revamp: The image preview feature is going to probably be a bit redundant now, but you can still config your options to preview tags/descriptions only or turn off the hoverpreview entirely by disabling all the things that go in it and still enjoy the other features Weasyl Enhancer has to offer!

I'll look into the aftermath once the changes go live, and fix anything that needs to be fixed to keep the extension working.

Noxid
05-26-2016, 08:41 AM
I figured this would be a good time to give this a bump incase anyone is interested in using it '<'