summaryrefslogtreecommitdiff
path: root/settings.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2023-11-27 01:01:56 -0500
committerlolcat <will@lolcat.ca>2023-11-27 01:01:56 -0500
commit2519666e1c831f85836f9ce6d975d3ceb975c09d (patch)
tree86c68604aff9c7a0a430e70ef082195a4c3a717f /settings.php
parent9fd993b47b8c1b6e3c9d9f0e8d43a85860230f59 (diff)
google web, videos and news, various other fixes
Diffstat (limited to 'settings.php')
-rw-r--r--settings.php33
1 files changed, 23 insertions, 10 deletions
diff --git a/settings.php b/settings.php
index bee31ea..20f5031 100644
--- a/settings.php
+++ b/settings.php
@@ -117,10 +117,10 @@ $settings = [
"value" => "yandex",
"text" => "Yandex"
],
- /*[
+ [
"value" => "google",
"text" => "Google"
- ],*/
+ ],
[
"value" => "mojeek",
"text" => "Mojeek"
@@ -192,11 +192,11 @@ $settings = [
[
"value" => "yandex",
"text" => "Yandex"
- ]/*,
+ ],
[
"value" => "google",
"text" => "Google"
- ]*/
+ ]
]
],
[
@@ -211,10 +211,10 @@ $settings = [
"value" => "brave",
"text" => "Brave"
],
- /*[
+ [
"value" => "google",
"text" => "Google"
- ],*/
+ ],
[
"value" => "mojeek",
"text" => "Mojeek"
@@ -434,20 +434,33 @@ $left .=
'</div>' .
'<div class="settings-submit">' .
'<input type="submit" value="Update settings!">' .
- '<a href="../">&lt; Return to front page</a>' .
+ '<a href="../">&lt; Go back</a>' .
'</div>' .
'</form>';
if(count($_GET) === 0){
-
+
+ $code = [];
+ foreach($_COOKIE as $key => $value){
+
+ $code[] = rawurlencode($key) . "=" . rawurlencode($value);
+ }
+
+ $code = implode("&", $code);
+
+ if($code != ""){
+
+ $code = "?" . $code;
+ }
+
echo
$frontend->load(
"search.html",
[
"class" => "",
"right-left" =>
- '<div class="infobox"><h2>Preference link</h2>Follow this link to auto-apply all cookies. Useful if your browser clears out cookies after a browsing session. Following this link will redirect you to the front page, unless no settings are set.<br><br>' .
- '<a href="settings' . rtrim("?" . str_replace("; ", "&", $code), "?") . '">Bookmark me!</a>' .
+ '<div class="infobox"><h2>Preference link</h2>Following this link will re-apply all cookies configured here and will redirect you to the front page. Useful if your browser clears out cookies after a browsing session.<br><br>' .
+ '<a href="settings' . $code . '">Bookmark me!</a>' .
'</div>',
"right-right" => "",
"left" => $left