ProfessionalWiki /
ModernTimeline
| 1 | ( function ( mw ) { |
||
| 2 | |||
| 3 | modernTimelineLog( 'Timeline script' ); |
||
| 4 | |||
| 5 | function modernTimelineLog( message ) { |
||
| 6 | if( mw.config.get( 'debug' ) ) { |
||
| 7 | console.log( message ); |
||
|
0 ignored issues
–
show
Debugging Code
introduced
by
Loading history...
|
|||
| 8 | } |
||
| 9 | } |
||
| 10 | |||
| 11 | mw.loader.using( [ 'ext.modern.timeline' ] ).done( function () { |
||
| 12 | modernTimelineLog( 'Loaded timeline JS' ); |
||
| 13 | |||
| 14 | for( var timelineId in window.modernTimeline ) { |
||
| 15 | if( window.modernTimeline.hasOwnProperty( timelineId ) ) { |
||
| 16 | modernTimelineLog( 'Initializing timeline "' + timelineId + '"' ); |
||
| 17 | |||
| 18 | var timelineJson = window.modernTimeline[timelineId]; |
||
| 19 | new TL.Timeline( timelineId, timelineJson, timelineJson.options ); |
||
|
0 ignored issues
–
show
The variable
TL seems to be never declared. If this is a global, consider adding a /** global: TL */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. Loading history...
|
|||
| 20 | |||
| 21 | modernTimelineLog( 'Done initializing timeline "' + timelineId + '"' ); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | } ); |
||
| 25 | |||
| 26 | }( mediaWiki ) ); |
||
|
0 ignored issues
–
show
The variable
mediaWiki seems to be never declared. If this is a global, consider adding a /** global: mediaWiki */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. Loading history...
|