2nd-player has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/297238

Change subject: Support height/width parameters for Nicovideo
......................................................................

Support height/width parameters for Nicovideo

Change-Id: I36ba9ad763c1d079c98c29d52485a7b4ee50e233
---
M YouTube.class.php
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/YouTube 
refs/changes/38/297238/1

diff --git a/YouTube.class.php b/YouTube.class.php
index 1e89a7c..e1956b1 100644
--- a/YouTube.class.php
+++ b/YouTube.class.php
@@ -443,6 +443,15 @@
 
                if ( !empty( $nvid ) ) {
                        $url = "http://ext.nicovideo.jp/thumb_watch/{$nvid}";;
+                       if ( !empty( $argv['width'] ) ) {
+                               $url .= "?w=${argv['width']}";
+                               if ( !empty( $argv['height'] ) ) {
+                                       $url .= "&h=${argv['height']}";
+                               }
+                       } elseif ( !empty( $argv['height'] ) ) {
+                               $url .= "?h=${argv['height']}";
+                       }
+
                        return "<script type=\"text/javascript\" 
src=\"{$url}\"></script>";
                }
        }
@@ -497,4 +506,4 @@
                }
        }
 
-}
\ No newline at end of file
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/297238
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36ba9ad763c1d079c98c29d52485a7b4ee50e233
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/YouTube
Gerrit-Branch: master
Gerrit-Owner: 2nd-player <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to