Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redirection parameter #20

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 61 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html lang="en" class="no-js"> <!--<![endif]-->

<head>
<meta charset="utf-8">
Expand All @@ -20,53 +21,81 @@
<script src="http://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"></script>
<script>
tailwind.config = {
module.exports = {
darkMode: 'media',
// ...
}
module.exports = {
darkMode: 'media',
// ...
}
}
</script>
</head>

<body>
<div class="flex h-screen px-5 py-2 lg:p-0 dark:text-white dark:bg-zinc-800">
<div class="search-box max-w-md lg:max-w-xl m-auto align-middle">
<h1 class="dark:text-white"><a href="#"><img src="udm14logo.svg" alt="&udm=14: the disenshittification Konami code"></a></h1>
<h1 class="dark:text-white"><a href="#"><img src="udm14logo.svg"
alt="&udm=14: the disenshittification Konami code"></a></h1>
<div class="py-6 text-center mx-6 text-sm lg:text-base">
<p>If you want to give people easy access to an AI-free Google search, send them to this page.</p>
</div>
<form class="max-w-xl mx-auto" action="https://www.google.com/search" method="get" onsubmit="searchFormHandler(event)">
<form class="max-w-xl mx-auto" action="https://www.google.com/search" method="get"
onsubmit="searchFormHandler(event)">
<input type="hidden" name="udm" value="14">
<div class="relative flex flex-col sm:flex-row items-center">
<div class="relative w-full">
<div class="sm:w-full">
<div class="top-5 md:top-inherit absolute inset-y-0 start-0 md-flex items-center ps-3 pointer-events-none">
<svg class="w-4 h-4 text-gray-500" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"/>
</svg>
</div>
<input type="search" id="default-search" name="q" class="block w-full p-4 ps-10 pe-5 md:ps-10 md:pe-0 text-sm lg:text-lg text-gray-900 dark:text-white dark:placeholder-gray-400 border border-gray-300 rounded-full dark:bg-zinc-700 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Whatever you’d like" required onkeydown="handleKeyPress(event)" />
<div
class="top-5 md:top-inherit absolute inset-y-0 start-0 md-flex items-center ps-3 pointer-events-none">
<svg class="w-4 h-4 text-gray-500" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 20 20">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z" />
</svg>
</div>
<input type="search" id="default-search" name="q"
class="block w-full p-4 ps-10 pe-5 md:ps-10 md:pe-0 text-sm lg:text-lg text-gray-900 dark:text-white dark:placeholder-gray-400 border border-gray-300 rounded-full dark:bg-zinc-700 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-500 dark:focus:border-blue-500"
placeholder="Whatever you’d like" required onkeydown="handleKeyPress(event)" />
</div>
<button type="submit" class="w-full min-h-[48px] md:min-h-fit sm:relative !mt-[10px] md:!w-auto md:mx-auto text-white md:!absolute end-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm lg:text-lg px-4 py-2 dark:bg-blue-700 dark:hover:bg-blue-700 dark:focus:ring-blue-800">AI-Free Search</button>
<button type="submit"
class="w-full min-h-[48px] md:min-h-fit sm:relative !mt-[10px] md:!w-auto md:mx-auto text-white md:!absolute end-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-full text-sm lg:text-lg px-4 py-2 dark:bg-blue-700 dark:hover:bg-blue-700 dark:focus:ring-blue-800">AI-Free
Search</button>
</div>
</div>
</form>
<div class="relative text-sm lg:text-base text-center py-6">
<p><a href="https://tedium.co/2024/05/17/google-web-search-make-default/" class="font-medium text-yellow-600 dark:text-yellow-500 underline hover:no-underline">What is "&udm=14"?</a> • <a href="https://tenbluelinks.org" class="font-medium text-blue-600 dark:text-blue-500 underline hover:no-underline">TenBlueLinks</a> • <a href="http://frogfind.com" class="font-medium text-green-600 dark:text-green-500 underline hover:no-underline">FrogFind</a> • Built by <a href="https://tedium.co/" class="font-medium text-red-600 dark:text-red-500 underline hover:no-underline">Tedium</a>
<p><a href="https://tedium.co/2024/05/17/google-web-search-make-default/"
class="font-medium text-yellow-600 dark:text-yellow-500 underline hover:no-underline">What is "&udm=14"?</a>
• <a href="https://tenbluelinks.org"
class="font-medium text-blue-600 dark:text-blue-500 underline hover:no-underline">TenBlueLinks</a> • <a
href="http://frogfind.com"
class="font-medium text-green-600 dark:text-green-500 underline hover:no-underline">FrogFind</a> • Built by
<a href="https://tedium.co/"
class="font-medium text-red-600 dark:text-red-500 underline hover:no-underline">Tedium</a>
</p>
<br/>
<button class="inline-flex items-center font-medium rounded-3xl px-4 py-2 leading-5 bg-gray-200 text-primary-100 text-black hover:text-gray-800 hover:bg-gray-300">
<img src="share-openly.svg"/>&nbsp;&nbsp;<a href="https://shareopenly.org/share/?url=https://udm14.com&text=udm14.com%3A%20An%20easy-to-use%20shortcut%20for%20an%20AI-free%20Google%20search.%20%28Try%20it%21%29">ShareOpenly</a>
<br />
<button
class="inline-flex items-center font-medium rounded-3xl px-4 py-2 leading-5 bg-gray-200 text-primary-100 text-black hover:text-gray-800 hover:bg-gray-300">
<img src="share-openly.svg" />&nbsp;&nbsp;<a
href="https://shareopenly.org/share/?url=https://udm14.com&text=udm14.com%3A%20An%20easy-to-use%20shortcut%20for%20an%20AI-free%20Google%20search.%20%28Try%20it%21%29">ShareOpenly</a>
</button>
<br/>
<br />
<p class="pt-6 pb-1">
<strong>Grab the code:</strong> <a class="font-medium text-blue-600 dark:text-white underline hover:no-underline" href="https://glitch.com/edit/#!/udm14">Glitch</a> | <a class="font-medium text-blue-600 dark:text-white underline hover:no-underline" href="https://github.com/readtedium/udm14">Github</a>
<strong>Grab the code:</strong> <a
class="font-medium text-blue-600 dark:text-white underline hover:no-underline"
href="https://glitch.com/edit/#!/udm14">Glitch</a> | <a
class="font-medium text-blue-600 dark:text-white underline hover:no-underline"
href="https://github.com/readtedium/udm14">Github</a>
</p>
<p class="pb-2">
<strong>Versions</strong> <a class="font-medium text-blue-600 dark:text-white underline hover:no-underline" href="https://udm14.com">Regular</a> | <a class="font-medium text-blue-600 dark:text-white underline hover:no-underline" href="https://udm14.org">SFW</a>
</p>
<br/>
<p class="text-xs lg:text-sm"><em><strong>Note:</strong> The feature this relies on, while available to most people, may not be available on every account yet. If it doesn’t work, try switching to another Google account, using Incognito mode, or clearing your cookies. We make no claims to perfect functionality.</em></p>
<strong>Versions</strong> <a class="font-medium text-blue-600 dark:text-white underline hover:no-underline"
href="https://udm14.com">Regular</a> | <a
class="font-medium text-blue-600 dark:text-white underline hover:no-underline"
href="https://udm14.org">SFW</a>
</p>
<br />
<p class="text-xs lg:text-sm"><em><strong>Note:</strong> The feature this relies on, while available to most
people, may not be available on every account yet. If it doesn’t work, try switching to another Google
account, using Incognito mode, or clearing your cookies. We make no claims to perfect functionality.</em>
</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -96,6 +125,13 @@ <h1 class="dark:text-white"><a href="#"><img src="udm14logo.svg" alt="&udm=14: t
document.addEventListener("DOMContentLoaded", event => {
document.getElementById("default-search").focus();
});

if (window.location.search.includes("?r=")) {
const redirectQUERY = window.location.search.replace("?r=", "");
const redirectURL = "https://www.google.com/search?q=" + redirectQUERY + "&udm=14";
window.location.href = redirectURL;
}
</script>
</body>
</html>

</html>