File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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
4343This 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 .
45452 . When they are loaded, sets a specific [ context] ( #context ) , which allows you to show some tips only in some "contexts".
46463 . 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
You can’t perform that action at this time.
0 commit comments