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
;
16 * Fired when wiki content is being added to the DOM
18 * It is encouraged to fire it before the main DOM is changed (when $content
19 * is still detached). However, this order is not defined either way, so you
20 * should only rely on $content itself.
22 * This includes the ready event on a page load (including post-edit loads)
23 * and when content has been previewed with LivePreview.
25 * @event wikipage_content
27 * @param {jQuery} $content The most appropriate element containing the content,
28 * such as #mw-content-text (regular content root) or #wikiPreview (live preview
31 mw
.hook( 'wikipage.content' ).fire( $( '#mw-content-text' ) );
33 $diff
= $( 'table.diff[data-mw="interface"]' );
36 * Fired when the diff is added to a page containing a diff
38 * Similar to the {@link mw.hook#event-wikipage_content wikipage.content hook}
39 * $diff may still be detached when the hook is fired.
41 * @event wikipage_diff
43 * @param {jQuery} $diff The root element of the MediaWiki diff (`table.diff`).
45 mw
.hook( 'wikipage.diff' ).fire( $diff
.eq( 0 ) );
49 }( mediaWiki
, jQuery
) );