Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functionality #2

Open
ProximaNova opened this issue Feb 25, 2016 · 6 comments
Open

Functionality #2

ProximaNova opened this issue Feb 25, 2016 · 6 comments

Comments

@ProximaNova
Copy link

  • Doesn't work on Firefox
  • Sort of works on Chrome, for example, the pagination fix didn't work

If it does work then it's great! However, I see a few problems with it. Also check out my updated work on improving the &id= parts on Firefox! My work has overlapped with yours in a few regards; for example, I too edited the "Statistics" section; my edits of that area are better though.

Also, the tag index at account options is small but useful :)

@Seedmanc
Copy link
Owner

Works in Chrome properly for me.

Doesn't work in FF, thanks for reporting.
Fixing it will be a bitch, I still have no idea how to debug userscripts there. Do you know, maybe? They're invisible both in the browser panel and in the Firebug. I wonder how did Greasemonkey become de-facto standard of userscripting when it is so inconvenient to use. I must be missing something here, because having to put console output and alert()s into every line of your code doesn't feel like happy debugging to me. I swear, making an addon was so much easier.

The tag index isn't small, its size depends on the amount of posts and pages visited by you on your booru, because that's how it collects and stores tag data.

Regarding your functionality and to avoid making a separate issue, I recommend you implementing keyboard controls in your script. You know, when you want to work really fast and streamlined, keyboard is the way, not mouse. Assign hotkeys to going back/forward a post as well as switching between important input fields. Maybe like on http://booru.org/login . Make submit button larger, perhaps fields too, aiming mouse takes time. On a subjective note, I would have renamed your userscript to something other than "Mass editor" because it is in no way a batch editor. Something like "Quick editor" or stuff like that, but that's me.

@Seedmanc
Copy link
Owner

I think I fixed the Chrome and Firefox issue, for some reason it failed to use part of the prototype.jp library embedded in booru pages. Had to @require it manually. How does FF manage to misrecognize part of a library and not all of it is beyond me.

@ProximaNova
Copy link
Author

One can't really debug with Firefox, rarely Firefox will have a pop-up saying something like "there is a problem with this script: end script, dubug, cancel" then after clicking "dubug" it will give information. Also using inspect element you can read the errors. Maybe use some JavaScript verification page online. Usually the problem is that it either works or it doesn't, sometime it half works, and it is hard to get info on the problem. Thus, I make changes a little at a time.

And yeah hotkeys are a good idea, such as using left and right arrows to navigate the pages.

@ProximaNova
Copy link
Author

Correction on what I said before: the pagination fix does work on Google Chrome at http://*.booru.org/index.php?page=post&s=list&tags=all (although it does look a tiny bit strange with the spacing, but that is non-issue).

I am testing it on Google Chrome and Firefox and it all seems to be working well so far except some things

Google Chrome:

  • When adding tags from add tag input text it sometimes displays 0 then after submission 1, then after refresh the actual quantity

@Seedmanc
Copy link
Owner

Yeah, it sometimes fails to load the tag database, which is also why the autocompletion sometimes doesn't work. I dunno what's causing this, maybe something about the time at which scripts loads (document-body/idle/etc).

Another thing to note, since the state of localStorage is captured once the page load, if you open several tabs and start editing tags in all of them, it will show old results until refresh, since it can't know about changes done in other tabs.

About the tag index seen on the account page, it will show some tags even if there are currently no images of this tag on the booru, again because it's a client-side replica of the server. However if you navigate to the tag page, it will see that there are no images and remove the tag from cache.

@Seedmanc
Copy link
Owner

Seedmanc commented Aug 2, 2016

I added the function to batch-remove the tagme tag from all posts that have it (can be found under Account options). It's quite slow though because Booru limits the rate at which you can make editing requests and if you make them too fast they'll just fail so I had to slow it down without guarantees.

Also made better formatting of tags shown on list and post pages, does not replace _ in tags with spaces anymore, instead show them as they're stored in the database. This is because booru failed to properly show tags with multiple _ in a row or tags consisting entirely of _.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants