Skip to content

Commit e284497

Browse files
firefox cors warning
Signed-off-by: CypherpunkSamurai <CypherpunkSamurai@users.noreply.github.com>
1 parent 5f6cead commit e284497

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

index.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,60 @@
235235
<div
236236
class="search-container absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[600px] max-w-[90vw] z-10"
237237
>
238+
<!-- Firefox Warning Message -->
239+
<div id="firefox-warning" class="mb-4 hidden">
240+
<div
241+
class="macos-blur rounded-lg bg-amber-600/70 p-4 text-white shadow-md border border-amber-500/30"
242+
>
243+
<div class="flex items-start">
244+
<svg
245+
class="h-6 w-6 mr-2 flex-shrink-0"
246+
fill="none"
247+
viewBox="0 0 24 24"
248+
stroke="currentColor"
249+
>
250+
<path
251+
stroke-linecap="round"
252+
stroke-linejoin="round"
253+
stroke-width="2"
254+
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
255+
/>
256+
</svg>
257+
<div>
258+
<p class="font-medium">Firefox detected!</p>
259+
<p class="text-sm mt-1">
260+
You may experience CORS issues. Please install
261+
<a
262+
href="https://addons.mozilla.org/en-US/firefox/addon/cors-unblock/"
263+
target="_blank"
264+
class="underline font-semibold hover:text-amber-200"
265+
>CORS Unblock</a
266+
>
267+
extension to ensure proper functionality.
268+
</p>
269+
</div>
270+
<button
271+
onclick="document.getElementById('firefox-warning').classList.add('hidden')"
272+
class="ml-auto flex-shrink-0 text-amber-100 hover:text-white"
273+
>
274+
<svg
275+
class="h-5 w-5"
276+
fill="none"
277+
viewBox="0 0 24 24"
278+
stroke="currentColor"
279+
>
280+
<path
281+
stroke-linecap="round"
282+
stroke-linejoin="round"
283+
stroke-width="2"
284+
d="M6 18L18 6M6 6l12 12"
285+
/>
286+
</svg>
287+
</button>
288+
</div>
289+
</div>
290+
</div>
291+
238292
<!-- Search box -->
239293
<div
240294
class="macos-blur rounded-2xl bg-macos-bg text-macos-text shadow-xl border border-white/10 overflow-hidden"
@@ -1055,6 +1109,13 @@
10551109
searchInput.focus();
10561110
}
10571111
});
1112+
1113+
// Check if user is using Firefox and show warning if needed
1114+
window.addEventListener("load", function () {
1115+
if (navigator.userAgent.toLowerCase().indexOf("firefox") > -1 || navigator.userAgent.toLowerCase().indexOf("gecko") > -1) {
1116+
document.getElementById("firefox-warning").classList.remove("hidden");
1117+
}
1118+
});
10581119
</script>
10591120
</body>
10601121
</html>

0 commit comments

Comments
 (0)