MediaWiki:Site/News-code.js

 

   ,  

Замечание. Возможно, после сохранения вам придётся очистить кэш своего браузера, чтобы увидеть изменения.

/*--[import styles]--*/
$( '#textcontent' ).append( '<link rel="stylesheet" href="https://ru.warface.com/wiki/index.php?title=MediaWiki:Site/News-code.css&ctype=text%2Fcss&action=raw&10">' );
/*--[/import styles]--*/

/*--[video]--*/
var video = {
  constructor: function() {
    $( '.video-include' ).each( function() {
      $( this )
        .after(
          '<div class="video">'
        + '<div class="video__inner">'
        + '<iframe src="' + $( this ).text() + '" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture;" frameborder="0" allowfullscreen></iframe>'
        + '</div>'
        + '</div>'
        )
        if ( $( this ).hasClass ( 'full-width' ) ) {
          $( this ).next().addClass ( 'video-full-width');
        }
        if ( $( this ).hasClass ( 'small' ) ) {
          $( this ).next().addClass ( 'video-small')
        }
        $( this ).remove();
    } );
  }
};
$( video.constructor );
/*--[/video]--*/
 
Профиль