PHPCS
This commit is contained in:
parent
187d382e2a
commit
bcec8f13cb
1 changed files with 30 additions and 10 deletions
36
api.php
36
api.php
|
@ -27,16 +27,30 @@ if (isset($_GET["url"])) {
|
||||||
include 'head.php';
|
include 'head.php';
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<div itemscope itemtype="http://schema.org/VideoObject" class="wrapper">
|
<div itemscope
|
||||||
|
itemtype="http://schema.org/VideoObject" class="wrapper">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<?php
|
<?php
|
||||||
include 'logo.php';
|
include 'logo.php';
|
||||||
?>
|
?>
|
||||||
<p>You are going to download<i itemprop="name">
|
<p>You are going to download<i itemprop="name">
|
||||||
<a itemprop="url" id="video_link" data-ext="<?php echo $video->ext; ?>" data-video="<?php echo $video->url; ?>" href="<?php echo $video->webpage_url; ?>">
|
<a itemprop="url" id="video_link"
|
||||||
|
data-ext="<?php echo $video->ext; ?>"
|
||||||
|
data-video="<?php echo $video->url; ?>"
|
||||||
|
href="<?php echo $video->webpage_url; ?>">
|
||||||
<?php
|
<?php
|
||||||
echo $video->title;
|
echo $video->title;
|
||||||
?></a></i>. <img class="cast_icon" id="cast_disabled" src="img/ic_media_route_disabled_holo_light.png" alt="Google Cast™ is disabled" title="Google Cast is not supported on this browser." /><img class="cast_btn cast_hidden cast_icon" id="cast_btn_launch" src="img/ic_media_route_off_holo_light.png" title="Cast to ChromeCast" alt="Google Cast™" /><img src="img/ic_media_route_on_holo_light.png" alt="Casting to ChromeCast…" title="Stop casting" id="cast_btn_stop" class="cast_btn cast_hidden cast_icon" /></p>
|
?></a></i>.
|
||||||
|
<img class="cast_icon" id="cast_disabled"
|
||||||
|
src="img/ic_media_route_disabled_holo_light.png"
|
||||||
|
alt="Google Cast™ is disabled"
|
||||||
|
title="Google Cast is not supported on this browser." />
|
||||||
|
<img class="cast_btn cast_hidden cast_icon" id="cast_btn_launch"
|
||||||
|
src="img/ic_media_route_off_holo_light.png"
|
||||||
|
title="Cast to ChromeCast" alt="Google Cast™" />
|
||||||
|
<img src="img/ic_media_route_on_holo_light.png"
|
||||||
|
alt="Casting to ChromeCast…" title="Stop casting"
|
||||||
|
id="cast_btn_stop" class="cast_btn cast_hidden cast_icon" /></p>
|
||||||
<?php
|
<?php
|
||||||
echo '<img itemprop="image" class="thumb" src="',
|
echo '<img itemprop="image" class="thumb" src="',
|
||||||
$video->thumbnail, '" alt="" />';
|
$video->thumbnail, '" alt="" />';
|
||||||
|
@ -51,14 +65,19 @@ if (isset($_GET["url"])) {
|
||||||
<p>(You might have to do a <i>Right click > Save as</i>)</p>
|
<p>(You might have to do a <i>Right click > Save as</i>)</p>
|
||||||
<ul id="format" class="format">
|
<ul id="format" class="format">
|
||||||
<?php
|
<?php
|
||||||
echo '<li class="best" itemprop="encoding" itemscope itemtype="http://schema.org/VideoObject">';
|
echo '<li class="best" itemprop="encoding" itemscope
|
||||||
|
itemtype="http://schema.org/VideoObject">';
|
||||||
echo '<a itemprop="contentUrl" href="', $video->url ,'">';
|
echo '<a itemprop="contentUrl" href="', $video->url ,'">';
|
||||||
echo '<b>Best</b> (<span itemprop="encodingFormat">', $video->ext, '</span>)';
|
echo '<b>Best</b> (<span itemprop="encodingFormat">',
|
||||||
|
$video->ext, '</span>)';
|
||||||
echo '</a></li>';
|
echo '</a></li>';
|
||||||
foreach ($video->formats as $format) {
|
foreach ($video->formats as $format) {
|
||||||
echo '<li itemprop="encoding" itemscope itemtype="http://schema.org/VideoObject">';
|
echo '<li itemprop="encoding"
|
||||||
|
itemscope itemtype="http://schema.org/VideoObject">';
|
||||||
echo '<a itemprop="contentUrl" href="', $format->url ,'">';
|
echo '<a itemprop="contentUrl" href="', $format->url ,'">';
|
||||||
echo '<span itemprop="videoQuality">', $format->format, '</span> (<span itemprop="encodingFormat">', $format->ext, '</span>)';
|
echo '<span itemprop="videoQuality">', $format->format,
|
||||||
|
'</span> (<span itemprop="encodingFormat">',
|
||||||
|
$format->ext, '</span>)';
|
||||||
echo '</a></li>';
|
echo '</a></li>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -71,7 +90,8 @@ if (isset($_GET["url"])) {
|
||||||
}
|
}
|
||||||
if (!isset($video->formats)) {
|
if (!isset($video->formats)) {
|
||||||
?>
|
?>
|
||||||
<a class="downloadBtn" href="<?php echo $video->url; ?>">Download</a><br/>
|
<a class="downloadBtn"
|
||||||
|
href="<?php echo $video->url; ?>">Download</a><br/>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue