From c5de19543687edcb2c1a1d57566c9dac58502ab5 Mon Sep 17 00:00:00 2001 From: Arnan de Gans Date: Fri, 19 Jul 2024 15:57:40 -0600 Subject: [PATCH] Version 1.6.1 - NOTICE: config.default.php has changed, update your config.php!! - [new] Query logger for debugging (See config.default.php for details) - [tweak] Scrape query for DuckDuckGo to be more direct - [tweak] Added url arguments to the formatted url of search results - [tweak] Improved tooltips to be popups with better explanations - [tweak] Improved spacing for pagination links - [fix] More accurately show the current version in the footer - [fix] Current version not properly stored - [fix] Pagination offset off by one result - [fix] Unnecessary global in load_search() - [fix] Typo in wordpress search - [fix] Qwant initial total hits and ranking more accurate - [fix] Goosle header title not bold on stats page - [fix] Visual fixes to the design of Goosle --- assets/css/styles.css | 33 +++++++++-------- box-office.php | 2 +- changelog.md | 16 +++++++++ config.default.php | 13 +++++++ engines/boxoffice/eztv.php | 14 ++++++-- engines/boxoffice/yts.php | 14 ++++++-- engines/image/openverse.php | 12 +++++-- engines/image/qwant-images.php | 12 +++++-- engines/image/yahoo-images.php | 14 ++++++-- engines/magnet/eztv.php | 14 ++++++-- engines/magnet/lime.php | 14 ++++++-- engines/magnet/nyaa.php | 14 ++++++-- engines/magnet/sukebei.php | 14 ++++++-- engines/magnet/thepiratebay.php | 14 ++++++-- engines/magnet/yts.php | 14 ++++++-- engines/news/brave-news.php | 12 +++++-- engines/news/hackernews.php | 12 +++++-- engines/news/qwant-news.php | 12 +++++-- engines/news/yahoo-news.php | 12 +++++-- engines/search-image.php | 12 +++---- engines/search-magnet.php | 28 ++++++++++----- engines/search-news.php | 12 +++---- engines/search.php | 17 +++++++-- engines/search/brave.php | 12 +++++-- engines/search/duckduckgo.php | 22 +++++++----- engines/search/google.php | 12 +++++-- engines/search/qwant.php | 64 +++++++++++++++++++-------------- engines/search/wikipedia.php | 20 ++++++----- engines/special/currency.php | 12 +++++-- engines/special/definition.php | 14 ++++++-- engines/special/ipify.php | 8 ++++- engines/special/php.php | 13 +++++-- engines/special/wordpress.php | 17 ++++++--- functions/tools-magnet.php | 2 +- functions/tools.php | 47 +++++++++++++----------- goosle-cron.php | 8 ++--- help.php | 15 ++++---- index.php | 9 +++++ results.php | 9 ++--- stats.php | 2 +- 40 files changed, 436 insertions(+), 181 deletions(-) diff --git a/assets/css/styles.css b/assets/css/styles.css index dc71787..9c7a8ac 100644 --- a/assets/css/styles.css +++ b/assets/css/styles.css @@ -42,6 +42,8 @@ input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; -w .startpage .box-office { margin-left:0; border-left:1px solid var(--startpage-button-bg); border-radius:0 6px 6px 0; } .startpage .web-search:hover, .startpage .image-search:hover, .startpage .magnet-search:hover, .startpage .box-office:hover { border:1px solid var(--startpage-border-alt); background-color:var(--startpage-button-bg-alt); text-decoration:none; } +.startpage .footer { border-top:1px solid var(--color-accent); } + .password-generator { margin:30px auto; padding:0; } .password-generator .password { margin:10px auto; width:300px; text-align:center; font-size:.8rem; } @@ -55,11 +57,11 @@ input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; -w .header .search-field[type="search"]::-webkit-search-cancel-button { background-size:20px 20px; height:20px; width:20px; background-color:var(--text-alt); } .header .button { margin:0 10px 0 0; padding:5px 20px 5px 15px; color:var(--button-text); background-color:var(--button-bg); border:none; border-radius:0 10px 10px 0; } -.navigation { margin-left:158px; margin-bottom:8px; } /* Margin-bottom must match with padding-bottom on line 79 */ -.navigation a { margin-right:20px; border:none; cursor:pointer; text-decoration:none; } -.navigation a:visited { color:var(--link); } -.navigation a:hover { color:var(--text-alt); } -.navigation .active { padding-bottom:8px; border-bottom:4px solid var(--color-accent); } +.header .navigation { margin-left:158px; margin-bottom:10px; } +.header .navigation a { margin-right:20px; border:none; cursor:pointer; text-decoration:none; } +.header .navigation a:visited { color:var(--link); } +.header .navigation a:hover { color:var(--text-alt); } +.header .navigation .active { padding-bottom:8px; border-bottom:4px solid var(--color-accent); } /* Navigation icons */ .navigation a.tab-search::before { content:""; display:inline-block; width:1.1em; height:1.1em; background:var(--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wwLTJabS0yLDZhMSwxLDAsMCwwLDAtMkg3YTEsMSwwLDAsMCwwLDJaIiBmaWxsPSIjNjU2M2ZmIi8+PC9zdmc+'); } @@ -144,8 +146,8 @@ input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; -w .goosebox-body .success, .goosebox-body .fail { font-weight:600; } /* Stats display (stats page) */ -.statspage h1 { margin-bottom:10px; padding:0; text-align:center; font-size:2.5em; font-weight:400; } -.statspage h2 { margin-bottom:10px; padding:0; text-align:center; font-size:1.5em; } +.statspage .content h1 { margin-bottom:10px; padding:0; text-align:center; font-size:2.5em; font-weight:400; } +.statspage .content h2 { margin-bottom:10px; padding:0; text-align:center; font-size:1.5em; } .statspage p { font-family:'american typewriter'; } /* oAUTH page */ @@ -156,9 +158,13 @@ input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; -w .oauthpage .oauth-buttons button { margin:30px 20px 10px 20px; padding:13px 10px; min-width:130px; color:var(--text-alt); background-color:var(--startpage-button-bg); border:1px solid var(--startpage-border); font-size:1.2rem; border-radius:6px; } .oauthpage .oauth-buttons button:hover { border:1px solid var(--startpage-border-alt); background-color:var(--startpage-button-bg-alt); text-decoration:none; } +/* Tooltips */ +.tooltip-question::before { content:""; display:inline-block; width:1.1em; height:1.1em; background:var(--link); vertical-align:text-bottom; mask-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pjxzdmcgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMS4yOSwxNS4yOWExLjU4LDEuNTgsMCwwLDAtLjEyLjE1Ljc2Ljc2LDAsMCwwLS4wOS4xOC42NC42NCwwLDAsMC0uMDYuMTgsMS4zNiwxLjM2LDAsMCwwLDAsLjIuODQuODQsMCwwLDAsLjA4LjM4LjkuOSwwLDAsMCwuNTQuNTQuOTQuOTQsMCwwLDAsLjc2LDAsLjkuOSwwLDAsMCwuNTQtLjU0QTEsMSwwLDAsMCwxMywxNmExLDEsMCwwLDAtLjI5LS43MUExLDEsMCwwLDAsMTEuMjksMTUuMjlaTTEyLDJBMTAsMTAsMCwxLDAsMjIsMTIsMTAsMTAsMCwwLDAsMTIsMlptMCwxOGE4LDgsMCwxLDEsOC04QTgsOCwwLDAsMSwxMiwyMFpNMTIsN0EzLDMsMCwwLDAsOS40LDguNWExLDEsMCwxLDAsMS43MywxQTEsMSwwLDAsMSwxMiw5YTEsMSwwLDAsMSwwLDIsMSwxLDAsMCwwLTEsMXYxYTEsMSwwLDAsMCwyLDB2LS4xOEEzLDMsMCwwLDAsMTIsN1oiIGZpbGw9IiM2NTYzZmYiLz48L3N2Zz4='); } +.tooltip-alert::before { content:""; display:inline-block; width:1.1em; height:1.1em; background:var(--red); vertical-align:text-bottom; mask-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pjxzdmcgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMiwxNmExLDEsMCwxLDAsMSwxQTEsMSwwLDAsMCwxMiwxNlptMTAuNjcsMS40Ny04LjA1LTE0YTMsMywwLDAsMC01LjI0LDBsLTgsMTRBMywzLDAsMCwwLDMuOTQsMjJIMjAuMDZhMywzLDAsMCwwLDIuNjEtNC41M1ptLTEuNzMsMmExLDEsMCwwLDEtLjg4LjUxSDMuOTRhMSwxLDAsMCwxLS44OC0uNTEsMSwxLDAsMCwxLDAtMWw4LTE0YTEsMSwwLDAsMSwxLjc4LDBsOC4wNSwxNEExLDEsMCwwLDEsMjAuOTQsMTkuNDlaTTEyLDhhMSwxLDAsMCwwLTEsMXY0YTEsMSwwLDAsMCwyLDBWOUExLDEsMCwwLDAsMTIsOFoiIGZpbGw9IiM2NTYzZmYiLz48L3N2Zz4='); } + /* Pagination */ .pagination { text-align:center; } -.pagination a { font-size:1.2em; } +.pagination a { font-size:1.2em; padding:0 8px; } .pagination a.current { font-size:1.4em; font-weight:400; text-decoration:underline; } .arrow-left::before { content:""; display:inline-block; width:1.2em; height:1.2em; background:var(--link); vertical-align:text-top; mask-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZGF0YS1uYW1lPSJMYXllciAxIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE3LDExSDkuNDFsMy4zLTMuMjlhMSwxLDAsMSwwLTEuNDItMS40MmwtNSw1YTEsMSwwLDAsMC0uMjEuMzMsMSwxLDAsMCwwLDAsLjc2LDEsMSwwLDAsMCwuMjEuMzNsNSw1YTEsMSwwLDAsMCwxLjQyLDAsMSwxLDAsMCwwLDAtMS40Mkw5LjQxLDEzSDE3YTEsMSwwLDAsMCwwLTJaIiBmaWxsPSIjNjU2M2ZmIi8+PC9zdmc+'); } .arrow-right::before { content:""; display:inline-block; width:1.2em; height:1.2em; background:var(--link); vertical-align:text-top; mask-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgZGF0YS1uYW1lPSJMYXllciAxIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE3LjkyLDExLjYyYTEsMSwwLDAsMC0uMjEtLjMzbC01LTVhMSwxLDAsMCwwLTEuNDIsMS40MkwxNC41OSwxMUg3YTEsMSwwLDAsMCwwLDJoNy41OWwtMy4zLDMuMjlhMSwxLDAsMCwwLDAsMS40MiwxLDEsMCwwLDAsMS40MiwwbDUtNWExLDEsMCwwLDAsLjIxLS4zM0ExLDEsMCwwLDAsMTcuOTIsMTEuNjJaIiBmaWxsPSIjNjU2M2ZmIi8+PC9zdmc+'); } @@ -170,7 +176,7 @@ input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; -w .footer-grid:nth-child(2) { text-align:right; } /* Footer */ -.footer { box-sizing:border-box; bottom:0; margin-top:auto; padding:10px 5px; width:100%; background-color:var(--background-alt); color:var(--text-alt); border-top:2px solid var(--color-accent); font-size:.9rem; } +.footer { box-sizing:border-box; bottom:0; margin-top:auto; padding:10px 25px; width:100%; background-color:var(--background-alt); color:var(--text-alt); border-top:2px solid var(--color-accent); } .footer a { color:var(--text-alt); } /* MPA rating colors */ @@ -180,13 +186,6 @@ input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; -w .mpa-r { color:#C0392B; } .mpa-nc17 { color:#1A5276; } -/* Tooltips */ -.tooltip { position:relative; display:inline-block; } -.tooltip-question::before { content:""; display:inline-block; width:1.1em; height:1.1em; background:var(--link); vertical-align:text-bottom; mask-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pjxzdmcgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMS4yOSwxNS4yOWExLjU4LDEuNTgsMCwwLDAtLjEyLjE1Ljc2Ljc2LDAsMCwwLS4wOS4xOC42NC42NCwwLDAsMC0uMDYuMTgsMS4zNiwxLjM2LDAsMCwwLDAsLjIuODQuODQsMCwwLDAsLjA4LjM4LjkuOSwwLDAsMCwuNTQuNTQuOTQuOTQsMCwwLDAsLjc2LDAsLjkuOSwwLDAsMCwuNTQtLjU0QTEsMSwwLDAsMCwxMywxNmExLDEsMCwwLDAtLjI5LS43MUExLDEsMCwwLDAsMTEuMjksMTUuMjlaTTEyLDJBMTAsMTAsMCwxLDAsMjIsMTIsMTAsMTAsMCwwLDAsMTIsMlptMCwxOGE4LDgsMCwxLDEsOC04QTgsOCwwLDAsMSwxMiwyMFpNMTIsN0EzLDMsMCwwLDAsOS40LDguNWExLDEsMCwxLDAsMS43MywxQTEsMSwwLDAsMSwxMiw5YTEsMSwwLDAsMSwwLDIsMSwxLDAsMCwwLTEsMXYxYTEsMSwwLDAsMCwyLDB2LS4xOEEzLDMsMCwwLDAsMTIsN1oiIGZpbGw9IiM2NTYzZmYiLz48L3N2Zz4='); } -.tooltip-alert::before { content:""; display:inline-block; width:1.1em; height:1.1em; background:var(--link); vertical-align:text-bottom; mask-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pjxzdmcgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMiwxNmExLDEsMCwxLDAsMSwxQTEsMSwwLDAsMCwxMiwxNlptMTAuNjcsMS40Ny04LjA1LTE0YTMsMywwLDAsMC01LjI0LDBsLTgsMTRBMywzLDAsMCwwLDMuOTQsMjJIMjAuMDZhMywzLDAsMCwwLDIuNjEtNC41M1ptLTEuNzMsMmExLDEsMCwwLDEtLjg4LjUxSDMuOTRhMSwxLDAsMCwxLS44OC0uNTEsMSwxLDAsMCwxLDAtMWw4LTE0YTEsMSwwLDAsMSwxLjc4LDBsOC4wNSwxNEExLDEsMCwwLDEsMjAuOTQsMTkuNDlaTTEyLDhhMSwxLDAsMCwwLTEsMXY0YTEsMSwwLDAsMCwyLDBWOUExLDEsMCwwLDAsMTIsOFoiIGZpbGw9IiM2NTYzZmYiLz48L3N2Zz4='); } -.tooltip .tooltiptext { visibility:hidden; position:absolute; padding:10px 15px; width:350px; background:var(--background-popup); border:1px solid var(--border); border-radius:10px; z-index: 10000; } -.tooltip:hover .tooltiptext { visibility:visible; } - /* Misc */ .goosle-g { color:var(--color-accent); } .green { color:var(--green); } @@ -201,7 +200,7 @@ img.help { padding:0 .5rem .5rem 0; float:left; border-radius:20px; } .error { position:relative; overflow:hidden; margin:20px 0; padding:10px; color:var(--error); background-color:var(--error-background); border:1px solid var(--error); border-radius:10px; } .auth-success { margin-top:15%; text-align:center; color:var(--text-alt); } .auth-error { margin-top:15%; font-size:2rem; text-align:center; color:var(--text-alt); } -a.update { color:var(--red); font-weight:600; } +a.update { color:var(--yellow); font-weight:600; } @media only screen and (max-width:960px) { /* Tablet, landscape iPad, lo-res/smaller laptops */ .content { position:relative; margin:15px 48px; } diff --git a/box-office.php b/box-office.php index 9a2b500..2b7034e 100644 --- a/box-office.php +++ b/box-office.php @@ -140,7 +140,7 @@