[Userscript]: "Chat Posts" Search Results - Direct Link

"Chat Posts" Search Results - Direct Link

https://greasyfork.org/en/scripts/13744-wanikani-post-search-direct-link

On the forums, "Chat Posts" searches only link to the thread a post is in, rather than to the specific post.
This script enables you to navigate directly to the individual post.

Instructions:
1) Do a "Chat Posts" search
2) Click on "(get link)" next to the search result that you want to navigate to.
3) The "(get link)" will briefly change to "(one moment...)" while it finds the desired post.
4) The "(one moment...)" will change to "(click to go)" when the post is found.
5) Click "(click to go)" to navigate to the post.

I used a two-step process (get link, then click link) to allow you to 'open link in new tab' if you want.
I'm not aware of a way to do it in one step, due to browser security limitations.

Change History:
v1.0.2 - Implemented binary search to reduce server load.
v1.0.1 - Enabled the script on additional pages containing search bar.
v1.0.0 - Initial release.

.

That was a pretty impressive turnaround, rfindley, I only saw this requested a short while ago.

Great script as always :slight_smile:

I didn’t want to do this the “wrong way”, when WK could avoid all of this load on their servers by providing a direct link themselves. But that’s because I’m not a coding machine like you :stuck_out_tongue:

Binary search should also be quick and easy, by the way :slight_smile:

<3<3<3<3<3<3<3

Tested it out, works pretty well ^^

I frequently search from the wanikani main dashboard page so at first the get link wouldn’t show there. So I edited the code a bit to include it for me ;D Thanks for your work!

sirvorn said... Tested it out, works pretty well ^^

I frequently search from the wanikani main dashboard page so at first the get link wouldn't show there. So I edited the code a bit to include it for me ;D Thanks for your work!
I don't know how I missed that, hehe.   Fixed :-)
rfindley said...
sirvorn said... Tested it out, works pretty well ^^

I frequently search from the wanikani main dashboard page so at first the get link wouldn't show there. So I edited the code a bit to include it for me ;D Thanks for your work!
I don't know how I missed that, hehe.   Fixed :-)
 I was half wondering if it was intentional for some reason :P Thanks for updating it though! 

You’re the best!



v1.0.2 - Implemented binary search to reduce server load.

PLEASE UPGRADE :slight_smile:

rfindley said... v1.0.2 - Implemented binary search to reduce server load.

PLEASE UPGRADE :-)
 Oh awesome!! Upgraded, tried it on the same post I'd tested earlier to see how long it'd take, working great :)) So much faster, thanks again.

YAY! Thank you!

 This will be helpful. Going to install. :smiley:
I didn’t like how I could find the posts, but then not actually go to them.

OMG THIS IS AWESOME!



(I wonder if the code could be reused to create a panel which shows links to recent posts one was “mentioned” in…)