Holla Forums commands

What features would you like in a user script that adds text commands to Holla Forums?

I made this toolbar that grabs your favorited boards and the Holla Forums options button and places them onto a console-like thing with a text input box.

I already have a feature that hides all posts with less than N replies. Because sometimes I'm too lazy to read through a long shitposting thread and just want to get the highlights.

Features I'm planning to add:

Other urls found in this thread:

catalog.neet.tv/
ghostbin.com/paste/g5nmd
gitgud.io/sun/scripts/blob/master/eitochan.js
twitter.com/NSFWRedditVideo

oh well.

New ideas:
- add index/catalog links depending on where you are
- move the quick reply button to the console bar
- "highlight [word]" temporarily highlights all posts that contain a certain keyword
- "store [post number]" stores a post into a list, which can be opened in any thread that contains stored posts. Useful for me when I want to save requests in draw threads and draw them later for example
- "board [boardname]" goes to a different board, not super useful but whatever
- "src [query]" makes a search in catalog
- put a "new thread" button where the quick reply is, when you're in index/catalog pages, and make it work like the quick reply box

I'm also trying to get existing features into the console, so they're all available from the same location instead of splattered all over everywhere in the page. Like the catalog search, it's very convenient to put it to the console so why not.

After having a quick read it sounds very useful. Is it posible to pipe/chain commands?if so would this be a valid command chain: board tech | filter "hi Holla Forums" | highlight "this belongs in the sticky" ? Or this, board v | src "$Title" | add $TitleResultPostNumber? Also how does hide work,I assume it works only at a thread level? If not could this work, board tech | src $variable | highlight $vairable | hide $variable .

Why not.

The post hiding I was thinking of will just hide the posts with CSS, but does not save it. I made a separate userscript for myself to handle advanced word filters and stuff, but it's so complicated that I think it would be pretty tricky to manage filters for that with text commands. I could definitely add a way to create simple filters with commands though.

For example it could have a third option in the filter command;
filter "niggers" = uses CSS to hide any post that contains "niggers"
filter "niggers" save = creates a new word filter for "niggers"
filter "niggers" delete = removes word filter for "niggers", if it exists

On unrelated note, I decided I'll make the video player a fixed box similar to the quick reply box, so you'll be able to drag it around and re-scale it and such. Probably also add a minimizeable text box below the video that shows the post text contents, as if it's a video description or something.

On an unrelated unrelated note, Holla Forums's js is so retarded that I've been contemplating on blocking js from Holla Forums and re-writing everything as a userscript. Would make it a lot easier to fix problems and integrate features with each other. For instance I hate that fucking retarded screenshot feature that fucks up the page and/or downloads a file when you press the print screen key, but there's no way to disable it.

I'd like to be able to search for a key phrase somewhere down in a thread from the catalog/index page. Not really sure about the technicalities of that. Just a feature I wish 8ch had.

You mean from the thread replies?

I don't think there's any practical way to do that on the frontend, you'd have to load hundreds of threads at once.

If blocking JS makes your job easier, defintly go for it.

This sound like something I would use. Would be better if it had its own vimperator-like interface, rather than just taking up some space permanently though.
Unless it already does that, iunno

I dunno what a "vimperator-like interface" means, but I could make the toolbar hidden by default and then appear when you press a key.

I was actually already thinking of a good hotkey for focusing the text input box so you won't have to click it, but I can't think of any good ones that aren't already reserved for something.

Would it be possible to have it blank and prompt the user on the first startup? Also how hard would it be to rebound latter on?

I'm not really sure what you mean.

When the userscript is run for the first time a message to the effect of "do you wish to use a key bind for this? If yes, enter it into the box below by simply clicking it,pressing the button(s) and then hit enter. If not or want to do this later, this setting can be found at $location" is displayed with a way to close it that is interpreted as not yet/later.

Ah, I thought you wanted the toolbar itself to be blank.

Such a thing would have to be stored in localStorage, which some privacy plugins treat the same way as cookies (i.e. deleting them). It could be done though, and letting the user define their own hotkey is not actually a bad idea. I could add a command like "config" to allow you to change any settings at any time.

I'll also add that kind of settings into the top of the script somewhere, so you can just switch it there without having to worry about localstorage.

==mcnigger== test

catalog.neet.tv/
This catalog has that feature for some 4chan boards

It's simple enough, you just have something like Holla Forums's search API return JSON results. Actually, it's perfect because Holla Forums's search is fucking broken and can only be specific to a board.

Or rather, it's not the search that's broken, but the underlying database schema.

That's still a shitload of stuff to load just for a word search. A board like Holla Forums has a bit over 200 threads, many of which have 100-500 replies.

make searching with /?

Got distracted with other stuff for a few days.

new commands;
- clear8chantemp, clears some temporary Holla Forums local storage such as manually filtered posts and images
- board [name], goes to another board, will remember whether you're in index/catalog
- catalog, goes to catalog on current board
- index, goes to index on current board
- reply, opens quick reply box
- filter [options], temporarily filters posts using CSS. it will execute commands in an order, words in quotes are filters, and 'clear' will remove all temporary filters. I'll add options such as searching for tripcodes etc later. For example:
filter clear "test" "nigger dicks" = clear all temp filters, then filter posts with "test" or "nigger dicks"
- highlight [options], basically identical to above except highlights posts instead of hiding them

Also, the multiple filters thing is now part of the main command processing. Your command is first separated into sections from spaces, except multiple words inside quotes which are treated as a single section. The first word determines the command, and each command deals with the rest of the sections however they want.

Started work on the video player, but nothing to show yet.

New command;
- comic [options]

It'll shrink all images, then expands and moves your window to the image that you specify in options. Options include: next, >, prev, and prev/< also have an optional third option which is a number, for example "next > 3" will navigate forward by 3 images instead of 1.

I also added an option to make sure the image fits to screen.

Made temporary storage clearing a bit more specific.

The command is now just "cleartemp", and whatever options you specify after that is what it clears. Options:
- yous, clears all your posts, so you no longer see (You) in them
- form, clears name, flags, and email from the post form
- hidden, clears all posts or images you've manually hidden
- junk, all of the above
- wipe, executes "localStorage.clear()" which clears everything from localstorage, including custom CSS and scripts

Bump

That's actually quite nice.

Thanks? I haven't worked on this for a while. I want to redo my word filters first, but I'm working on other stuff.


I can release the script as it is if you or anyone else wants.

That would be great as it already sounds very useful as is. So I assume it goes in GreseMonkey?

Well, here it is ghostbin.com/paste/g5nmd

Yes. It should also work in Holla Forums's custom script option.

-

I'll add an option later to put the console to the top where the board list normally sticks to, as opposed to the bottom. You could add CSS to do it yourself, but the comic option for instance does not take that into account yet so the console may end up overlapping the image.

Here's all the commands that currently exist:
Seen in OP; hides all posts with less than [number] replies.
Puts [query] into the search box in catalog, doesn't actually make a search though because I'm too lazy to find out how.
Temporarily hides all posts that match the options. "clear" clears all filters, and anything inside quotes will be a new filter. For example filter "test me" will filter all posts that contain test me.
Same as above, except highlights posts.
See
If you want the images to be full size and not scale to fit the screen, the option is at
console > commands > comic > fitscreen
Just set that to "false" instead of "true".
Clears [target] from local storage.
- yous = clears password and (you) from posts, you won't be able to delete posts unless you remember the password you used
- password = only clears password, but not (you)s
- form = clears name, flags, and email from the post form
- hidden = clears all manually hidden posts and images
- favboards = clears all favorited boards
- junk = yous, form, hidden
- everything = junk, favboards, and also all wordfilters
- wipe = clears everything, all Holla Forums custom settings and stuff

Goes to another board.
Goes to catalog or index page of current board.
Opens quick reply box.

Things to be added:
- hide [target], command to hide all images or text in the thread (for example if you only want to browse the images and don't care about any discussion). I might add it as some kind of option in the "filter" command if I think of a good way.
- save/list, some kind of command(s) that allow you to save posts/threads and then show a link to all of them, or show a link to all highlighted/saved posts in a thread.
- hotkey for focusing the command box, so you won't have to click it.
- some way to detect new posts in a thread, and maybe even update the applied commands appropriately (for example filter or highlight)

Bumping for something that is useful.

This looks fucking awesome, OP. Have some ideas:


clear cmd -w = Clears your "store"d posts.
clear cmd -ft = Clears your console filters.
clear cmd = Clears your stored posts and filters. Asks for confirmation? Requires sudo? :^)
clear loc -w = clears the watchlist
clear loc -fv = clears your favorite boards
clear loc -ft = clears your permanent Holla Forums filters
clear loc -c = clears your custom CSS & JS
clear loc = Clears all of the above, just like clear cmd does for the console. Also requires confirmation.
clear tmp -u = Clears (You)s
clear tmp -fm = Clears form data
clear tmp -ft = Clears hidden posts and temporary Holla Forums filters
clear tmp = Clears all of the above, requires confirmation.
clear 8ch = Same as running clear on loc and tmp.
clear all = Same as running clear on cmd, loc, and tmp.

To make it clear where new additions would go, cmd would be anything saved by the console itself, loc would be Holla Forums storage that is meant to be more permanent, and tmp is obviously shit that people might want to regularly wipe clean. Some intentionally use the same naming scheme so people have an intuitive idea of what they would do no matter which category they are in. For instance, -ft applies to filtering (whether done through Holla Forums's options dialog, the console, or by clicking the post menu to hide and filter a gore post) and -w applies to watching (either stored posts in the console or stored in Holla Forums's own watchlist).


catalog tech = Loads the Holla Forums catalog.


catalog -s bump tech = Go to the catalog of Holla Forums, sort by bump order.
vs.
catalog -s new v = Go to the catalog of Holla Forums, sort by creation date.

While catalog with no parameters just loads the current board's catalog.


type file = Show only posts with files (images, embeds, videos, file attachments, etc)
type ext [file extension] = Show only posts with a given file extension.
type img = Show only posts with images.
type vid = Show only posts with videos.
type embed = Show only posts with embeds. (like youtube)
type dl = Show only posts with one of the download-only file attachments. (pdf, zip, swf, etc.)
type txt = Show only posts with no file whatsoever, no embeds, no anything. Text only.
with an optional parameter -ae to allow embeds on any of the other types.

Say you are in a video sharing thread, and there's too many shitposts, so you want to see all the videos and embeds, you would type something like:

type -ae vid

It's up to you how you want your commands to look, but that sort of functionality would be nice.


css yotsuba = Sets the current board to Yotsuba.
css -a yotsuba = Sets all boards to Yotsuba.
css -b tech cyber = Sets the Holla Forums board to Cyberpunk.
css default = Sets the current board to use the css set by the board owner.
css -a default = Sets all boards to use the css set by their respective board owners.

That's all I got. Once again, looks awesome, thanks for doing this OP.

Wow, OP, an original and useful idea that's actually implemented and released. Kudos and thanks.

When you have time, consider sticking it on github/gitlab/gogs for distribution and contribution.

I'm not a fan of forcing anyone to remember all these 1-3 letter long code names, so I don't know about that. Especially since you're deleting settings, it would be frustrating to accidentally delete all of your word filters or something because you misremembered what the character was or made a typo.

Can't believe I didn't think of that. I'll definitely deprecate the "board" command in favor of this.

I'll see if I can do that, it can be difficult to interact with some of Holla Forums's default functions.

The point of the planned "hide" command was similar, but I didn't think of filtering replies file/post type like that. I might do your idea instead.

Good idea, I'll probably add this too.


Thanks, I can put it to gitgud when I update it next time.

Bump?

I read Holla Forums with JS disabled, so I would love a userscript that worked without the frontend JS.

This is pretty cool lad, keep working on it.

Bumpth

Well gee, I updated it just for you.
On hindsight maybe I shouldn't share my projects when they're unfinished because I never work on any one of them consistently.

changes:
- "reply" command now opens the new thread box if you're in catalog, and moves window to new thread box if you're in index
- "board" command removed, use "index" or "catalog" instead. For example "index tech" will go to Holla Forums's index page.
- new command: "f5", refreshes posts in threads or in catalog (uses the auto-update thingy)
- new command: "sortby", sorts the threads in catalog. Use numbers 0-3 or "bump", "date", "reply", "random"
- new command: "imagesize", changes catalog image size. Use numbers 0-3 or "vsmall", "small", "medium", "large"
- new command: "css", changes the CSS in the small box in your theme options. For example "css yotsuba" will set it to the tomorrow theme. "custom" or no argument = board specific.
- added an option to put the console at the top. It's at the very top of the script, change "consoleontop" to true.
- added an option that adds line numbers to code blocks. Set "addlinenumberstocode" to false if you don't want it.

gitgud.io/sun/scripts/blob/master/eitochan.js


That would be a whole new level of an endeavor so it's probably not going to happen in a long time/ever. I mean, who knows, but don't look forward to it.

Neat.