Topic: e621 subscriptions/watched tags browser extension

Posted under e621 Tools and Applications

I've made a browser extension that allows user to subscribe to any kind of tags.

Features:

  • Extension adds "OwO/XwX (Subscribe/Unsubscribe)" button for every tag shown on the left sidebar
  • Extension also adds "Watched" button to the navigation bar on top of the page. Clicking it activates special code that shows result as search query with every your tag OR-separated (even if there is more than six forty of them)
  • List of watched tags can be checked from browser button
  • It is possible to check new images without visiting the site via popup window -- it shows count of new posts since last visit
  • NEW You can subscribe to complex search queries by entering them in popup window

Downloads:
Get for Firefox
Chrome Web Store

Other browsers

Extension is built using WebExtensions API, so feel free to contact me if you want this extension running on your browser

Updated

Brave is a chromium based browser (at least per my knowledge) but it throws a dropdown error saying that 'apps, extensions, and user scripts can't be added from this website'.

Updated by anonymous

Mdf said:
Brave is a chromium based browser (at least per my knowledge) but it throws a dropdown error saying that 'apps, extensions, and user scripts can't be added from this website'.

Try enabling developer mode on extensions page ("chrome://extensions" in address bar). If it won't help, rename CRX file into ZIP (or just download the archive), unzip it somewhere and then add it into your browser using "Load unpacked" button on extensions page

Updated by anonymous

Hmm, okay, interesting. Doesn't seem to be working, or at least it appears that way. We're making progress though so that's appreciated.

The 'Watched' tab acts more like a link to 'Posts', just with the addition of /1/ at the url's end, and the subscribe buttons don't appear to do anything visible.

javascript:void(0) appears in the lower left so I'd assume it has something to do with my javascript settings but those are already set to allow.

Cookies - Allowed
JS - Allowed
Autoplay - Blocked
Flash - Blocked
Popups/Redirects - Blocked

Going back into the extensions section, it seems like an error of some sort was thrown.

https://snag.gy/6Hk4IV.jpg

Line 36 is highlighted: var sender = event.detail.sender;
https://pastebin.com/T2UM88Fj

Updated by anonymous

Mdf said:
The 'Watched' tab acts more like a link to 'Posts', just with the addition of /1/ at the url's end, and the subscribe buttons don't appear to do anything visible.

Yep, it will behave like that until you subscribe to any tags

javascript:void(0) appears in the lower left so I'd assume it has something to do with my javascript settings but those are already set to allow.

It is ok, too.

Going back into the extensions section, it seems like an error of some sort was thrown.

Well, it is not okay. I'll see what can be done here today or tomorrow

Updated by anonymous

Mdf said:
Line 36 is highlighted: var sender = event.detail.sender;
https://pastebin.com/T2UM88Fj

Fixed it, tested it on latest version of browser, seems working. Still have no idea why the same code was running perfectly on pure Chromium and refused to do so on Brave.

Updated by anonymous

milesseventh said:
Fixed it , tested it on latest version of browser, seems working. Still have no idea why the same code was running perfectly on pure Chromium and refused to do so on Brave.

Uninstalled the old version and reinstalled the new version. Alright, starting to see function. Clicking on the icon changes OwO to XwX but it only does so for the top most tag (often the artist).

After just leaving the artist tag as is and going to the 'Watched' tab, I'm redirected to a search with "~X " in the tag search with no relation to the selected tag, or the artist tag.

Clicking the back button and force refreshing now shows all the icons as XwX and clicking on them only toggles the artist tag.

No errors are being thrown in the extensions page. Clearing cookies shouldn't be a problem as I'm getting the same results in incognito mode .

Updated by anonymous

Mdf said:
Uninstalled the old version and reinstalled the new version. Alright, starting to see function. Clicking on the icon changes OwO to XwX but it only does so for the top most tag (often the artist).

Курва!

Should be working now, but cannot test it

Well, which version of browser do you use? I installed latest from their site and can't reproduce it.
The previous problem was related to determining which OwO button was clicked to change it's title, and it seems like fix didn't help. Still, it has to be able to maintain list of subscriptions, just can't refresh their titles.
You can try checking it opening combatfox.js file in text editor and making line "DEBUG_LOGGING" look like "const DEBUG_LOGGING = true;". After reloading extension it will show the list of tags in the console after every button click.
No need to clear cookies, they are not used.

Dunno how it works, should we probably move to PM?

Updated by anonymous

Installed!

Honestly, I don't know why it isn't a built-in functionality of e621 itself yet. Such an obvious thing to have, one would think.

Updated by anonymous

milesseventh said:
Well, which version of browser do you use? I installed latest from their site and can't reproduce it.

Dunno how it works, should we probably move to PM?

Version 0.60.45 Chromium: 72.0.3626.109 (Official Build) (64-bit)

const TAG_PER_QUERY_LIMIT = 6;
const DEBUG_LOGGING = true;
const MERGE_LOGGING = false;
const ERROR_LOGGING = true;

After changing

DEBUG_LOGGING

to true, I turned the extension off and back on, nothing appears to have changed and no errors are apparent.

I think it would be a good idea to keep debugging public so that way other people who might be testing can see what's already been tried.

Angurr said:
Honestly, I don't know why it isn't a built-in functionality of e621 itself yet.

Back when I was newer I thought that this was a feature that privileged/contributor users but looking at the help page either I just made up a memory or it got removed at some point. :/
https://e621.net/help/show/accounts

Hey, since you have it installed (and presumably working), what browser are you using?

Updated by anonymous

Mdf said:
Version 0.60.45 Chromium: 72.0.3626.109 (Official Build) (64-bit)
Hey, since you have it installed (and presumably working), what browser are you using?

Version 0.60.45 Chromium: 72.0.3626.109, x64
O_o

Well, what's with new version?

Angurr said:
Honestly, I don't know why it isn't a built-in functionality of e621 itself yet. Such an obvious thing to have, one would think.

There was request for it few years ago

Updated by anonymous

Mdf said:
Aye, that's the version I previously tried, didn't work.

Ok, thank you for feedback. Just to make sure:
> When page loads, you see "Watched" button and series of OwO button near the tags
> When you click the any OwO button, only first button changes, and only if you click the same button
> If you click any button once, "Watched" button should show search query with the tag you clicked

I've made a special version with extra logging, so it should log almost every action it does. To view logs hit cmd+alt+i(Mac) or F12(Win) button and navigate to "Console" tab. Do some clicking and show me it's contents please, if any. Best scenario is you click same button twice and then click few others one time per tag, but it's not mandatory. Here is the file

Updated by anonymous

Mdf said:
https://snag.gy/5W3Ezt.jpg

Let me know if you need anything else.

Thanks!
Seems like script was detecting X button as a tag link, maybe because it was added by third party. I improved it to do this detection better, so try it out. I'll update this if it works fine

Link

Updated by anonymous

milesseventh said:
I improved it to do this detection better, so try it out. I'll update this if it works fine

Ahhhhh, that seems to have achieved a desired result.
https://snag.gy/CYAWnt.jpg

It would appear that the search engine doesn't mind using more than the usual 'member' allotment of six tags per query so that's nice for starters. I wonder if that would open up the potential for abuse of site features?

Not expecting much as far as functionality goes since this is for all intents and purposes, v1. Future functionality I'd like to see is the extension in the sidebar, click that and have it drop down, and make it so the tag that is clicked on (or maybe even check mark multiple tags?) opens up another tab and the search results are shown.

Furthermore, I think that separating artists, characters, and the likes from regular tags would also be a smart improvement.

The Watched tab shows what you'd expect it to, nothing much comes to mind on how that can be improved aside from what I had already mentioned about the extension in the sidebar in the comments above. I don't want to be seen as asking too much so I'll just leave it at that for now.

My only question is if it would show an alert that a new image has been uploaded using a tag on your watch list? I can see this being very helpful when it comes to following artists and characters in particular.

Updated by anonymous

Mdf said:
Ahhhhh, that seems to have achieved a desired result.
https://snag.gy/CYAWnt.jpg

Nice to hear that =3
Release version with disabled logging

Mdf said:
It would appear that the search engine doesn't mind using more than the usual 'member' allotment of six tags per query so that's nice for starters. I wonder if that would open up the potential for abuse of site features?

Extension doesn't interact with site in any special way -- it just makes requests like users do, and merges their results with page contents, as if you were browsing with few tabs open.

Thank you for suggestions, there are no alerts currently but I'll surely implement those features later

Updated by anonymous

Hey !

It'd be very cool if we could access the link of the tags we are watching just by clicking on them on the little pop-up.

( Example => https://e621.net/post?tags=example )

Also see the amount of images contained by a tag since the last time we clicked on it. (I don't know if it's very understandable but xD)

Because all work deserves to be rewarded I could give you some money for adding these fonctionalities just DM me.

Thanks for the amazing tool !

Updated by anonymous

An update just popped up, that the extension now wants access to data on all sites. What changed to warrant this permissions update?

Updated by anonymous

Angurr said:
An update just popped up, that the extension now wants access to data on all sites. What changed to warrant this permissions update?

Fixed it, sorry. Now it is limited to e621.net. Permission is used to request data from popup script to check if there is any new posts. It is needed because popup is not directly related to e621.net from browser's point of view.

Updated by anonymous

I started using this to replace all my open tabs (tree tabs) and near the bottom of the list noticed that suddenly everything I had watched disappeared. Only a few tags were left on the list.
There wouldn't happen to be a 'history' of sorts would there?

Updated by anonymous

Falp said:
I started using this to replace all my open tabs (tree tabs) and near the bottom of the list noticed that suddenly everything I had watched disappeared. Only a few tags were left on the list.
There wouldn't happen to be a 'history' of sorts would there?

I've received another report with with this issue recently, so it's a pretty strange tendency. I can not know how browser stores the data provided by extension for long-term storage as it is browser's responsibility, but I can implement some kind of import/export feature soon so you can save backup data somewhere else. Kinda busy right now, but will surely make an update in a week or so.

Updated by anonymous

New version is out. In 1.5, you can save your subscriptions to a text note and then import them into the plugin.
Just keep in mind that it wasn't meant for manual editing and there is no safety checks, so it is recommended to copy exported text carefully(it won't explode if anything goes wrong, though).
Oh, and your previous subscriptions (if any) will be erased during importing.

Sorry, did not have much time to make it better.

Updated by anonymous

Congratulations! You've reinvented the wheel called RSS.

Not sure why browser vendors like Google prefer the idea of a separate addon for each site which periodically crawls and parses html (yuk!) and kill support of RSS & Atom in favor that weird idea.

Fortunately e621 still supports it even with tag exclusions.

Don't worry about the limit of excluding only 9 tags per subscription, since you could have an unlimited amount of RSS subscriptions, you could scale it to one desired tag with 9 undesired tags per subscription.

Updated by anonymous

Just curious, now that E6 has been updated, will this extension be updated as well?

mdf said:
Just curious, now that E6 has been updated, will this extension be updated as well?

Yes, I use it actively so I will update it in a week. Somehow I didn't know about beta test of new version of e621, otherwise I would do it earlier, sorry

I also recommend to make a backup of list of tags, just to be safe

(UPD: Almost done, need to figure out something with CSP and debug)

Updated

milesseventh said:
Yes, I use it actively so I will update it in a week. Somehow I didn't know about beta test of new version of e621, otherwise I would do it earlier, sorry

I also recommend to make a backup of list of tags, just to be safe

(UPD: Almost done, need to figure out something with CSP and debug)

Thanks for your hard work. :)

Version 1.6 is out!

I had to remove the code that checked count of new publications for each tag (it was working poorly anyways), but the rest of functionality is restored, you still can check for new images and see the count without loading the page.

Technical details

Even though I tested the extension, I'm still not sure if it doesn't violate Content Security Policy of e621. Both browsers keep logging errors when I click embedded elements on page, but their code is executed. Contact me if you can help me to clarify that.

UPD: I also released version 1.6.2, the only change is that configuration is updated to use 40 tags per search query instead of just 6. Works much faster now.

Updated

milesseventh said:
Version 1.6 is out!
...
Works much faster now.

Can confirm that most functionality aside from new post count on individual tags is restored. As for that feature working 'poorly', what made it so? Everything seemed to work as it should have.

Running on v1.6.0, 1.6.2 is not appearing in the chrome extension store.
Brave browser - Version 1.4.96 Chromium: 80.0.3987.132 (Official Build) (64-bit)

mdf said:
As for that feature working 'poorly', what made it so? Everything seemed to work as it should have.

Extension stored count of posts under each tag each time you checked "watched" page. To know this count, it checked the numbers shown in left sidebar next to each tag. The problem was these counters in sidebar didn't reflect actual count of posts, and seems like these numbers were updating with some delay. Generally, it worked good, but with errors.
Anyways, now it seems that e621 decides which tags to show in left sidebar differently, and in most cases it doesn't show all the tags that are in the list. If there was a way to quickly know how many posts tagged with specific tag there is, this function would work. I'll investigate it and maybe contact e621 guys for tips.

mdf said:
Running on v1.6.0, 1.6.2 is not appearing in the chrome extension store.

They were rejecting it for few days due to "Spam and Placement in the Store" after two retries, haha. Had to email them, and they approved it today. It's sad to witness what Google turned into.

anyway, you can implement custom tags? such as "sound favcount:>50" or "story rating:e favcount:>50".

zazerak said:
anyway, you can implement custom tags? such as "sound favcount:>50" or "story rating:e favcount:>50".

There might be some issues to implement this, but, theoretically, it can be done. Will do if anyone else will request this.

I've had this installed for a while but never gave it much use because I mostly always search for various tags, like "animated male/male -female" for example.

This isn't possible right now from the extension, right? I guess it's something like zazerak said since it's also a query for merged tags.

Thanks for the rest of the work tho!

Well, better late than never. It took about a month to pull myself together and rewrite the add-on from scratch (well, not really from scratch, but close). I was planning to add sync option, so it would be possible to link extension data to mozilla/google account and sync it across devices. The problem is the feature is not supported by Firefox Android, so I decided to postpone it. May implement it in future though, like a way to store backups maybe.
The good news are that you can subscribe to complex search queries now. e621 doesn't support parenthesis and other complex operators for search, so I had to make it load pages for each query separately, like I was doing before to pass 6-tags-per-query limitation. It works pretty fast, though, since I learned a lot about working with async code during these years.
And, of course, sorry for the delay. An year passed since the feature was requested, my bad.

Added subscription to complex search queries. Please note that each query makes add-on load a page from e621, so please stick to common tag subscriptions if possible.
I also did rewrite the whole code, now it runs much better when loading multiple pages, and also allows quick modifications in future. I made sure your current subscriptions won't get lost after update, but don't forget to make a backup, just in case.
And there are some minor cosmetic improvements.

Updated

milesseventh said:
Well, better late than never. It took about a month to pull myself together and rewrite the add-on from scratch (well, not really from scratch, but close). I was planning to add sync option, so it would be possible to link extension data to mozilla/google account and sync it across devices. The problem is the feature is not supported by Firefox Android, so I decided to postpone it. May implement it in future though, like a way to store backups maybe.
The good news are that you can subscribe to complex search queries now. e621 doesn't support parenthesis and other complex operators for search, so I had to make it load pages for each query separately, like I was doing before to pass 6-tags-per-query limitation. It works pretty fast, though, since I learned a lot about working with async code during these years.
And, of course, sorry for the delay. An year passed since the feature was requested, my bad.

Hello, it appears that the latest update causes the e621 search bar to be constantly overridden. So let's say you check your watched subscriptions, then you click on a random tag, then you click on the second page of that tag. It will just show the second page of your watched subscriptions. This is fixed after disabling the extension.

Note that this is on the Firefox version of the app. I don't know if this bug occurs on other supported web browsers.

One last thing, this bug occurs on e621's side specifically, but could be fixed unintentionally with a change in how the extension searches up your subscriptions. Having over 40 subscribed tags can make e621 all messy with managing your blacklist. Some images will leak through the blacklist. This could be fixed by making the extension bring up a new tab per 30 subscribed tags. Obviously and again, this is not a bug with your extension, but you can unintentionally fix it by doing this.

I hope you can reply that you acknowledge this. I'm not sure if you are notified of this reply. I might email you if the bug remains. Thanks anyways for the extension, have been using it for over a year.

markoss said:
Hello, it appears that the latest update causes the e621 search bar to be constantly overridden. So let's say you check your watched subscriptions, then you click on a random tag, then you click on the second page of that tag. It will just show the second page of your watched subscriptions. This is fixed after disabling the extension.
<...>
I hope you can reply that you acknowledge this. I'm not sure if you are notified of this reply. I might email you if the bug remains. Thanks anyways for the extension, have been using it for over a year.

Yep, I'm monitoring this thread. I noticed the issue with searchbar just yesterday, too, will update in a day or two. About blacklist issue -- that's new, but I think I know why it happens, will fix it in this update. Thanks for the feedback!

The most recent update fixed the thing where all searches are replaced with the subscriptions search, but now the subscriptions search is broken. It's only showing tags from the first query. The results from the second query would show up about a second later, so it's noticeable that the extension isn't loading them now. The "new images" count is also stuck, it's showing the amount of images since the extension broke. So for example right now it's at 46 new images, which is the amount of new images from the past week or so since this issue began. It seems to be counting images from the second query as well, interestingly.

Great extension btw! Extremely useful; when functioning properly it's genuinely amazing to use. Thanks for your work on this.

rikatan said:
The most recent update fixed the thing where all searches are replaced with the subscriptions search, but now the subscriptions search is broken. It's only showing tags from the first query. The results from the second query would show up about a second later, so it's noticeable that the extension isn't loading them now. The "new images" count is also stuck, it's showing the amount of images since the extension broke. So for example right now it's at 46 new images, which is the amount of new images from the past week or so since this issue began. It seems to be counting images from the second query as well, interestingly.

Great extension btw! Extremely useful; when functioning properly it's genuinely amazing to use. Thanks for your work on this.

I recently logged back in and I'm still having the search bar being overriden like my previous post 7 days ago. I did get the new 2.0.1 update and restarted several times too. However, I'm not getting this bug you are getting Rikatan. Which browser are you on? I'm currently on Firefox.

markoss said:
I recently logged back in and I'm still having the search bar being overriden like my previous post 7 days ago. I did get the new 2.0.1 update and restarted several times too. However, I'm not getting this bug you are getting Rikatan. Which browser are you on? I'm currently on Firefox.

Firefox. It seems I'm still having issues with the search as well, I just didn't notice. Around the time you posted about the issue, the text in the search bar was being replaced. Now it isn't, but the pages at the bottom still link to the subscriptions page instead of the search I'm doing.

Aw, damn, sorry for the trouble. I fixed paginator now, and also disabled overwriting of search bar contents just in case, since it was purely decorative. That's weird that it was behaving like this though.

rikatan said:
It's only showing tags from the first query. The results from the second query would show up about a second later, so it's noticeable that the extension isn't loading them now. The "new images" count is also stuck, it's showing the amount of images since the extension broke. So for example right now it's at 46 new images

It seems like it was happening because your blacklist was empty, managed to reproduce it that way easily, thanks to your description. Popup window isn't using censor function so it was working fine, but main script was failing as it expected a blacklist being present in page header. I hope I fixed it in 2.0.3, just uploaded the update. Sorry, again, hope I didn't break anything else this time.

Updated

milesseventh said:
Aw, damn, sorry for the trouble. I fixed paginator now, and also disabled overwriting of search bar contents just in case, since it was purely decorative. That's weird that it was behaving like this though.

It seems like it was happening because your blacklist was empty, managed to reproduce it that way easily, thanks to your description. Popup window isn't using censor function so it was working fine, but main script was failing as it expected a blacklist being present in page header. I hope I fixed it in 2.0.3, just uploaded the update. Sorry, again, hope I didn't break anything else this time.

I force updated my extensions and now it works! Thank you legend milesseventh ʕっ•ᴥ•ʔっ

This might be a weird question, but would there be any way to bookmark the button/list and have it update?
So to put it in perspective...
I have a custom new-tab page with a link to my watchlist on it. Over the past year or two, I've been happily adding things to my watchlist while browsing the site, and using the link on my homepage to open up the watchlist. It's only recently that I've found out that the link created was essentially a snapshot of just the tags I was watching when I created the link, and that all the tags I watched in those 2 years were never "shown" to me because I never interacted with any of the addon's links (like clicking the watchlist button on the website, or the addon). Only now do I realize that clicking those links actually shows me the things I subbed to.
Which means that any time I want to update or add to my watchlist, I also have to update the bookmark/website on my new-tab page's HTML. Needless to say that's a bit of a hassle.

So my question is this, is there any way to have a link that I can use on my page that goes to the updated watchlist every time?
Like maybe there's a way to put some JS stuff into the link, or a way to go directly to the "Watched" page.
Inspecting the button on the site just gives a "Javascript Void", so I'm guessing it doesn't actually do anything in terms of loading anything on the site. Since the links look like they're a long search for all of the tags you watch.
But I figured there's some way of pairing that functionality up with a regular 'ol hyperlink that I can click from my homepage.

Thanks in advance!
Hope it wasn't too confusing.

cg2424 said:
So my question is this, is there any way to have a link that I can use on my page that goes to the updated watchlist every time?

Currently not, but I'll update it soon, so it will open a special link which will automatically redirect to feed. Sorry for that inconvenience.

Also, links that have "javascript:void" address are just buttons that run JS code that browser is supposed to render as link. They usually can't open pages unless it is done by JS code they call.

milesseventh said:
Currently not, but I'll update it soon, so it will open a special link which will automatically redirect to feed. Sorry for that inconvenience.

Also, links that have "javascript:void" address are just buttons that run JS code that browser is supposed to render as link. They usually can't open pages unless it is done by JS code they call.

No worries, thanks for the reply. I'll be looking forward to the next update! Is there somewhere specific I should be looking for the update, or will it push automatically for the extension?

Could there be a way so that when I click the "View watched" button it opens the page in my current browser page?
On Chrome, if I'm using the extension in an incognito window and I click that button, it then opens a seperate non-incognito page to view the page in instead of the browser page I'm currently using.

Also I'm a bit confused on exactly how this extension worked. I imported a list of ~50 tags (imported from a different app I was using), but when I click the button it searches with 40, which makes sense since that's the max limit e621 allows for my acct. Is there something in the code that makes the extension work no matter how many tags can be used? Or is something wrong happening?

meowmcmeow said:
Is there something in the code that makes the extension work no matter how many tags can be used?

Exactly. Currently it is detecting if you are on a search page and if your search query matches the one being generated by clicking "watched" button, then it makes search queries for the rest of tags in background, quickly pushing it's content into the page you're looking at.

meowmcmeow said:
Could there be a way so that when I click the "View watched" button it opens the page in my current browser page?

Will do!

cg2424 said:
Is there somewhere specific I should be looking for the update, or will it push automatically for the extension?

Depends on your browser, but usually extensions are updated automatically. If it's not, there is always an option to update them manually by visiting it's page at addons store

Hmmm odd. I just did a check by hitting the "watched" button but it goes to a page that seems to only have my first 40 tags. For instance, a new image tagged with glamrock_freddy_(fnaf), which is in my watched list but is my watched tag #50 or so, doesn't show up when I hit "Watched" on the extension page or on the website.

Edit: as well, the "new posts" count is permanently stuck at 75+ new images

Edit2: for reference, my version of the app is the Google Chrome one, on Mac. Extension version 2.0.3

Updated

I don't think the mechanism to include results past the normal limit is working as intended, certainly not over multiple pages.

Ideally I would only see the most recent results but I end up with items that are several years old near the end of the results on the first page.

list said:
I don't think the mechanism to include results past the normal limit is working as intended, certainly not over multiple pages.

Ideally I would only see the most recent results but I end up with items that are several years old near the end of the results on the first page.

It is possible because additional search queries provide results on a page including old posts before they merge into one. They are sorted by creation date though, so it's likely that it's working as expected.

meowmcmeow said:
doesn't show up when I hit "Watched" on the extension page or on the website.

Edit: as well, the "new posts" count is permanently stuck at 75+ new images

Edit2: for reference, my version of the app is the Google Chrome one, on Mac. Extension version 2.0.3

Investigating, I'm testing new features currently, but it may take some time since I'm sick, sorry.

milesseventh said:
Investigating, I'm testing new features currently, but it may take some time since I'm sick, sorry.

no worries! thanks for continuing work on the extension :3 !

Thanks everyone for patience! I'm not ded, and I just submitted version 2.1.0 to Firefox AMO (which is approved already) and Chrome Web Store (which is currently not, as usual). I finally tracked down the problem causing watched page to malfunction on some subscriptions (ones containing ' character in one of their tags to be precise). Also, there is an option now to hide subscription button by toggling corresponding checkbox in popup window, and permalink leading to watched page that you can add to your bookmarks.

meowmcmeow said:
Hmmm odd. I just did a check by hitting the "watched" button but it goes to a page that seems to only have my first 40 tags. For instance, a new image tagged with glamrock_freddy_(fnaf), which is in my watched list but is my watched tag #50 or so, doesn't show up when I hit "Watched" on the extension page or on the website.

Edit: as well, the "new posts" count is permanently stuck at 75+ new images

Please let me now if it is fixed now, thanks in advance

cg2424 said:
This might be a weird question, but would there be any way to bookmark the button/list and have it update?

Done!

meowmcmeow said:
Could there be a way so that when I click the "View watched" button it opens the page in my current browser page?

Oof, I forgor about that. I implemented it while expirementing with permalink feature, but reverted the changes later. I'll fix that soon, but currently you can use permalink for opening page in incognito window

Updated

milesseventh said:

Please let me now if it is fixed now, thanks in advance

Both of the things I mentioned still appear to be issues. I'm using version 2.0.3 from the Chrome app store.

OK, it seems like both issues were fixed...? It seems like a new update was pushed through to the chrome app just yesterday.

meowmcmeow said:
It seems like a new update was pushed through to the chrome app just yesterday.

Yep, CWS finally approved it after rejection for missing privacy policy link, 2.1.0 is the latest version.
Nice to hear it is fixed for you!
About opening link in current tab: turns out the change is there, but it doesn't work without permission to manage tabs, so I would suggest using permalink when browsing in private mode.

i've run into a new issue-it seems like a lot of posts are showing up when i hit "watched" which i've blacklisted. it's not a case of bad tagging-a post will show up which has blacklisted tags, i'll click it, and then it'll show the "you have blacklisted this image, click here to disable blacklist." so my blacklist is working sitewide, but it's still showing me thumbnails for images that should be blacklisted when going through my watched tags.

So this might be a bit of a feature request that might or might not be a good idea, being able to watchlist combinations of tags.
It actually kinda piggybacks a bit off of the post from meow above, though I prefer to think what they described as a feature than a bug (letting things that are blacklisted but with watched tags fall through the cracks just in case it actually is something I'm interested in).

So the idea is that you can add combo tags to the watchlist, so for example instead of adding "canine" or "female" to the watchlist and getting absolutely everything that those tags contain, you make a watchlist combo of canine+female so you filter things to just what you want. Obviously that's a bit broad, but really the idea is so I can blacklist solo male, but still get femboys and stuff in my feed, so I could make a combo watchlist item of "male+girly" and get what I want. I mean, it already works that way kinda with the "bug" mentioned above, but things do get blacklisted and not shown while others fall through the cracks and show. It's not too consistent.

meowmcmeow said:
i've run into a new issue-it seems like a lot of posts are showing up when i hit "watched" which i've blacklisted

I didn't manage to reproduce the issue, but made minor improvements to blacklisting code. Version is 2.1.1, already available for Firefox, pending review at CWS. Sorry for the delay, also, does your blacklist by any chance have any unusual characters like commas? I just noticed, that site's blacklist allows use of combination of tags, but plugin can filter only single tags.

why

Usually, e621 does hide previews on client side, via JS code which I can't execute when loading additional pages. So in order to hide posts from blacklist, plugin manually goes through list of tags for each post and exclude them if some of those tags appear in blacklist. Checking combinations of tags would significantly sophisticate the code, and would require too much time to implement.

cg2424 said:
So the idea is that you can add combo tags to the watchlist [bypassing blacklist]

Nah, sorry, that would complicate UI, which is already kinda messed up. I would suggest using tag combinations in blacklist, it seems like a more convenient way to do what you want.

milesseventh said:
I didn't manage to reproduce the issue, but made minor improvements to blacklisting code. Version is 2.1.1, already available for Firefox, pending review at CWS. Sorry for the delay, also, does your blacklist by any chance have any unusual characters like commas? I just noticed, that site's blacklist allows use of combination of tags, but plugin can filter only single tags.

here, i can easily provide an example:
so after i click "watched tags," my images load in as such:
https://imgur.com/a/DYPfSTc
you can see here that my blacklist is listed as having 44 images in it, and that the first pic shown is tagged pussy, something i blacklist

if i then disable and re-enable my blacklist, it updates to the correct number (93), and the post is removed, see here:
https://imgur.com/a/bL43XZh
i think this is because it's refreshing the blacklist based on all the posts on the page rather than the first set of 75 which are matched.

from what i can tell this is because i have over 40 tags being watched, so your extension loads "sets of 40" in one in a time (it's why there's so many pictures in a single page, over the usual 75, as can be seen by the "93 blacklisted" total)-yet only the first set of images in my first set of watched tags gets properly blacklisted.

for reference, these are my watched tags if you want to do an exact duplicate of my method (in case the imgur links go down as well)

hypnotic visor
mind control
hypnosis
clown
diaper
infantilism
sylvester
bdsm
bound
pacifier
brainwashing
rubber
wolf o'donnell
chastity device
udders
zeraora
humiliation
mao mao: heroes of pure heart
roleplay
force feeding
oumagadoki zoo
bowser
inflatable
snagglepuss
meowth
discord (mlp)
beerus
jester
fursuit
echo project
living_plushie
torracat
financial domination
glamrock freddy (fnaf)
omorashi
latex
lock bulge
impmon
glue
tickle torture
orgasm denial
daire301
banderi
crackajackin
flookz
foxehhyz
nickwolf
puddlepup
redic-nomad
sillyme
stinkslinky
hicanyoumooforme
naughtybassard
zi ran
gamblepaws
stormdragonblue
koebi
puss in boots (dreamworks)
helixjack
soul-silver-dragon
blueballs
poofy dragon
braeburned
wen
donald duck
strawbearer
cubi
cubi (characters)
flir
submarine screw
brak
kigoh-neko
doginacafe
mawfulme
hyenaface
sicklyhypnos
stoki
gato matero
knest
oiruse
furvidd
pink panther
hexedcoin
jubei (blazblue)
owy
heartbeats
chien-pao
boot (artist)
anothermeekone
yenkoby
808 (hi-fi rush)

there's 91 lines in total, no commas, all singular tags. you can see that "808_(hi-fi rush)" was my 81st tagged, so it doesn't show up when the images first load (it takes a second), and therefore isn't blacklisted. this was on the latest version, 2.1.1, on chrome.

meowmcmeow said:
here, i can easily provide an example:

Weird, I still can't reproduce that. If you don't mind, I can try debugging it with special builds and getting debug data from your browser console. It would be more convenient if you can contact me directly, if that's ok.

Re-enabling blacklist triggers code from page, which is prohibited to invoke from extension context. Counter will change it's number in normal case too, since extension does blacklisting by itself.

I just noticed that the complex search query function does not work if any of the configured complex searches return no results.

Typically you wouldn't save a query that doesn't have any results but a BUR recently removed a tag I had configured resulting in one of the complex queries returning no results.

Page normally updates with more content after the progress bar finishes loading, if one of the complex queries is invalid, it doesn't update.

This is actually the second time I've been hit by a BUR.

The first time it was a complex search with a - tag which resulted in my watched just being https://e621.net/posts since it returned everything except the - tag since the tag I was searching for was no longer a valid tag.

While i'm here i'd also like to note that the backup/restore function does not include complex searches.

Unfortunately the addon stopped working for me today. I've went through all of my tags to see if any of them return no results.

I've deleted the ones that caused an issue but it still only updates the first few tags from my watched list.

If anyone managed to find a fix please lmk.

dotheetika said:
Unfortunately the addon stopped working for me today. I've went through all of my tags to see if any of them return no results.

I've deleted the ones that caused an issue but it still only updates the first few tags from my watched list.

If anyone managed to find a fix please lmk.

I was able to fix it for myself by editing the source code and replacing

node.getElementById("posts-container")

with

node.querySelector(".posts-container")

at line 71 of shared.js within the getPreviews function. I also replaced all other instances of getElementById with querySelector, but I don't think this was required for the fix.

swiggityswoogiter said:
I was able to fix it for myself by editing the source code and replacing

node.getElementById("posts-container")

with

node.querySelector(".posts-container")

at line 71 of shared.js within the getPreviews function. I also replaced all other instances of getElementById with querySelector, but I don't think this was required for the fix.

https://www.youtube.com/watch?v=-QXHVSxZB90

You're an absolute unit for this fix, had to download FF nightly just for this but it's worth it. Also worth mentoning that BOTH things you mentioned need to be done for the extension to start working again.

For anyone that's less IT inclined I'm attaching the entire code from the file, all you need to do is copy and paste it into the file mentioned by the person I'm replying to.

Be aware that editing the extension will make it unsigned so you'll have to enable usage of unsigned extensions in your browser.

If you have a lot of extensions, the file itself should be named "{7e0fb8e6-3552-4999-85a8-5c5f4b473d49}.xpi" (XPI files can be opened with any archiving program like 7zip or winrar)

const TAG_PER_QUERY_LIMIT = 40;
const WATCHED_URL_FLAG = "&redirect=watched";
const WATCHED_URL = "https://e621.net/#" + WATCHED_URL_FLAG;
const VERBOSE_LOGGING = false;
const DEBUG_LOGGING = false;
const MERGE_LOGGING = false;
const ERROR_LOGGING = false;
const IS_CHROME = !browser;

if (!browser) var browser = chrome;

async function loadPages(urls, pageLoadedCallback = null){
	let requests = [];
	let failed = false;
	
	let loadedPages = 0;
	for (let url of urls){
		let promise = new Promise(resolve => {
			fetch(url, {
				redirect: "error"
			})//can't use Promise.allSettled due to poor support by older browsers
				.then(response => {
					loadedPages += 1;
					resolve(response);
					if (pageLoadedCallback)
						pageLoadedCallback(loadedPages);
				}).catch(e => {
					loadedPages += 1;
					failed = true;
					resolve(null);
					if (pageLoadedCallback)
						pageLoadedCallback(loadedPages);
				});
		});
		requests.push(promise);
	}
	let responses = await Promise.all(requests);
	if (failed) return [];

	let parsed = [];
	for (let response of responses){
		if (response)
			parsed.push(response.text());
	}

	let pages = await Promise.all(parsed);

	let doms = pages.map(page => new DOMParser().parseFromString(page, "text/html"));

	return doms;
}

function censor(page){
	let blacklistRaw = Array.from(page.querySelectorAll("meta")).find(e => e.name == "blacklisted-tags");
	if (!blacklistRaw || !blacklistRaw.content) return page;
	blacklistRaw = blacklistRaw.content;
	let blacklist = JSON.parse(blacklistRaw)
	
	let previews = getPreviews(page);
	for (let preview of previews){
		let tags = preview.dataset.tags.split(" ");
		if (tags.some(t => blacklist.includes(t))){
			console.log("blacktagged " + preview.dataset.id);
			preview.style.display = "none";
		}
	}
	return page;
}

function getPreviews(node){
	let container = node.querySelector(".posts-container");
	return container.children;
}

//Generate array of search queries
function generateQueries(storedTags){
	let queries = [];

	for (let offset = 0; offset < storedTags.length; offset += TAG_PER_QUERY_LIMIT){
		let batch = storedTags.slice(offset, offset + TAG_PER_QUERY_LIMIT);
		let query = batch.map(tag => encodeURIComponent("~" + tag.split(" ").join("_"))).join("+");

		queries.push(query);
	}

	return queries;
}

function encodeSearchQuery(query){
	return encodeURIComponent(query);
}

function generateURL(page, query){
	return "https://e621.net/posts?page=" + page + (query ? "&tags=" + query : "");
}

function getPostId(preview){
	return parseInt(preview.dataset.id, 10);
}

async function save(json){
	await browser.storage.local.set(json);
}

async function load(key){
	let stored;
	if (IS_CHROME){
		stored = await new Promise(resolve => {
			chrome.storage.local.get(key, r => {resolve(r)});
		});
	} else {
		stored = await browser.storage.local.get(key);
	}
	if (stored && stored[key])
		return stored[key];
	else
		return null;
}

(If me attaching this code is an issue please either delete or edit my message)

Sorry for the delay, just published version 2.1.2 with a bugfox. Already available for Firefox, pending review on CWS Chrome version approved too.

dotheetika said:
(If me attaching this code is an issue please either delete or edit my message)

Not at all, but I'd probably suggest to hide it under the spoiler =3

swiggityswoogiter said:
I was able to fix it for myself by editing the source code and replacing

node.getElementById("posts-container")

with

node.querySelector(".posts-container")

at line 71 of shared.js within the getPreviews function. I also replaced all other instances of getElementById with querySelector, but I don't think this was required for the fix.

Thanks for fixing that before me =D
I'll publish it to github shortly, should've done that much sooner. And probably rewrite it for the third time since it's six years old.

Updated

list

Member

Another thing to add to known issues;

If a tag is aliased after you start watching it you can no longer tell from the tags on the image page which tag caused it to be included in the watch list.

Example you were subscribed to night_time but it's been aliased to night it shows night_time in search and in the extension but it shows night on the page so the extension can't recognize it to mark it as a subscribed tag.

  • 1