![]() |
|
[Userscript] HF Client-Sided Tabs - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Computing (https://hackforums.net/forumdisplay.php?fid=88) +---- Forum: Computing Lounge (https://hackforums.net/forumdisplay.php?fid=8) +---- Thread: [Userscript] HF Client-Sided Tabs (/showthread.php?tid=5750843) |
HF Client-Sided Tabs - Cecilia - Nov 10, 2017 NB: If there's an issue with this script (too much network usage/requests to HF) then it would be appreciated if you PM'd me first to try resolve it. Features
Screenshot ![]() Change Log Code v0.1a:Download
RE: HF Client-Sided Tabs - Autophobia - Nov 10, 2017 Posting to save this. Out of state getting this setup when I'm back RE: HF Client-Sided Tabs - Cecilia - Nov 10, 2017 (Nov 10, 2017 10:42 PM)xadamxk Wrote: If you used the API (rather than background requests), I don't think Omni would have a problem with it. I didn't realise the api had a place for getting the content without an api key. If it still requires an api key, then I'm not really wanting to do that stuff as it would require everyone to use a different api key. As you can see, he didn't have an issue with requests being made (from the thread I posted). Apparently a lot of extensions have done it before. RE: HF Client-Sided Tabs - Cecilia - Nov 10, 2017 (Nov 10, 2017 11:14 PM)xadamxk Wrote: In the past, Omni always has problems with extensions that make multiple requests per page. Do you think the api will ever be extended to regular members? I thought it was only uber and above, which means people will not be able to use the userscript. Besides that, just had a look at the api documentation a bit closer, there doesn't seem to be an efficient way of getting last post (aside from querying the thread id returned, then grabbing the last post in the returned results). That'd mean that you would have to: - Request to categories (once and store in cache or something), For each category: - Request category information to get forums inside. For each forum inside that category + child forums inside the forums: - Request to the forum to get the threads, find the thread that has the same lastpost value as the forum did, - Format it all into a nice little html output tl;dr: top level categories -> inner categories -> inner forums + child forums of the inner forums So really, the amount of api requests needed is probably of similar query count + bandwidth used (unsure, not tested, but let me know if you want). Kind of seems a bit of a mess if I got it right... The amount of requests is minimal using the userscript. I have purposefully designed it that way (I know omni will not like 100 requests per page load). I think 1 request per page load (can be turned off too) isn't too much, but that's me. |