Commit b9026298 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

chrome plugin page gets redirected over result page

parent 6b93b5f8
......@@ -15,6 +15,9 @@ class MetaGerSearch extends Controller
public function search(Request $request, MetaGer $metager, $timing = false)
{
if ($request->filled("chrome-plugin")) {
return redirect(LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/plugin"));
}
$timings = null;
if ($timing) {
$timings = ['starttime' => microtime(true)];
......
......@@ -45,7 +45,7 @@ class StartpageController extends Controller
return view('index')
->with('title', trans('titles.index'))
->with('homeIcon')
->with('browser', (new Agent())->browser())
->with('agent', new Agent())
->with('navbarFocus', 'suche')
->with('focus', $request->input('focus', 'web'))
->with('time', $request->input('param_time', '1500'))
......
......@@ -13,7 +13,12 @@
<input type="hidden" name="key" value="{{ Request::input('key','') }}" form="searchForm">
@endif
<div id="plugin-btn-div">
@if($agent->isMobile() && $agent->browser() === "Chrome")
<input type="hidden" name="eingabe" value="chrome" />
<button type="submit" id="plugin-btn" form="searchForm" title="{{ trans('index.plugin-title') }}" name="chrome-plugin" value="true"><i class="fa fa-plug" aria-hidden="true"></i> {{ trans('index.plugin') }}</a>
@else
<a id="plugin-btn" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/plugin") }}" title="{{ trans('index.plugin-title') }}"><i class="fa fa-plug" aria-hidden="true"></i> {{ trans('index.plugin') }}</a>
@endif
</div>
<div id="about-us">
<div class="m-row">
......
......@@ -8,7 +8,7 @@
</a>
</div>
<div class="search-input">
<input type="search" name="eingabe" value="@if(isset($eingabe)){{$eingabe}}@endif" required="" @if(\Request::is('/') && !\Request::filled('mgapp')) autofocus @endif autocomplete="off" class="form-control" placeholder="{{ trans('index.placeholder') }}" tabindex="0">
<input type="search" name="eingabe" value="@if(isset($eingabe)){{$eingabe}}@endif" @if(\Request::is('/') && !\Request::filled('mgapp')) autofocus @endif autocomplete="off" class="form-control" placeholder="{{ trans('index.placeholder') }}" tabindex="0">
<button id="search-delete-btn" name="delete-search-input" type="button" tabindex="-1">
&#xd7;
</button>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment