How many forum posts are loaded at once?

I’m working on a script that uses replies on posts, but I don’t know how many WK loads when you load a page, does anyone have information in this?

For example, if I was to open a topic with 2000 posts and I’m brought to around post #1600, how many would be loaded in each direction/overall?

1 Like

IIRC it’s something like 20? You can just try it yourself, though. Go to the middle of a thread and refresh the page, then check the network tab for the request, or just count the elements in the DOM. it’s different if you’re at the start or the end of a thread, however, or if the thread is just short.

You probably shouldn’t need an exact number anyway. What do you want to do with the posts?

3 Likes

Oh okay, yeah that sounds about right :thinking:

I’m trying to change all the text in all the posts for an April fools thing (yes it’s early, I had the idea and wanted to make it before I forgot), but I’m trying to figure out whether it’s worth checking for newly loaded posts or whether just the initially loaded posts would be fine, since it’s a joke script after all.

2 Likes

Looking forward to seeing what you’re planning! Dealing with ajax is kind of tricky, but the effect is definitely better. I have a couple of scripts that modify all posts that you could look at. All of them are on the simpler rather than performant side, but they work well enough

3 Likes

Thanks! I’ll look into it since I think I’ll probably need to end up using it anyway.

1 Like

Checked the json that’s given by the site, and it is indeed 20!

2 Likes

What’s the emoji for setting a calendar alert with high expectations?