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') -
ARCHBLOX is a Work-In-Progress revival.