( function ( mw, $ ) {
- var supportsPlaceholder = 'placeholder' in document.createElement( 'input' );
-
- // Break out of framesets
- if ( mw.config.get( 'wgBreakFrames' ) ) {
- // Note: In IE < 9 strict comparison to window is non-standard (the standard didn't exist yet)
- // it works only comparing to window.self or window.window (http://stackoverflow.com/q/4850978/319266)
- if ( window.top !== window.self ) {
- // Un-trap us from framesets
- window.top.location.href = location.href;
- }
- }
-
mw.hook( 'wikipage.content' ).add( function ( $content ) {
var $sortable, $collapsible;
- // Run jquery.placeholder polyfill if placeholder is not supported
- if ( !supportsPlaceholder ) {
- $content.find( 'input[placeholder]' ).placeholder();
- }
-
$collapsible = $content.find( '.mw-collapsible' );
if ( $collapsible.length ) {
// Preloaded by Skin::getDefaultModules()
$( function () {
var $nodes;
- if ( !supportsPlaceholder ) {
- // Exclude content to avoid hitting it twice for the (first) wikipage content
- $( 'input[placeholder]' ).not( '#mw-content-text input' ).placeholder();
- }
-
// Add accesskey hints to the tooltips
$( '[accesskey]' ).updateTooltipAccessKeys();
*/
mw.hook( 'wikipage.categories' ).fire( $nodes );
}
+
+ $( '#t-print a' ).click( function ( e ) {
+ window.print();
+ e.preventDefault();
+ } );
} );
}( mediaWiki, jQuery ) );