Skip to content

Commit

Permalink
test: #1231; splash google-bot check (revert);
Browse files Browse the repository at this point in the history
  • Loading branch information
migbash committed May 2, 2023
1 parent 8b0e49f commit 0896e05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
8 changes: 4 additions & 4 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"
/>
<meta name="theme-color" content="#292929" />
<!-- <link
<link
rel="stylesheet"
type="text/css"
href="/app.css"
/> -->
/>
<!--
IMPORTANT
[GOOGLEBOT] mobile usability override/hack
Expand All @@ -29,15 +29,15 @@
body.googlebot-override span,
body.googlebot-override h1,
body.googlebot-override h2 {
font-size: 14px;
font-size: 20px;
}
/* body.googlebot-override div,
body.googlebot-override button,
body.googlebot-override a,
body.googlebot-override img,
body.googlebot-override td { */
body.googlebot-override * {
margin: 12px;
margin: 20px;
}
body.googlebot-override div#splash-screen {
margin: 0;
Expand Down
25 changes: 1 addition & 24 deletions src/lib/components/_Splash_screen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@
[TypeScript Written]
=================== -->
<script lang="ts">
import { browser } from '$app/environment';
import { onMount } from 'svelte';
import { onMount } from 'svelte';
let show: boolean = true;
let isGoogleBot: boolean = false;
$: if (browser)
{
isGoogleBot = /bot|google/i.test(navigator.userAgent)
show = !isGoogleBot
}
/**
* @summary [LIFECYCLE]
Expand Down Expand Up @@ -45,21 +37,6 @@
COMPONENT HTML
=================== -->

<h1
style="
color: red;
font-size: 50px;
margin-bottom: 50px;
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: 10000000;
">
{isGoogleBot}
</h1>

{#if show}
<div
id="splash-screen">
Expand Down

0 comments on commit 0896e05

Please sign in to comment.