X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fpage%2Fready.js;h=e1476641e2eee4da9d738f1801eb92e7fccef48b;hb=85ac1b5d7c7ca50a93f2d16639cdde2f46bc133e;hp=d5a667e41a12b8e03cd578c5092271e24e876666;hpb=94ad2bf3801eba8767363e22c16212fa084f9a2d;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/page/ready.js b/resources/src/mediawiki/page/ready.js index d5a667e41a..e1476641e2 100644 --- a/resources/src/mediawiki/page/ready.js +++ b/resources/src/mediawiki/page/ready.js @@ -1,14 +1,4 @@ ( function ( mw, $ ) { - // 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; @@ -58,6 +48,11 @@ */ mw.hook( 'wikipage.categories' ).fire( $nodes ); } + + $( '#t-print a' ).click( function ( e ) { + window.print(); + e.preventDefault(); + } ); } ); }( mediaWiki, jQuery ) );