Reset to default
Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
You have to add the “storage” permission in your manifest.json file, i.e.:
... "permissions": [ "storage" ], ...
For more information, see: https://developer.chrome.com/extensions/storage
If someone was facing this issue on Firefox, please note, that it is not supported yet:
For my purposes it was sufficient to replace
Regarding the Firefox implementation state it might be worth to look also here from time to time:
RESTART THE DEV SERVER
Despite adding the permission and reloading the extension, I sync was still undefined.
Turned out I needed to restart the dev server for the new manifest to picked up.
Which makes sense since this file was not being watched.
However, content scripts have some limitations. They cannot:
Use chrome. APIs (except for parts of chrome.extension)*