Update html/search-web-main.ejs

This commit is contained in:
Ashley 2023-12-29 06:39:31 +00:00
parent a3ae2bec2d
commit 548dd59278

View file

@ -16,14 +16,7 @@
if (window.NodeList && !NodeList.prototype.forEach) if (window.NodeList && !NodeList.prototype.forEach)
NodeList.prototype.forEach = Array.prototype.forEach; NodeList.prototype.forEach = Array.prototype.forEach;
</script> </script>
<noscript>
<style> <style>
.feeling-lucky {
display:none;
}</style>
</noscript>
<style>
@keyframes gradient { @keyframes gradient {
0% { 0% {
@ -230,7 +223,7 @@
<p style="margin-top: auto;margin-bottom: auto;font-weight: 1000;margin-left: 6px;font-stretch: ultra-expanded;font-family:&quot;poketube flex&quot;;Poketube flex;">Search Poke</p> <p style="margin-top: auto;margin-bottom: auto;font-weight: 1000;margin-left: 6px;font-stretch: ultra-expanded;font-family:&quot;poketube flex&quot;;Poketube flex;">Search Poke</p>
</button> </button>
<button class="btn btn-success feeling-lucky" onclick="feelingLucky()" style="margin-top: 1em;margin-left: auto;text-align: center;display: flex;flex-direction: column;background: #fff;background-color: #303134;border: 1px solid #303134;border-radius: 4px;color: #e8eaed;font-family: arial,sans-serif;font-size: 14px;padding: 0 16px;line-height: 27px;height: 36px;min-width: 54px;margin-right: 9em;text-align: center;cursor: pointer;user-select: none;margin-top: -38px;margin-left: 21em;"> <button class="btn btn-success" name="lucky" value="true" type="submit" style="margin-top: 1em;margin-left: auto;text-align: center;display: flex;flex-direction: column;background: #fff;background-color: #303134;border: 1px solid #303134;border-radius: 4px;color: #e8eaed;font-family: arial,sans-serif;font-size: 14px;padding: 0 16px;line-height: 27px;height: 36px;min-width: 54px;margin-right: 9em;text-align: center;cursor: pointer;user-select: none;margin-top: -38px;margin-left: 21em;">
<p style="margin-top: auto;margin-bottom: auto;font-weight: 1000;margin-left: 6px;font-stretch: ultra-expanded;font-family:&quot;poketube flex&quot;;Poketube flex;">Im feeling lucky</p> <p style="margin-top: auto;margin-bottom: auto;font-weight: 1000;margin-left: 6px;font-stretch: ultra-expanded;font-family:&quot;poketube flex&quot;;Poketube flex;">Im feeling lucky</p>
</button> </button>
</div> </div>
@ -265,18 +258,6 @@ if (userAgent.includes("windows")) {
const osInfoElement = document.getElementById("osInfo"); const osInfoElement = document.getElementById("osInfo");
osInfoElement.textContent = `${osName} - `; osInfoElement.textContent = `${osName} - `;
</script> <script> </script> <script>
function feelingLucky() {
const query = document.getElementById('search_form_input_homepage').value;
// Add a cache buster (timestamp)
const cacheBuster = new Date().getTime();
// Redirect to the "/im-feeling-lucky" route with cache buster
window.location.href = '/im-feeling-lucky?query=' + encodeURIComponent(query) + '&cb=' + cacheBuster;
}
const css = localStorage.getItem("poke-custom-css"); const css = localStorage.getItem("poke-custom-css");
var head = document.head var head = document.head