Various search filters and user experience enhancers
< Opiniones de Hitomi - Search & UI Tweaks
I'll check it out.
I wasn't able to reproduce. please provide a reproducible case.
Got it, there are slight changes in the scheme of things on hitomi.
Yeah, so if I were to just use the original script and make a simple change like:
allowedGalleryTypes: [
'artist cg',
'doujinshi',
'game cg',
'manga',
],
to:
allowedGalleryTypes: [
'doujinshi',
'manga',
],
There would be no results until page 5 (as of now), even though there's a few doujinshi and manga gallery types before page 5.
I'm concerned that filters may be affected as well.
I am actually working on the next major version of this script so frankly you will have to bear without it for a week or so. That version handles everything differently as there is a UI for everything.
I will look into finding a middle-ground but if the site is indeed showing a definite behavior of different schemes at different pagination stages then it would be a site issue and any fixes will not work for long.
Hi there,
I'm wondering if there is perhaps a new ETA on the next version? No need to rush or anything, just curious.
Sorry, I am working on it but it has issues right now. Can't give a concrete ETA.
Hi,
Just noticed the script was updated and gave it a shot to provide some feedback. Under Tag Blacklist, as a test I tried putting in the tag female:tail, applied/saved the setting, and it did filter the listing immediately after. However, when I refresh the page, the listing appeared again and when I clicked on the female:tail tag, there were all the other listings with that tag even though it should've been filtered.
I didn't see a box for Tag Groups like the previous version, personally I used this more than single tags.
Lastly, I also realized that because my browser clears my cookies after I close the browser the settings I apply don't stick in the UI version. Is there a way to hardcode the settings as in the previous version while keeping the UI (like in your PH script)?
The script is currently in reduced functionality state.
It was in error state for so long so rather than fixing it all, I just released it with all that was ready.
My newer scripts are now reliant on local storage cache (not cookies, but perhaps you do private browsing by default). Hard coding defaults is currently unsupported. All of this was done in favor of dumbing it down for non-technical users.
I'll try to bubble up defaults setting in the script when I am done with the major features.
Complex blacklist is up though again I wasn't really able to make a reasonable UI for it. Instead you will have to make the rules, best in notepad and then paste them in the blacklist box.
Hardcoding defaults is possible if you do it in the constructor of the script, anywhere after the addXXXField chain. Like this:
this._configurationManager.getField({filter constant or name}).value = {value}
{filter constant or name}
- Represents the related filter or configuration constant as defined in the script or the parent base class. You can match with the ones defined in the addXXXField chain.
{value}
- This depends on the type of the filter being targeted
You can get current values of these filters by using the following code line in the console:
document.querySelector('#settings-wrapper').userScript._configurationManager.getValue({filter constant or name})
Hi,
After not updating the script since 4.0.2, I noticed that these hardcoded values I setup don't get read:
this._configurationManager.getField('Languages').value[...]
this._configurationManager.getField('Tag Blacklist').value[...]
this._configurationManager.getField('Show Gallery Types').value[...]
After trying each version since 4.0.2, the last version that i was able to hardcode values using the same lines of code is 5.0.1.
Is there something I need to do differently in the new version(s)?
I don't know here you have placed them, still as its not an intended way of running the script, I can't really give proper support.
Perhaps try placing them inside the closure (line 365):
this._onAfterUIBuild = () => {
this._uiGen.getSelectedSection()[0].userScript = this
// put your code here
}
On 5.0.1, I have them starting on line 106, the line before this._setupUI(). Unfortunately, even after trying to put them inside the closure indicated above on verison 5.1.1, the values still aren't being read.
I tried it works for me.
For reference I used the gallery types filter hard coded like this:
this._configurationManager.getField(FILTER_GALLERY_TYPES).value = ['dj']
Ah, I didn't realize the filter constants changed. I modified the filter constants and retried something short in line 365. For example:
this._configurationManager.getField(FILTER_LANGUAGES).value = ['japanese', 'english']
this._configurationManager.getField(FILTER_TAG_BLACKLIST).value = ['female:furry', 'male:furry']
this._configurationManager.getField(FILTER_GALLERY_TYPES).value = ['dj', 'manga']
I also just tried with the one line example above, neither worked for me.
Additionally I noticed that my page looks a bit off, like it is dimmed compared to v5.0.1 when comparing side by side.
If all else fails, I think I'll be sticking with the v5.0.1 for now.
I found out the reason why it didn't work. I had to click on Apply, then Save on the side menu. Once I did that the dimming of the page went away as well.
Is there a way to automate applying and saving the settings on page load? I tried adding:
this._configurationManager.getField(ENABLE_BLACKLIST).value = ['true']
But that didn't work in actually applying the settings.
I don't know why your settings are not getting applied. In my instance it works fine no need to interact with the UI. Perhaps reset the script and put your code where I showed?
Anyway. each field type is different and expects different value format. Its always good to first log a field to know the format and then do your thing. As in your case the ENABLE_BLACKLIST is a flag field thus it accepts a boolean not a boolean string inside an array.
Hi, awesome extension! I really helps a lot! Thank you very much for the effort!
Would it be possible to add a function to apply colors to Favorite tags?
If not, that's ok. It's already an amazing work you did!
Thank you
Did something change on Hitomi.la's side since I last visited the site? My search filters are filtering works I don't want to filter, which worked fine a few months ago.