How do I use `window.external.Tampermonkey.openOptions`?

I am doing some research on how Greasyfork detect whether a script is installed or not. After doing some debugging and searching, I noticed that Greasyfork can access certain API via window.external.Tampermonkey, including:

  • getVersion: (<callback>) => undefined, gets Tampermonkey version info
  • isInstalled: (<script name>, <namespace>, <callback>) => undefined, check if a script is installed and its version
  • openOptions: (<param1>, <param2>) => ?, open option page (options.html)?

References:

  1. https://github.com/Tampermonkey/tampermonkey/issues/322#issuecomment-252505959
  2. https://github.com/erosman/support/issues/582#issuecomment-1658350841

The first two methods are simple enough for me to work out their usage, but I can’t find information on the usage of the third one. And the obfuscated code surely is not friendly for debugging. My test indicated that you can pass hash as the first parameter, and Tampermonkey would open that page successfully. For example:

window.external.Tampermonkey.openOptions("nav=help"); // * Tampermonkey opens the help page.
window.external.Tampermonkey.openOptions("nav=<script id>+settings"); // * Tampermonkey opens the script settings page

But I don’t know what the second parameter is. And is it possible to pass script name and namespace as parameters to open that script’s settings page?