diff options
author | RaindropsSys <contact@minteck.org> | 2023-06-22 23:06:12 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-06-22 23:06:12 +0200 |
commit | 23563c7188e089929b60f9e10721c6fc43a220ff (patch) | |
tree | edfe2b009c82900d4ac27db02222d2f68dcad846 /pages/api/chrome.php | |
parent | 7a7a49332df7c852abbaa33c7e8e87f93d064d61 (diff) | |
download | pluralconnect-23563c7188e089929b60f9e10721c6fc43a220ff.tar.gz pluralconnect-23563c7188e089929b60f9e10721c6fc43a220ff.tar.bz2 pluralconnect-23563c7188e089929b60f9e10721c6fc43a220ff.zip |
Updated 15 files, added includes/maintenance/deleteUnusedAssets.php and deleted 4944 files (automated)
Diffstat (limited to 'pages/api/chrome.php')
-rw-r--r-- | pages/api/chrome.php | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/pages/api/chrome.php b/pages/api/chrome.php deleted file mode 100644 index db32511..0000000 --- a/pages/api/chrome.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; - - -if (isset($_GET["e"])) { - header("Access-Control-Allow-Origin: chrome-extension://foioekefbipjjonpgpbjahmplcealhhg"); -} else { - header("Access-Control-Allow-Origin: *"); -} - -header("Access-Control-Allow-Credentials: true"); -header("Access-Control-Allow-Methods: *"); -header("Access-Control-Allow-Headers: *"); - -if (!isset($_GET["t"])) { - header("Content-Type: application/json"); - - if ($isLoggedIn) { - die("true"); - } else { - die("false"); - } -} else { - switch ($_GET["t"]) { - case "onboarding": - header("Content-Type: text/html"); - - ?> -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="icon" href="https://git.equestria.dev/equestria.dev/luna/raw/branch/mane/icons/logo.png" type="image/png"> - <title>Luna for Chrome OS</title> - <style> - html, body { - background-color: #0d0b16; - color: white; - font-family: sans-serif; - overflow: hidden; - } - - button:hover { - opacity: .75; - } - - button:active { - opacity: .5; - } - </style> -</head> -<body> -<div style="max-width: 65vw; margin-left: auto; margin-right: auto; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center;"> - <div> - <img src="https://git.equestria.dev/equestria.dev/luna/raw/branch/mane/icons/logo.png" width="128px"> - <h1>Please login to Cold Haze</h1> - <p>To proceed with activating Luna on this Chromebook, you need to login to Cold Haze. You also need to make sure you properly enroled this computer into Chrome Enterprise.</p> - <button onclick='window.open("https://ponies.equestria.horse/-/login/?return=/api/close&mini", "_blank", "popup,top=100,width=100,height:250")' style="cursor: pointer; background: #5958ad; color: white; border: none; padding: 5px 10px; border-radius: 5px;">Login</button> - </div> -</div> - -<script> - setTimeout(async () => { - if (JSON.parse(await (await fetch("https://ponies.equestria.horse/api/chrome")).text())) { - window.close(); - } - }); - - setInterval(async () => { - if (JSON.parse(await (await fetch("https://ponies.equestria.horse/api/chrome")).text())) { - window.close(); - } - }, 5000); -</script> -</body> -</html> -<?php - - die(); - case "unique": - header("Content-Type: text/plain"); - die("Chromebook-" . strtoupper(substr(sha1($_COOKIE['PEH2_SESSION_TOKEN']), 0, 5))); - default: - header("Location: /"); - die(); - } -}
\ No newline at end of file |