Skip to content

Commit dd63da1

Browse files
committed
Adjust doc
1 parent 4468f27 commit dd63da1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ A full example of how to use it, is the following:
3434
// fetch tips from somewhere..
3535

3636
// init RandomTips
37-
RandomTips.init(tips).then(() => {
37+
RandomTips.init("/common/modules/data/Tips.js").then(() => {
3838
RandomTips.setContext("options");
3939
RandomTips.showRandomTipIfWanted();
4040
});
4141
```
4242

4343
This does the following steps:
44-
1. Initializes the module with the list of all tips (the [tip data](#specifying-tips)).
44+
1. Initializes the module with the path to list of all tips (the [tip data](#specifying-tips)). They are loaded automatically.
4545
2. When they are loaded, sets a specific [context](#context), which allows you to show some tips only in some "contexts".
4646
3. Shows a tip with a chance of 20%, so on average only in 1 of 5 triggers of this function, a tip is shown.
4747

0 commit comments

Comments
 (0)