r73501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73500‎ | r73501 | r73502 >
Date:00:18, 22 September 2010
Author:dale
Status:deferred
Tags:
Comment:
optimized mwEmbedFrame to get player javascript in single request
Modified paths:
  • /branches/MwEmbedStandAlone/mwEmbedFrame.php (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/mwEmbedFrame.php
@@ -66,6 +66,11 @@
6767 if( isset($_GET['apiTitleKey'])){
6868 $this->apiTitleKey = htmlspecialchars( $_GET['apiTitleKey'] );
6969 }
 70+
 71+ if( isset($_GET['apiProvider'])){
 72+ $this->apiProvider = htmlspecialchars( $_GET['apiProvider'] );
 73+ }
 74+
7075 if( isset( $_GET['poster'] ) ){
7176 $this->poster = htmlspecialchars( $_GET['poster'] );
7277 }
@@ -98,6 +103,9 @@
99104 if( $this->apiTitleKey ){
100105 $o.= 'apiTitleKey="' . htmlspecialchars( $this->apiTitleKey ) . '" ';
101106 }
 107+ if( $this->apiProvider ){
 108+ $o.= 'apiProvider="' . htmlspecialchars( $this->apiProvider ) . '" ';
 109+ }
102110 if( $this->poster ){
103111 $o.= 'poster="' . htmlspecialchars( $this->poster ) . '" ';
104112 }
@@ -139,8 +147,8 @@
140148 margin-right: 0px;
141149 margin-bottom: 0px;
142150 }
143 - </style>
144 - <script type="text/javascript" src="ResourceLoader.php?class=window.jQuery,mwEmbed"></script>
 151+ </style>
 152+ <script type="text/javascript" src="ResourceLoader.php?class=window.jQuery,mwEmbed,mw.style.mwCommon,$j.fn.menu,mw.style.jquerymenu,mw.EmbedPlayer,mw.EmbedPlayerNative,mw.EmbedPlayerJava,mw.PlayerControlBuilder,$j.fn.hoverIntent,mw.style.EmbedPlayer,$j.cookie,$j.ui,mw.style.ui_redmond,$j.widget,$j.ui.mouse,mw.PlayerSkinKskin,mw.style.PlayerSkinKskin,mw.TimedText,mw.style.TimedText,$j.ui.slider"></script>
145153 <script type="text/javascript">
146154 //Set some iframe embed config:
147155
@@ -149,6 +157,7 @@
150158
151159 // We can't support full screen in object context since it requires outter page DOM control
152160 mw.setConfig( 'EmbedPlayer.EnableFullscreen', false );
 161+
153162 </script>
154163 </head>
155164 <body>

Status & tagging log