Activate or deactivate Snaglist for everyone
How-to
You decide where Snaglist runs: everywhere, only in test builds, or nowhere for now. Deactivating it keeps it installed, ready to activate again.
Steps
- Find the
Snaglist.start()call, or the<script>tag withdata-github. - To deactivate it, set
enabled: false:
Snaglist.start({ enabled: false, send: { github: { repo: "owner/repo" } } });
- To run it only in some builds, set
enabledfrom your build's settings or a feature flag:
Snaglist.start({ enabled: window.location.hostname.startsWith("staging."), send: { github: { repo: "owner/repo" } } });
- Publish the change and check the button has gone, or appears only where you meant.
Things to note
- With the script tag only, remove the
data-github,data-emailanddata-endpointattributes to stop it starting. - To deactivate it on a running page, for example from your own admin menu, call
Snaglist.destroy(). - Your users can also deactivate it for themselves: read Add a switch for your users.