canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,698
edits
Line 44: | Line 44: | ||
See {{bug|592431}} for historical context on this service. | See {{bug|592431}} for historical context on this service. | ||
=== | === Testing Snippets with Local or Stage Service === | ||
For testing against staging (ie. https://snippets.stage.mozilla.com) or a private | For testing against staging (ie. https://snippets.stage.mozilla.com) or a private | ||
development instance of the server (ie. http://localhost:8000), you | development instance of the server (ie. http://localhost:8000), you'll need to tell Firefox to use these sources instead of the regular snippet service. There are two ways to accomplish this: manually and using the snippets switcher plugin. | ||
==== Manually Updating Snippet Source ==== | |||
# Navigate to about:config | |||
# Search for '''browser.aboutHomeSnippets.updateUrl''' | |||
# Change the value accordingly. For the stage server, add '''stage''' to the url so it starts https://snippets.stage.mozilla.com/. | |||
# If you only want to retrieve a specific snippet, replace %NAME% with the appropriate value. | |||
# Navigate to about:home. | |||
# Open the Web Developer > Web Console (ctrl+shift+k). | |||
# Enter localStorage['snippets-last-update'] = 0 | |||
# Refresh about:home. You should now see the new snippet. | |||
==== Snippets Switcher Plugin ==== | |||
The snippets switcher plugin code is available here: | |||
* https://github.com/mozilla/home-snippets-switcher | * https://github.com/mozilla/home-snippets-switcher | ||
The xpi file is available here: | |||
* https://github.com/downloads/mozilla/home-snippets-switcher/home-snippets-switcher-0.4.1.xpi | |||
The plugin works by modifying the aboutHomeSnippets.updateUrl preference and updating localstorage variables accordingly. (See {{bug|603674}} for more info). | |||
=== Getting access to the production snippet service === | === Getting access to the production snippet service === |