Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
m (Bug fix) |
m (Added checks for different types of listings) |
||
Line 8: | Line 8: | ||
if ( $("#events-listing").length ) | if ( $("#events-listing").length ) | ||
− | + | tm_load_events( "events-listing", "all", "normal" ); | |
+ | |||
+ | if ( $("#events-today-listing").length ) | ||
+ | tm_load_events( "events-today-listing", "today", "today" ); | ||
} | } | ||
}()); | }()); |
Latest revision as of 02:47, 12 April 2022
/* Any JavaScript here will be loaded for all users on every page load. */ /* Reference: https://www.mediawiki.org/wiki/Adding_JavaScript_to_Wiki_Pages */ $(function() { // If meetup events module loaded, then load event data onto certain pages if ( $.type( tm_load_todays_events ) === "function" ) { if ( $("#events-listing").length ) tm_load_events( "events-listing", "all", "normal" ); if ( $("#events-today-listing").length ) tm_load_events( "events-today-listing", "today", "today" ); } }());