diff --git a/app/Http/Controllers/StartpageController.php b/app/Http/Controllers/StartpageController.php index 3c8cd00899fdc6a961e98155227cca6bf17c0b55..5eddf7a4804f8a7414d27b563afe3e655f93386c 100644 --- a/app/Http/Controllers/StartpageController.php +++ b/app/Http/Controllers/StartpageController.php @@ -2,6 +2,8 @@ namespace App\Http\Controllers; +use Jenssegers\Agent\Agent; + use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Response; @@ -34,6 +36,9 @@ class StartpageController extends Controller } } + $agent = new Agent(); + $browser = $agent->browser(); + return view('index') ->with('title', trans('titles.index')) ->with('homeIcon') @@ -44,6 +49,7 @@ class StartpageController extends Controller ->with('sprueche', $request->input('param_sprueche', 'off')) ->with('tab', $request->input('param_sprueche', 'off')) ->with('focusPages', $focusPages) + ->with('browser', $browser) ->with('navbarFocus', 'suche'); } diff --git a/public/js/scriptStartPage.js b/public/js/scriptStartPage.js index b53290789dc48cbe9fbdc12b389b093b014dcfd8..d2fff42ea6fd226190dc2294e191d2c56efdd06c 100644 --- a/public/js/scriptStartPage.js +++ b/public/js/scriptStartPage.js @@ -1,5 +1,5 @@ $(document).ready(function(){ - checkPlugin(); + // checkPlugin(); if(location.href.indexOf("#plugin-modal") > -1) $("#plugin-modal").modal("show"); $("button").popover(); @@ -45,6 +45,7 @@ $(document).ready(function(){ }); }); +/* function checkPlugin(){ if(isFirefox){ $("#plugin-modal .modal-header h4").html("MetaGer zum Firefox hinzufügen"); @@ -107,6 +108,7 @@ function checkPlugin(){ $(".seperator").addClass("hidden"); } } +*/ function setSettings(){ for(var i = 0; i < localStorage.length; i++){ diff --git a/resources/lang/de/index.php b/resources/lang/de/index.php index 9690be96e1ada720add6a0bfaee78ecdb933d3f1..0f15f2aef3d59b63133a78ae4931bc45416c6eed 100644 --- a/resources/lang/de/index.php +++ b/resources/lang/de/index.php @@ -11,18 +11,61 @@ return [ 'plugin' => 'MetaGer-Plugin hinzufügen', - 'furtherInfo' => 'Further Information', - - 'sponsors' => 'Sponsoren', + 'sponsors.head.1' => 'Weitere Informationen', + 'sponsors.head.2' => 'Sponsoren', 'sponsors.woxikon' => 'Woxikon: Nach Wörtern & Synonymen suchen', 'sponsors.gutscheine' => 'Aktuelle Gutscheine auf Gutschein-Magazin.de', 'sponsors.kredite' => 'Günstige Kredite auf FINANZCHECK.de vergleichen ', - + 'about.title' => 'Ãœber uns', 'about.1.1' => 'Datenschutz & Privatsphäre', 'about.1.2' => ' sind bei uns einfach & selbstverständlich.', 'about.2.1' => 'Wir arbeiten nicht gewinnorientiert, wir sind ein ', 'about.2.2' => 'gemeinnütziger Verein. ', - 'placeholder' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen', + 'plugin.head.1' => 'MetaGer zum Firefox hinzufügen', + 'plugin.head.2' => 'MetaGer zum Chrome hinzufügen', + 'plugin.head.3' => 'MetaGer zum Opera hinzufügen', + 'plugin.head.4' => 'MetaGer zum Internet Explorer hinzufügen', + 'plugin.head.5' => 'MetaGer zum Microsoft Edge hinzufügen', + + 'plugin.firefox.1' => 'Klicken Sie ', + 'plugin.firefox.2' => 'hier', + 'plugin.firefox.3' => ', um MetaGer als Suchmaschine hinzuzufügen.', + 'plugin.firefox.4' => 'Setzen Sie einen Haken bei "Diese als aktuelle Suchmaschine setzen"', + 'plugin.firefox.5' => 'Klicken Sie auf "Hinzufügen"', + + 'plugin.chrome.1' => 'Klicken Sie ', + 'plugin.chrome.2' => 'hier', + 'plugin.chrome.3' => ', um MetaGer als Suchmaschine hinzuzufügen', + 'plugin.chrome.4' => 'Klicken Sie im Popup auf OK', + 'plugin.chrome.5' => '(Sollte der OK-Knopf deaktiviert sein, ist MetaGer bereits in Ihren Suchmaschinen. Klicken Sie dann auf Abbrechen und fahren mit Schritt 2 fort.)', + 'plugin.chrome.6' => 'Klicken in Ihrem Browser oben rechts auf ', + 'plugin.chrome.7' => 'Wählen Sie "Einstellungen"', + 'plugin.chrome.8' => 'Im Bereich Suchen, klicken Sie auf "Suchmaschinen verwalten"', + 'plugin.chrome.9' => 'In der nun angezeigten Liste, finden Sie MetaGer. Fahren Sie mit der Maus über den Eintrag und klicken auf "Als Standard festlegen"', + + 'plugin.opera.1' => 'Klicken Sie ', + 'plugin.opera.2' => 'hier', + 'plugin.opera.3' => ' um MetaGer in einem neuen Tab zu öffnen.', + 'plugin.opera.4' => 'Im neuen Tab klicken Sie mit der rechten Maustaste auf das Sucheingabefeld in der Mitte der Seite.', + 'plugin.opera.5' => 'Wählen Sie im Kontextmenü "Suchmaschine erstellen..."', + 'plugin.opera.6' => 'Klicken Sie im Popup auf "erstellen"', + 'plugin.opera.7' => '(Leider ist es Suchmaschinen nicht mehr möglich im Opera als Standard eingestellt zu werden, aber ', + 'plugin.opera.8' => 'hier', + 'plugin.opera.9' => ' können Sie mit Firefox einen Open-Source Browser installieren, der dies unterstützt.)', + + 'plugin.IE.1' => 'Klicken Sie ', + 'plugin.IE.2' => 'hier', + 'plugin.IE.3' => ', um MetaGer als Suchmaschine hinzuzufügen', + 'plugin.IE.4' => 'Klicken Sie in Ihrem Browser oben rechts auf Extras (', + 'plugin.IE.5' => 'Wählen Sie den Menüpunkt "Add-Ons verwalten"', + 'plugin.IE.6' => 'Klicken Sie im Bereich Add-On-Typen auf "Suchanbieter" und danach im rechten Bereich auf "MetaGer"', + 'plugin.IE.7' => 'Wählen Sie unten den Knopf "Als Standard"', + + 'plugin.edge.1' => 'Klicken Sie in Ihrem Browser oben rechts auf Extras (', + 'plugin.edge.2' => ') und wählen sie "Einstellungen"', + 'plugin.edge.3' => 'Scrollen Sie nach unten und klicken auf "Erweiterte Einstellungen anzeigen"', + 'plugin.edge.4' => 'Scrollen Sie erneut nach unten bis zum Punkt "In Adressleiste suchen mit" und klicken Sie auf "Ändern"', + 'plugin.edge.5' => 'Wählen Sie "MetaGer: Sicher suchen & finden..." und klicken Sie auf "Als Standard"', ]; \ No newline at end of file diff --git a/resources/lang/en/index.php b/resources/lang/en/index.php index db366960347429ef870cf2b92c29b0fa6d18aa94..5513ce4505c392531449a4266211150fd789f2bc 100644 --- a/resources/lang/en/index.php +++ b/resources/lang/en/index.php @@ -9,11 +9,10 @@ return [ 'conveyor' => 'Purchase at affiliate shops', - 'plugin' => 'add the MetaGer-Plugin', + 'plugin' => 'Add the MetaGer-Plugin', - 'furtherInfo' => 'Weitere Informationen', - - 'sponsors' => '', + 'sponsors.head.1' => 'Further Information', + 'sponsors.head.2' => '', 'sponsors.woxikon' => '', 'sponsors.gutscheine' => '', 'sponsors.kredite' => '', @@ -24,5 +23,49 @@ return [ 'about.2.1' => 'We do not work for profit. We are a ', 'about.2.2' => 'non-profit association. ', - 'placeholder' => 'MetaGer: Search and Find Savely, Protect Privacy', + 'plugin.head.1' => 'Add MetaGer to your Firefox', + 'plugin.head.2' => 'Add MetaGer to your Chrome', + 'plugin.head.3' => 'Add MetaGer to your Opera', + 'plugin.head.4' => 'Add MetaGer to your Internet Explorer', + 'plugin.head.5' => 'Add MetaGer to your Microsoft Edge', + + 'plugin.firefox.1' => 'Click ', + 'plugin.firefox.2' => 'here', + 'plugin.firefox.3' => ', to add MetaGer as a search engine.', + 'plugin.firefox.4' => 'Please tick the box "Make this the current search engine"', + 'plugin.firefox.5' => 'Click on "Add"', + + 'plugin.chrome.1' => 'Click ', + 'plugin.chrome.2' => 'here', + 'plugin.chrome.3' => ', to add MetaGer as a search engine.', + 'plugin.chrome.4' => 'Click OK on the next Popup', + 'plugin.chrome.5' => '(If the OK.button is disabled, MetaGer is already registered as a search engine. In this case click cancel and go on with step 2.)', + 'plugin.chrome.6' => 'Click this icon in the top right corner of your browser', + 'plugin.chrome.7' => 'Select "Settings"', + 'plugin.chrome.8' => 'In the search section, click on "Manage Search Engines"', + 'plugin.chrome.9' => 'In the displayed list, find MetaGer. Move your mouse over the entry and then click on "Make Default"', + + 'plugin.opera.1' => 'Click ', + 'plugin.opera.2' => 'here', + 'plugin.opera.3' => ' to open MetaGer in a new tab.', + 'plugin.opera.4' => 'In the new tab right click the search field in the middle of the page.', + 'plugin.opera.5' => 'Select "Create search engine..." in the context menu', + 'plugin.opera.6' => 'In the popup click "Create"', + 'plugin.opera.7' => '(Unfortunately it is no longer possible to set search engines as default in Opera, but ', + 'plugin.opera.8' => 'here', + 'plugin.opera.9' => ' you can download the open-source browser Firefox, which can do this.)', + + 'plugin.IE.1' => 'Click ', + 'plugin.IE.2' => 'here', + 'plugin.IE.3' => ', to add MetaGer as a search engine.', + 'plugin.IE.4' => 'Click on extras in the upper right corner of your browser (', + 'plugin.IE.5' => 'Select "Manage Add-Ons"', + 'plugin.IE.6' => 'In the add-ons type are click on "Search Providers" and then in the right area on "MetaGer"', + 'plugin.IE.7' => 'Choose the button "Make this my efault search provider"', + + 'plugin.edge.1' => 'Click on extras in the upper right corner of your browser (', + 'plugin.edge.2' => ') and select "Settings"', + 'plugin.edge.3' => 'Scroll down and click on "View advanced settings"', + 'plugin.edge.4' => 'Scroll down until you reach "Search in adress bar with" and click "Change"', + 'plugin.edge.5' => 'Select "MetaGer: Search and Find Savely, Protect Privacy..." and click on "Set as default"', ]; diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 37d5faaf2c95289e5867cc567c49cf7329f8acec..a4c64f6ee88a976cfa8d5533a7b0626eb40a0a8c 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -16,9 +16,64 @@ </span> </button> <h4> + @if ($browser === 'Firefox' || $browser === 'Mozilla') + {{ trans('index.plugin.head.1') }} + @elseif ($browser === 'Chrome') + {{ trans('index.plugin.head.2') }} + @elseif ($browser === 'Opera') + {{ trans('index.plugin.head.3') }} + @elseif ($browser === 'IE') + {{ trans('index.plugin.head.4') }} + @elseif ($browser === 'Edge') + {{ trans('index.plugin.head.5') }} + @else + $(".seperator").addClass("hidden"); + @endif </h4> </div> <div class="modal-body"> + @if ($browser === 'Firefox' || $browser === 'Mozilla') + <ol> + <li>{{ trans('index.plugin.firefox.1') }}<a href="javascript:window.external.AddSearchProvider($('link[rel=search]').attr('href'))">{{ trans('index.plugin.firefox.2') }}</a>{{ trans('index.plugin.firefox.3') }}</li> + <li>{{ trans('index.plugin.firefox.4') }}</li> + <li>{{ trans('index.plugin.firefox.5') }}</li> + </ol> + @elseif ($browser === 'Chrome') + <ol> + <li>{{ trans('index.plugin.chrome.1') }}<a href="javascript:window.external.AddSearchProvider($('link[rel=search]').attr('href'))" onclick="$('#more').removeClass('hidden');">{{ trans('index.plugin.chrome.2') }}</a>{{ trans('index.plugin.chrome.3') }} + <ul id=\"more\" class=\"hidden list-unstyled\"> + <li>{{ trans('index.plugin.chrome.4') }}</li> + <li><small>{{ trans('index.plugin.chrome.5') }}</small></li> + </ul></li> + <li>{{ trans('index.plugin.chrome.6') }}<span class=\"glyphicon glyphicon-menu-hamburger\"></span></li> + <li>{{ trans('index.plugin.chrome.7') }}</li> + <li>{{ trans('index.plugin.chrome.8') }}</li> + <li>{{ trans('index.plugin.chrome.9') }}</li> + </ol> + @elseif ($browser === 'Opera') + <ol> + <li>{{ trans('index.plugin.opera.1') }}<a href=\"/\" target=\"_blank\">{{ trans('index.plugin.opera.2') }}</a>{{ trans('index.plugin.opera.3') }}</li> + <li>{{ trans('index.plugin.opera.4') }}</li> + <li>{{ trans('index.plugin.opera.5') }}</li> + <li>{{ trans('index.plugin.opera.6') }}</li> + <li><small>{{ trans('index.plugin.opera.7') }}<a href=\"https://www.mozilla.org/de/firefox/new/\" target=\"_blank\">{{ trans('index.plugin.opera.8') }}</a>{{ trans('index.plugin.opera.9') }}</small> + </ol> + @elseif ($browser === 'IE') + <ol> + <li>{{ trans('index.plugin.IE.1') }}<a href=\"javascript:window.external.addSearchProvider($('link[rel=search]').attr('href'));\">{{ trans('index.plugin.IE.2') }}</a>{{ trans('index.plugin.IE.3') }} + <li>{{ trans('index.plugin.IE.4') }}<span class=\"glyphicon glyphicon-cog\"></span>)</li> + <li>{{ trans('index.plugin.IE.5') }}</li> + <li>{{ trans('index.plugin.IE.6') }}</li> + <li>{{ trans('index.plugin.IE.7') }}</li> + </ol> + @elseif ($browser === 'Edge') + <ol> + <li>{{ trans('index.plugin.edge.1') }}<span class=\"glyphicon glyphicon-option-horizontal\"></span>{{ trans('index.plugin.edge.2') }}</li> + <li>{{ trans('index.plugin.edge.3') }}</li> + <li>{{ trans('index.plugin.edge.4') }}</li> + <li>{{ trans('index.plugin.edge.5') }}</li> + </ol> + @endif </div> </div> </div> @@ -79,6 +134,10 @@ <div class="input-group"> <div class="input-group-addon"> <button type="button" data-toggle="popover" data-html="true" data-container="body" title="Persönliches Design auswählen" data-content=' <ul id="color-chooser" class="list-inline list-unstyled"> +} +} +} +} <li ><a id="standard" data-rgba="255,194,107,1" href="javascript:void(0)"></a></li> <li ><a id="standardHard" data-rgba="255,128,0,1" href="javascript:void(0)"></a></li> <li ><a id="blue" data-rgba="164,192,230,1" href="javascript:void(0)"></a></li> @@ -124,9 +183,9 @@ </li> <li class="hidden-xs seperator">| </li> - <li id="plug"> - <a href="#" id="plugin" data-toggle="modal" data-target="#plugin-modal">{{ trans('index.plugin') }} - </a> + <li id="plug" @unless ($browser === 'Firefox' || $browser === 'Mozilla' || $browser === 'Chrome' || $browser === 'Opera' || $browser === 'IE' || $browser === 'Edge') + class="hidden" @endunless > + <a href="#" id="plugin" data-toggle="modal" data-target="#plugin-modal">{{ trans('index.plugin') }}</a> </li> </ul> </figure> @@ -135,31 +194,25 @@ @section('optionalContent') <section id="moreInformation" class="hidden-xs"> - <h1 class="hidden">{{ trans('index.furtherInfo') }} - </h1> + <h1 class="hidden">{{ trans('index.sponsors.head.1') }}</h1> <div class="row"> <div id="sponsors" class="col-md-6 col-sm12"> - <h2>{{ trans('index.sponsors') }} - </h2> + <h2>{{ trans('index.sponsors.head.2') }}</h2> <ul> <li> - <a href="http://www.woxikon.de/" class="mutelink" target="_blank">{{ trans('index.sponsors.woxikon') }} - </a> + <a href="http://www.woxikon.de/" class="mutelink" target="_blank">{{ trans('index.sponsors.woxikon') }}</a> </li> <li> - <a href="http://www.gutschein-magazin.de/" class="mutelink" target="_blank">{{ trans('index.sponsors.gutscheine') }} - </a> + <a href="http://www.gutschein-magazin.de/" class="mutelink" target="_blank">{{ trans('index.sponsors.gutscheine') }}</a> </li> <li> - <a href="https://www.finanzcheck.de/" class="mutelink" target="_blank">{{ trans('index.sponsors.kredite') }} - </a> + <a href="https://www.finanzcheck.de/" class="mutelink" target="_blank">{{ trans('index.sponsors.kredite') }}</a> </li> </ul> </div> <div class="col-md-6 col-sm-12"> <h2> - <a href="/about/">{{ trans('index.about.title') }} - </a> + <a href="/about/">{{ trans('index.about.title') }}</a> </h2> <ul> <li>