Growth/Communities/How to use code snippets/pl
The Growth team develops a set of features in order to help newcomers making better first edits at the wikis.
During the development process, we have to make some tests to be sure that the features are working properly. This also allows communities to test the features in advance, to see how they work, how they can be integrated to their workflows or if the translations are correct.
The concerned features are deployed at some wikis in "dark mode". It means that the features aren't available for users in their regular editing experience. Instead, they are only available to users who have a "key", a small bit of code we call a "code snippet". This page explains how to use a code snippet.
General path
Step 1: Be sure that the Growth features are turned on at your wiki
To turn the features on, you have to go to your preferences.
Step 2: In your browser, create a new bookmark
- Give this bookmark a name.
- Copy-paste the snippet you want to use (see the snippets table).
- At the beginning of the snippet, add
javascript:
- Example:
ge.utils.setUserVariant('imagerecommendation')
will becomejavascript:ge.utils.setUserVariant('imagerecommendation')
.
- Example:
- Save this bookmark.
Step 3: Go the Special:Homepage
You can access the homepage by either:
- typing
Special:Homepage
in your wiki's search bar - going to your userpage and click on the "Strona domowa" tab
Step 4: Click on the bookmark
The page reloads, you now have access to the feature.
Alternative path
This path works on desktop computers only, not on mobile devices.
Step 1: Be sure that the Growth features are turned on at your wiki
To turn the features on, you have to go to your preferences.
Step 2: Go the Special:Homepage
You can access the homepage by either:
- typing
Special:Homepage
in your wiki's search bar - going to your userpage and click on the "Strona domowa" tab
Step 3: Open the inspector
Do a right click on the page, and click on "Inspect".
Step 4: On the inspector, locate the "Console" menu
Click on the console menu.
Some browsers will ask you a confirmation step there. Please carefully read the instructions.
You may see some error messages being displayed. You can ignore them.
Step 5: In the console, paste the snippet you want to use
The snippets are available in the snippets table.
Step 6: Press enter
The page reloads, you now have access to the feature.
Currently available snippets
Last update:
Name of the feature | Wikis where this feature is available | Snippet to turn the feature on | How do I know if I have activated the feature? | Snippet to turn the feature off |
---|---|---|---|---|
Add an image | Wikipedia w języku arabskim, Wikipedia w języku bengalskim, Wikipedia w języku czeskim, Wikipedia w języku hiszpańskim, Wikipedia w języku perskim, Wikipedia w języku francuskim, Wikipedia w języku portugalskim, Wikipedia w języku tureckim | ge.utils.setUserVariant('imagerecommendation')
|
In the "Sugerowane edycje" section, you will see a new task "Dodaj ilustrację do artykułu bez zdjęć". This task has a small robot icon close to the task name. |