From b8b6cfc4b6584630f730dfc43a1202814f6e305b Mon Sep 17 00:00:00 2001 From: Thomas G <62822072+Thomasluigi07@users.noreply.github.com> Date: Sun, 30 Oct 2022 21:02:14 +1100 Subject: [PATCH] morblox.us site detection --- public/js/detect.js | 12 ++++++++++++ resources/views/index.blade.php | 6 ++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 public/js/detect.js diff --git a/public/js/detect.js b/public/js/detect.js new file mode 100644 index 0000000..e00532a --- /dev/null +++ b/public/js/detect.js @@ -0,0 +1,12 @@ +// Detect if user is on an older domain that isn't recommended. + +function addWarning() { + let alertDiv = document.createElement("div"); + alertDiv.innerHTML = "You are on an unsupported url of the site. Please go to archblox.com instead."; + alertDiv.setAttribute("id","alert"); + document.body.appendChild(alertDiv); +} + +if (window.location.href == "https://archblox.com" || window.location.href == "http://archblox.com") {} else { + addWarning(); +} \ No newline at end of file diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index a4388ad..27307d5 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -1,7 +1,6 @@ @extends('layouts.loggedout') @section('title') -{{ env('APP_NAME') }} - It's Archaic! - +{{ env('APP_NAME') }} - It's Archaic! @endsection @section('titlediscord') @@ -9,6 +8,9 @@ @section('descdiscord') @endsection +@section('extras') + +@endsection @section('contentloggedout')

Welcome to ARCHBLOX!

ARCHBLOX is a Work-In-Progress revival.