forked from lolcat/4get
Compare commits
4 Commits
4get-actio
...
master
Author | SHA1 | Date |
---|---|---|
|
49ddd1a216 | |
|
81ca8eaddc | |
|
c9c8d578f3 | |
|
b2203804c7 |
|
@ -15,7 +15,12 @@ class favicon{
|
|||
|
||||
header("Content-Type: image/png");
|
||||
|
||||
if(substr_count($url, "/") !== 2){
|
||||
if(
|
||||
preg_match(
|
||||
'/^https?:\/\/[A-Za-z0-9.-]+$/',
|
||||
$url
|
||||
) === 0
|
||||
){
|
||||
|
||||
header("X-Error: Only provide the protocol and domain");
|
||||
$this->defaulticon();
|
||||
|
|
|
@ -285,6 +285,7 @@ class ddg{
|
|||
"display" => "NSFW",
|
||||
"option" => [
|
||||
"yes" => "Yes",
|
||||
"maybe" => "Maybe",
|
||||
"no" => "No"
|
||||
]
|
||||
],
|
||||
|
@ -1345,7 +1346,7 @@ class ddg{
|
|||
$get_filters["iaf"] = $filters;
|
||||
}
|
||||
|
||||
$nsfw = $get["nsfw"] == "yes" ? "-2" : "-1";
|
||||
$nsfw = $get["nsfw"] == "yes" ? "-1" : "1";
|
||||
$get_filters["kp"] = $nsfw;
|
||||
|
||||
try{
|
||||
|
@ -1498,8 +1499,12 @@ class ddg{
|
|||
"ia" => "videos"
|
||||
];
|
||||
|
||||
$nsfw = $get["nsfw"] == "yes" ? "-2" : "-1";
|
||||
$get_filters["kp"] = $nsfw;
|
||||
switch($get["nsfw"]){
|
||||
|
||||
case "yes": $nsfw = "-2"; break;
|
||||
case "maybe": $nsfw = "-1"; break;
|
||||
case "no": $nsfw = "1"; break;
|
||||
}
|
||||
|
||||
$filters = [];
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class yandex{
|
|||
"Accept-Encoding: gzip",
|
||||
"Accept-Language: en-US,en;q=0.5",
|
||||
"DNT: 1",
|
||||
"Cookie: yp=1716337604.sp.family%3A{$nsfw}#1685406411.szm.1:1920x1080:1920x999",
|
||||
"Cookie: yp=" . (time() - 4000033) . ".szm.1:1920x1080:876x1000#" . time() . ".sp.family:" . $nsfw,
|
||||
"Referer: https://yandex.com/images/search",
|
||||
"Connection: keep-alive",
|
||||
"Upgrade-Insecure-Requests: 1",
|
||||
|
@ -668,7 +668,6 @@ class yandex{
|
|||
foreach($json["blocks"] as $block){
|
||||
|
||||
$html .= $block["html"];
|
||||
|
||||
// get next page
|
||||
if(
|
||||
isset($block["params"]["nextPageUrl"]) &&
|
||||
|
|
|
@ -1,48 +1,45 @@
|
|||
:root{
|
||||
--1d2021: #1d2021;
|
||||
--282828: #282828;
|
||||
--3c3836: #3c3836;
|
||||
--504945: #504945;
|
||||
|
||||
--1d2021:#1d2021;
|
||||
--282828:#282828;
|
||||
--3c3836:#3c3836;
|
||||
--504945:#504945;
|
||||
|
||||
/* font */
|
||||
--928374: #928374;
|
||||
--a89984: #c9c5bf;
|
||||
--bdae93: #bdae93;
|
||||
--8ec07c: #8ec07c;
|
||||
--ebdbb2: #ebdbb2;
|
||||
--928374:#928374;
|
||||
--a89984:#c9c5bf;
|
||||
--bdae93:#bdae93;
|
||||
--8ec07c:#8ec07c;
|
||||
--ebdbb2:#ebdbb2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
body{
|
||||
padding:15px 4% 40px;
|
||||
margin:unset;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5,h6{
|
||||
h1, h2, h3, h4, h5, h6{
|
||||
padding:0;
|
||||
margin:0 0 7px 0;
|
||||
line-height:initial;
|
||||
color:var(--bdae93);
|
||||
}
|
||||
|
||||
h3,h4,h5,h6{
|
||||
h3, h4, h5, h6{
|
||||
margin-bottom:14px;
|
||||
}
|
||||
|
||||
/*
|
||||
Web styles
|
||||
Web styles
|
||||
*/
|
||||
|
||||
.searchbox input[type="submit"]{
|
||||
float:right;
|
||||
cursor:pointer;
|
||||
padding:0 10px;
|
||||
border-left: 1px solid var(--504945);
|
||||
background: #723c0b;
|
||||
border-left:1px solid var(--504945);
|
||||
background:#723c0b;
|
||||
}
|
||||
|
||||
|
||||
.searchbox input{
|
||||
all:unset;
|
||||
line-height:36px;
|
||||
|
@ -97,7 +94,6 @@ h3,h4,h5,h6{
|
|||
display:inline-block;
|
||||
}
|
||||
|
||||
|
||||
.tabs .tab.selected{
|
||||
border-bottom:2px solid #fc92a5;
|
||||
}
|
||||
|
@ -107,7 +103,7 @@ h3,h4,h5,h6{
|
|||
padding-bottom:12px;
|
||||
padding-top:7px;
|
||||
margin-bottom:7px;
|
||||
background-color:#232525
|
||||
background-color:#232525;
|
||||
}
|
||||
|
||||
.filters .filter{
|
||||
|
@ -170,7 +166,6 @@ h3,h4,h5,h6{
|
|||
font-size:12px;
|
||||
}
|
||||
|
||||
|
||||
.web .hover{
|
||||
display:block;
|
||||
text-decoration:none;
|
||||
|
@ -194,16 +189,13 @@ h3,h4,h5,h6{
|
|||
color:#9760b1 !important;
|
||||
}
|
||||
|
||||
|
||||
.web .text-result .greentext{
|
||||
font-size:14px;
|
||||
color:var(--bdae93);
|
||||
}
|
||||
|
||||
|
||||
/* favicon */
|
||||
|
||||
|
||||
.favicon-dropdown a{
|
||||
text-decoration:none;
|
||||
color:#d3d0c1;
|
||||
|
@ -212,39 +204,33 @@ h3,h4,h5,h6{
|
|||
font-size:13px;
|
||||
}
|
||||
|
||||
|
||||
.web .favicon img,
|
||||
.favicon-dropdown img{
|
||||
.web .favicon img, .favicon-dropdown img{
|
||||
margin:3px 7px 0 0;
|
||||
height:16px;
|
||||
font-size:12px;
|
||||
line-height:16px;;
|
||||
line-height:16px;
|
||||
display:block;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
|
||||
.web .sublinks{
|
||||
padding:17px 10px;
|
||||
font-size:15px;
|
||||
color:var(--#928374);
|
||||
}
|
||||
|
||||
|
||||
.web .text-result .sublinks:last-child{
|
||||
padding-bottom:0;
|
||||
}
|
||||
|
||||
|
||||
/* Wikipedia head */
|
||||
.wiki-head{
|
||||
padding:5px;
|
||||
background-color: #322f2b
|
||||
background-color:#322f2b;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Images tab
|
||||
Images tab
|
||||
*/
|
||||
|
||||
#images{
|
||||
|
@ -258,17 +244,14 @@ h3,h4,h5,h6{
|
|||
float:left;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#images .image .title{
|
||||
white-space:nowrap;
|
||||
overflow:hidden;
|
||||
margin-bottom:7px;
|
||||
font-weight:bold;
|
||||
color:var(--bdae93);
|
||||
color:var(--bdae93);
|
||||
}
|
||||
|
||||
|
||||
#popup-status{
|
||||
display:none;
|
||||
position:fixed;
|
||||
|
@ -281,43 +264,59 @@ h3,h4,h5,h6{
|
|||
}
|
||||
|
||||
/*
|
||||
Settings page
|
||||
Settings page
|
||||
*/
|
||||
|
||||
|
||||
.web .settings-submit a{
|
||||
margin-right:17px;
|
||||
color:#bdae93;
|
||||
}
|
||||
|
||||
/*
|
||||
Responsive image
|
||||
*/
|
||||
@media only screen and (max-width:1454px){
|
||||
#images .image-wrapper{
|
||||
width:25%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:1161px){
|
||||
#images .image-wrapper{
|
||||
width:25%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:750px){
|
||||
#images .image-wrapper{
|
||||
width:50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width:450px){
|
||||
#images .image-wrapper{
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Responsive image
|
||||
Responsive design
|
||||
*/
|
||||
@media only screen and (max-width: 1454px){ #images .image-wrapper{ width:25%; } }
|
||||
@media only screen and (max-width: 1161px){ #images .image-wrapper{ width:25%; } }
|
||||
@media only screen and (max-width: 750px){ #images .image-wrapper{ width:50%; } }
|
||||
@media only screen and (max-width: 450px){ #images .image-wrapper{ width:100%; } }
|
||||
|
||||
|
||||
/*
|
||||
Responsive design
|
||||
*/
|
||||
@media only screen and (max-width: 1550px){
|
||||
|
||||
|
||||
.web .left,
|
||||
@media only screen and (max-width:1550px){
|
||||
.web .left,
|
||||
.searchbox{
|
||||
width:60%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1000px){
|
||||
|
||||
@media only screen and (max-width:1100px){
|
||||
.web .left,
|
||||
.searchbox{
|
||||
width:100%;
|
||||
}
|
||||
}
|
||||
|
||||
.type{
|
||||
color:var(--bdae93);
|
||||
}
|
||||
.type{
|
||||
color:var(--bdae93);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue