noscheme on all URL

This commit is contained in:
Pierre Rudloff 2016-04-06 13:19:27 +02:00
parent 4a2a795131
commit 7eef219128
8 changed files with 184 additions and 23 deletions

View file

@ -11,7 +11,8 @@
"mathmarques/smarty-view": "~1.1.0",
"symfony/yaml": "~3.0.0",
"symfony/process": "~3.0.0",
"ffmpeg/ffmpeg": "~2.8.2"
"ffmpeg/ffmpeg": "~2.8.2",
"rudloff/smarty-plugin-noscheme": "~0.1.0"
},
"require-dev": {
"symfony/var-dumper": "~3.0.0"

166
composer.lock generated
View file

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "3449f3fdfee819b9ebe34c0efa7fc732",
"content-hash": "e89b6deb5098d948d4e03ce635400cdf",
"hash": "829ac07cae5bc43ef0ad3f5e5be618c5",
"content-hash": "a7131399bb03f78ba0dcfd8ab7e98d59",
"packages": [
{
"name": "container-interop/container-interop",
@ -48,6 +48,132 @@
],
"type": "library"
},
{
"name": "jeremykendall/php-domain-parser",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/jeremykendall/php-domain-parser.git",
"reference": "896e7e70f02bd4fd77190052799bc61e4d779672"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jeremykendall/php-domain-parser/zipball/896e7e70f02bd4fd77190052799bc61e4d779672",
"reference": "896e7e70f02bd4fd77190052799bc61e4d779672",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-intl": "*",
"ext-mbstring": "*",
"php": ">=5.3.0"
},
"require-dev": {
"jeremykendall/debug-die": "0.0.1.*",
"mikey179/vfsstream": "~1.4",
"phpunit/phpunit": "~4.4"
},
"bin": [
"bin/parse",
"bin/update-psl"
],
"type": "library",
"autoload": {
"psr-0": {
"Pdp\\": "src/"
},
"files": [
"src/pdp-parse-url.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jeremy Kendall",
"homepage": "http://about.me/jeremykendall",
"role": "Developer"
},
{
"name": "Contributors",
"homepage": "https://github.com/jeremykendall/php-domain-parser/graphs/contributors"
}
],
"description": "Public Suffix List based URL parsing implemented in PHP.",
"homepage": "https://github.com/jeremykendall/php-domain-parser",
"keywords": [
"Public Suffix List",
"domain parsing",
"url parsing"
],
"time": "2015-03-30 12:49:45"
},
{
"name": "league/uri",
"version": "4.1.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/uri.git",
"reference": "0cbce9fe7d9808690ebda67b110ad96bcae9daee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/uri/zipball/0cbce9fe7d9808690ebda67b110ad96bcae9daee",
"reference": "0cbce9fe7d9808690ebda67b110ad96bcae9daee",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
"ext-intl": "*",
"ext-mbstring": "*",
"jeremykendall/php-domain-parser": "^3.0",
"php": ">=5.5.9",
"psr/http-message": "^1.0"
},
"require-dev": {
"fabpot/php-cs-fixer": "^1.9",
"phpunit/phpunit": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"League\\Uri\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ignace Nyamagana Butera",
"email": "nyamsprod@gmail.com",
"homepage": "https://nyamsprod.com"
}
],
"description": "URI manipulation library",
"homepage": "http://url.thephpleague.com",
"keywords": [
"data",
"data-uri",
"ftp",
"http",
"parse_url",
"psr-7",
"rfc3986",
"uri",
"url",
"ws"
],
"time": "2016-03-24 08:38:29"
},
{
"name": "mathmarques/smarty-view",
"version": "1.1.0",
@ -246,6 +372,42 @@
},
"type": "library"
},
{
"name": "rudloff/smarty-plugin-noscheme",
"version": "0.1.0",
"source": {
"type": "git",
"url": "https://github.com/Rudloff/smarty-plugin-noscheme.git",
"reference": "537bcb2f7576252af70d8f9f817bfe050d873072"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Rudloff/smarty-plugin-noscheme/zipball/537bcb2f7576252af70d8f9f817bfe050d873072",
"reference": "537bcb2f7576252af70d8f9f817bfe050d873072",
"shasum": ""
},
"require": {
"league/uri": "~4.0"
},
"require-dev": {
"symfony/var-dumper": "~2.7.6"
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-3.0"
],
"authors": [
{
"name": "Pierre Rudloff",
"email": "contact@rudloff.pro",
"homepage": "https://rudloff.pro/",
"role": "Developer"
}
],
"description": "Smarty modifier that removes the scheme in URLs",
"time": "2015-10-31 10:25:47"
},
{
"name": "slim/slim",
"version": "3.3.0",

View file

@ -13,6 +13,7 @@
* @link http://rudloff.pro
* */
require_once __DIR__.'/vendor/autoload.php';
require_once __DIR__.'/vendor/rudloff/smarty-plugin-noscheme/modifier.noscheme.php';
use Alltube\VideoDownload;
$app = new \Slim\App();
@ -21,6 +22,8 @@ $container['view'] = function ($c) {
$view = new \Slim\Views\Smarty(__DIR__.'/templates/');
$view->addSlimPlugins($c['router'], $c['request']->getUri());
$view->registerPlugin('modifier', 'noscheme', 'Smarty_Modifier_noscheme');
return $view;
};

View file

@ -17,6 +17,6 @@
·
</div>
</footer>
<script src="{base_url}/dist/main.js"></script>
<script src="{base_url|noscheme}/dist/main.js"></script>
</body>
</html>

View file

@ -4,26 +4,21 @@
<meta charset="UTF-8" />
<meta name=viewport content="width=device-width, initial-scale=1">
<meta name="description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
<link rel="stylesheet" href="{base_url}/dist/main.css" />
<link rel="stylesheet" href="{base_url|noscheme}/dist/main.css" />
<link rel="author" href="https://plus.google.com/110403274854419000481?rel=author" />
<link rel="author" href="https://plus.google.com/103696815796116179392?rel=author" />
<link href="https://plus.google.com/108799967445657477255" rel="publisher" />
<title itemprop="name">AllTube Download</title>
<meta itemprop="url" content="{base_url}" />
{if isset($smarty.server.HTTPS)}
{$scheme = "https://"}
{else}
{$scheme = "http://"}
{/if}
<link rel="canonical" href="{$scheme|cat:$smarty.server.HTTP_HOST|cat:$smarty.server.REQUEST_URI|replace:{base_url}:'http://www.alltubedownload.net'}" />
<link rel="icon" href="{base_url}/img/favicon.png" />
<meta property="og:url" content="{base_url}" />
<meta itemprop="url" content="{base_url|noscheme}" />
<link rel="canonical" href="//{$smarty.server.HTTP_HOST|cat:$smarty.server.REQUEST_URI|replace:{base_url|noscheme}:'http://www.alltubedownload.net'}" />
<link rel="icon" href="{base_url|noscheme}/img/favicon.png" />
<meta property="og:url" content="{base_url|noscheme}" />
<meta property="og:title" content="AllTube Download" />
<meta property="og:description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
<meta property="og:image" content="{base_url}/img/logo.png" />
<meta property="og:image" content="{base_url|noscheme}/img/logo.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="AllTube Download" />
<meta name="twitter:image" content="{base_url}/img/logo.png" />
<meta name="twitter:image" content="{base_url|noscheme}/img/logo.png" />
<meta name="twitter:creator" content="@Tael67" />
<meta name="twitter:description" content="Easily download videos from Youtube, Dailymotion, Vimeo and other websites." />
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>

View file

@ -1,5 +1,5 @@
<div class="main">
<div><img itemprop="image" class="logo" src="{base_url}/img/logo.png"
<div><img itemprop="image" class="logo" src="{base_url|noscheme}/img/logo.png"
alt="AllTube Download" width="328" height="284"></div>
<form action="{path_for name="video"}">
<label class="labelurl" for="url">
@ -23,7 +23,7 @@
<a class="combatiblelink" href="{path_for name="extractors"}">See all supported websites</a>
<div id="bookmarklet">
<p> Drag this to your bookmarks bar: </p>
<a class="bookmarklet" href="javascript:window.location='{base_url}{path_for name='video'}?url='+encodeURIComponent(location.href);">Bookmarklet</a>
<a class="bookmarklet" href="javascript:window.location='{base_url|noscheme}{path_for name='video'}?url='+encodeURIComponent(location.href);">Bookmarklet</a>
</div>
</div>

View file

@ -1,4 +1,4 @@
<h1 class="logobis">
<a class="logocompatible" href="{base_url}">
AllTube Download<span class="logocompatiblemask"><img src="{base_url}/img/logocompatiblemask.png" width="447" height="107" alt="" /></span>
<a class="logocompatible" href="{base_url|noscheme}">
AllTube Download<span class="logocompatiblemask"><img src="{base_url|noscheme}/img/logocompatiblemask.png" width="447" height="107" alt="" /></span>
</a></h1>

View file

@ -9,13 +9,13 @@
href="{$video->webpage_url}">
{$video->title}</a></i>.
<img class="cast_icon" id="cast_disabled"
src="{base_url}/img/ic_media_route_disabled_holo_light.png"
src="{base_url|noscheme}/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="{base_url}/img/ic_media_route_off_holo_light.png"
src="{base_url|noscheme}/img/ic_media_route_off_holo_light.png"
title="Cast to ChromeCast" alt="Google Cast™" />
<img src="{base_url}/img/ic_media_route_on_holo_light.png"
<img src="{base_url|noscheme}/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>
{if isset($video->thumbnail)}