mirror of
https://github.com/hnhx/librex.git
synced 2025-04-29 14:09:27 -04:00
added csp and fixed fix.
This commit is contained in:
parent
63d099ffb2
commit
1349cecbc7
6 changed files with 24 additions and 7 deletions
|
@ -86,8 +86,8 @@
|
|||
echo "$source";
|
||||
echo "<h2>$name</h2>";
|
||||
echo "</a>";
|
||||
echo "<span>SE: <span style=\"color:#50fa7b\">$seeders</span> - ";
|
||||
echo "LE: <span style=\"color:#ff79c6\">$leechers</span> - ";
|
||||
echo "<span>SE: <span class=\"seeders\">$seeders</span> - ";
|
||||
echo "LE: <span class=\"leechers\">$leechers</span> - ";
|
||||
echo "$size</span>";
|
||||
echo "</div>";
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
{
|
||||
$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(
|
||||
"special_response" => array(
|
||||
"response" => htmlspecialchars($description),
|
||||
"source" => urlencode($source)
|
||||
"source" => $source
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
</head>
|
||||
<body>
|
||||
<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="hidden" name="p" 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">
|
||||
<button name="type" value="0" type="submit">Search with LibreX</button>
|
||||
<button name="type" value="3" type="submit">Search torrents with LibreX</button>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html >
|
||||
<html lang="en">
|
||||
<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 charset="UTF-8"/>
|
||||
<meta name="description" content="A privacy respecting meta search engine."/>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
$type = isset($_REQUEST["type"]) ? (int) $_REQUEST["type"] : 0;
|
||||
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">
|
||||
<div class="sub-search-button-wrapper">
|
||||
<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;
|
||||
}
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.X {
|
||||
color: #bd93f9;
|
||||
}
|
||||
|
||||
.seeders {
|
||||
color: #50fa7b;
|
||||
}
|
||||
|
||||
.leechers {
|
||||
color: #ff79c6;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue