2 // Break out of framesets
3 if ( mw
.config
.get( 'wgBreakFrames' ) ) {
4 // Note: In IE < 9 strict comparison to window is non-standard (the standard didn't exist yet)
5 // it works only comparing to window.self or window.window (http://stackoverflow.com/q/4850978/319266)
6 if ( window
.top
!== window
.self
) {
7 // Un-trap us from framesets
8 window
.top
.location
.href
= location
.href
;
12 mw
.hook( 'wikipage.content' ).add( function ( $content
) {
13 var $sortable
, $collapsible
;
15 $collapsible
= $content
.find( '.mw-collapsible' );
16 if ( $collapsible
.length
) {
17 // Preloaded by Skin::getDefaultModules()
18 mw
.loader
.using( 'jquery.makeCollapsible', function () {
19 $collapsible
.makeCollapsible();
23 $sortable
= $content
.find( 'table.sortable' );
24 if ( $sortable
.length
) {
25 // Preloaded by Skin::getDefaultModules()
26 mw
.loader
.using( 'jquery.tablesorter', function () {
27 $sortable
.tablesorter();
31 // Run jquery.checkboxShiftClick
32 $content
.find( 'input[type="checkbox"]:not(.noshiftselect)' ).checkboxShiftClick();
35 // Things outside the wikipage content
39 // Add accesskey hints to the tooltips
40 $( '[accesskey]' ).updateTooltipAccessKeys();
42 $nodes
= $( '.catlinks[data-mw="interface"]' );
43 if ( $nodes
.length
) {
45 * Fired when categories are being added to the DOM
47 * It is encouraged to fire it before the main DOM is changed (when $content
48 * is still detached). However, this order is not defined either way, so you
49 * should only rely on $content itself.
51 * This includes the ready event on a page load (including post-edit loads)
52 * and when content has been previewed with LivePreview.
54 * @event wikipage_categories
56 * @param {jQuery} $content The most appropriate element containing the content,
59 mw
.hook( 'wikipage.categories' ).fire( $nodes
);
62 $( '#t-print a' ).click( function ( e
) {
68 }( mediaWiki
, jQuery
) );