mirror of https://github.com/supernets/LibreY.git
added csp and fixed fix.
This commit is contained in:
parent
63d099ffb2
commit
1349cecbc7
|
@ -86,8 +86,8 @@
|
||||||
echo "$source";
|
echo "$source";
|
||||||
echo "<h2>$name</h2>";
|
echo "<h2>$name</h2>";
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo "<span>SE: <span style=\"color:#50fa7b\">$seeders</span> - ";
|
echo "<span>SE: <span class=\"seeders\">$seeders</span> - ";
|
||||||
echo "LE: <span style=\"color:#ff79c6\">$leechers</span> - ";
|
echo "LE: <span class=\"leechers\">$leechers</span> - ";
|
||||||
echo "$size</span>";
|
echo "$size</span>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
{
|
{
|
||||||
$description = substr($first_page["extract"], 0, 250) . "...";
|
$description = substr($first_page["extract"], 0, 250) . "...";
|
||||||
|
|
||||||
$source = check_for_privacy_frontend("https://wikipedia.org/wiki/$query");
|
$source = check_for_privacy_frontend("https://wikipedia.org/wiki/$query_encoded");
|
||||||
$response = array(
|
$response = array(
|
||||||
"special_response" => array(
|
"special_response" => array(
|
||||||
"response" => htmlspecialchars($description),
|
"response" => htmlspecialchars($description),
|
||||||
"source" => urlencode($source)
|
"source" => $source
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form class="search-container" action="search.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
<form class="search-container" action="search.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||||
<h1>Libre<span style="color:#bd93f9;">X</span></h1>
|
<h1>Libre<span class="X">X</span></h1>
|
||||||
<input type="text" name="q"/>
|
<input type="text" name="q"/>
|
||||||
<input type="hidden" name="p" value="0"/>
|
<input type="hidden" name="p" value="0"/>
|
||||||
<input type="hidden" name="type" value="0"/>
|
<input type="hidden" name="type" value="0"/>
|
||||||
<input type="submit" style="display:none"/>
|
<input type="submit" class="hide"/>
|
||||||
<div class="search-button-wrapper">
|
<div class="search-button-wrapper">
|
||||||
<button name="type" value="0" type="submit">Search with LibreX</button>
|
<button name="type" value="0" type="submit">Search with LibreX</button>
|
||||||
<button name="type" value="3" type="submit">Search torrents with LibreX</button>
|
<button name="type" value="3" type="submit">Search torrents with LibreX</button>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<!DOCTYPE html >
|
<!DOCTYPE html >
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
<?php header("Content-Security-Policy: sandbox allow-forms allow-top-navigation; default-src 'self'; img-src 'self' data:;"); ?>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta name="description" content="A privacy respecting meta search engine."/>
|
<meta name="description" content="A privacy respecting meta search engine."/>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
$type = isset($_REQUEST["type"]) ? (int) $_REQUEST["type"] : 0;
|
$type = isset($_REQUEST["type"]) ? (int) $_REQUEST["type"] : 0;
|
||||||
echo "<input type=\"hidden\" name=\"type\" value=\"$type\"/>";
|
echo "<input type=\"hidden\" name=\"type\" value=\"$type\"/>";
|
||||||
?>
|
?>
|
||||||
<button type="submit" style="display:none;"></button>
|
<button type="submit" class="hide"></button>
|
||||||
<input type="hidden" name="p" value="0">
|
<input type="hidden" name="p" value="0">
|
||||||
<div class="sub-search-button-wrapper">
|
<div class="sub-search-button-wrapper">
|
||||||
<button name="type" value="0"><img src="static/images/text_result.png" alt="text result" />Text</button>
|
<button name="type" value="0"><img src="static/images/text_result.png" alt="text result" />Text</button>
|
||||||
|
|
|
@ -346,3 +346,19 @@ a:hover, .text-result-wrapper h2:hover {
|
||||||
font-size: 55px;
|
font-size: 55px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.X {
|
||||||
|
color: #bd93f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.seeders {
|
||||||
|
color: #50fa7b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leechers {
|
||||||
|
color: #ff79c6;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue