autoRefreshList: improve filter detection & remove first call

Before, we constructed the filter via an approximate method, which
wouldn't always get the correct filter that the Community Console was
using. Now that we're intercepting the first call to ViewForum, this
change gets the filter directly from the request (and also the forumId
value, which we always set as '0' before).

Also, we used to perform a first call to get the timestamp of the first
thread being shown. Now, we intercept the ViewForum response to get this
timestamp instead of performing a separate call to the API.

Note that sometimes when the thread list is shown the CC doesn't call
the API, but insteads gets the threads from a previous call. The only
case I've detected is when a user navigates back to a thread list, and
in this case the feature uses the previously saved data from the last
interception, which works fine. Also, if a thread list is loaded and we
navigate forward to another thread list, we can't go back to the
previous thread list (there isn't a button in the UI and the browser
button goes to the page opened before the Community Console), so the
feature doesn't break this way.

However, if there are other cases in which the Community Console doesn't
call the API neither, these might break the feature. Anyways, this
change is definitely an improvement over the old method.

Fixed: twpowertools:22
Change-Id: I66ff3b78e2089dc1decd35e6a89b208446409b86
1 file changed
tree: dc99b2d4e7f542b14c0ed7b6512e9519d5dc14ae
  1. .github/
  2. docs/
  3. playbooks/
  4. roles/
  5. src/
  6. templates/
  7. tools/
  8. .clang-format
  9. .editorconfig
  10. .gitignore
  11. .gitreview
  12. .zuul.yaml
  14. Makefile
  15. OWNERS
  16. package-lock.json
  17. package.json
  19. tagRelease.bash
  20. webpack.config.js

TW Power Tools

Available in the Chrome Web Store

An extension which brings several enhancements to the Google Forums and the Community Console.

For a list of features/enhancements, check out the feature list doc.

Information for contributors

This extension is being actively developed, and everyone is welcome to make feature requests, report issues and contribute code changes.

In order to make feature requests or report issues, please do so at the Monorail Issue Tracker:

To see a more exhaustive guide on how to contribute, and information on how to contribute code changes, please read the following doc:

Beta channel

Before releasing updates to the stable channel, the newest versions are uploaded to the beta channel so they can be tested by everyone who's interested. This is another way to contribute to the project, because beta testing can make us notice bugs before they reach the stable channel.

The beta channel for Chrome is available here.