Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [Script] Fixed Tagfield, and autocomplte!

 
post Feb 6 2017, 03:54
Post #1
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,045
Joined: 24-March 12
Level 500 (Godslayer)


This script adds an extra field for tags at the top right corner of the gallery. This new tag field works pretty much the same as the normal tag field but has some extra features:

1. The field goes with you (i.e. is fixed to the window) as you scroll down through the gallery.
2. The <TAB> button from anywhere on the page moves the focus to the new tag field
3. Once you type part of the tag in the new field you can hit <TAB> to start autocompletion
4. Every time you hit <TAB> the next item that can be autocompleted will pop into the field before your cursor
5. <RETURN> tags the gallery with the current content of the field
6. Once you tag the current list of tags in the gallery flashes (for 2 seconds) so you can review it and disappears
7. A warning and a wiki link accompanies the flashing tags

In general this should be quite easy to use: <TAB>write beginning of tag<TAB><RETURN> / repeat.

EXTRA NOTES:

* fetish and technical tags are autocompleted.
* you can add parodies, characters, artists and circles; some are already added at the end as an example

If you have not tagged yet, do read the WIKI before starting out

---------------------------

Current Version: 0.6 @ 2017-03-19
Old version: 0.5 @ 2017-02-08
Old version: 0.4 @ 2017-02-07
Old version: 0.3 @ 2017-02-06

The repository: [github.com] https://github.com/neptunepenguin/eh-fixed-tagfield
Direct link to script: [github.com] https://github.com/neptunepenguin/eh-fixed-...agfield.user.js

LIMITATIONS: Autocomplete and wiki linking only works for a single tag. You can use the field to add more than one tag at a time, but neither autocomplete nor the wiki link will work properly. Someday I'll think of a good way of handling that.

Preview (the keyboard display is not part of the script, it is there to show usage):

(IMG:[raw.githubusercontent.com] https://raw.githubusercontent.com/neptunepenguin/eh-fixed-tagfield/master/screencast.gif)

This post has been edited by blue penguin: Mar 19 2017, 19:13
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 7 2017, 06:06
Post #2
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,045
Joined: 24-March 12
Level 500 (Godslayer)


Version 0.4, with and UNDO button.

This should be the actual version of the script (a.k.a. major revision). After using it for a while, figured out that some functionality was missing. So I added it now. Download link is in the OP.

What's new:

1. Undo button: I found that sometimes you mistag because the autocomplete may mislead you. For that case an undo button was added at the bottom of the displayed warning and tag field. You have 2 seconds to evaluate whether you did a mistake and click that button. If you miss that you need to scroll up to the top of the gallery and remove the vote the old way.

2. By hitting <RETURN> in the tagfield without typing anything in it you provoke the current tags to be displayed. This is useful to check tags whilst in the middle of the gallery.

3. Hadlers for PAGE UP and PAGE DOWN buttons when you're tagging. These allow you to scroll the gallery whilst you keep the focus in the tag field. When you are in the middle of hitting <TAB> several times for a completion you can still use PAGE UP/PAGE DOWN and the position in the autocomplete list will not be lost.

4. General rework of the code to be more generic (and handle the undo button), also some code future proofing

5. Several improvements on how the dialog looks.

6. Fixed several typos in the list of possible autocompletions.

P.S. Warn me if these updates are confusing. I'm always writing them around 3AM, after a coding session.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 8 2017, 04:48
Post #3
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,045
Joined: 24-March 12
Level 500 (Godslayer)


Version 0.5, added undefined tags

OK, this should be enough changes to the script for now. Thanks to the fact that I was writing this and hoovering the wiki some inconsistencies were fixed.

Superlatanium found several tags that were not on the wiki, so I included those as well. I have *not* included m:priest because that one still requires some discussion.

Also, I made a screencase. Both the newest version and the screencast can be found in the OP.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 19 2017, 19:12
Post #4
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,045
Joined: 24-March 12
Level 500 (Godslayer)


Version 0.6, dealing with typos

A good deal of minor changes come in this release but the major change is a warning system for mistyped misc: tags

When adding a tag without a reclass:, parody:, character:, group:, artist:, or the contractions (r:, p:, c:, g:, a:) the tag will be checked against the list of fetish tags present in the script. The check normalises the tag so, say, female:stockings, f:stockings, fstockings, f,stockings, f]sTockings or even F'StoCkIngS is fine. If the tag cannot be matched it will not be sent over to EH, instead a warning will be displayed.

This has two limitations:

1. If you are tagging several tags, separated by commas, in a single request the check is *not* performed. Matching several tags and then submiting the correct ones whilst warning about the incorrect ones is a lot of code. Which would require maintenance slow the script down, whilst it will be used by less than 1% of the users.

2. To add a *new* tag into the misc: namespace you need to prefix it with the string "misc:". For example "misc:currently not namespaced character". This prevents typos in misc tags (I hope).

-------

There are also some extra enchancements:

1. When clicking the UNDO button the focus returns the the tag field. Warning: probably does not work on IE. But should make the life of correcting a wrong tag easier.

2. The sorting of autocompletes is now in alphabetical order (instead of reverse alphabetical order, I forgot that I waked the list in reverse (IMG:[invalid] style_emoticons/default/smile.gif) )

3. Fixed the scrolling with PageUp and PageDown whilst CTRL is pressed. Since Ctrl+PageXX is used to navigate between tabs we should not scroll by that key combination.

4. Added bindings for HOME and END keys, scroll to top and scroll to bottom, respectively (this mimics default no-focus browser behaviour)

5. Added new tags: f:ssbw, m:ssbbm, f:gigantic breasts, m:gigantic breasts (the last two are not yet active, use with care)

6. Fixed old typos in the list of tags (sakura kinomoot)

This post has been edited by blue penguin: Mar 19 2017, 20:24
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 29th April 2024 - 19:48