mirror of
https://github.com/QwIT-Development/firka-extension.git
synced 2026-06-12 03:41:39 +02:00
test
This commit is contained in:
@@ -1,138 +1,117 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing:border-box;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: var(--text-primary);
|
||||
background-color: var(--background) !important;
|
||||
font-family: "Montserrat", serif !important;
|
||||
min-height: 100vh;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin:0;
|
||||
padding:0;
|
||||
color:var(--text-primary);
|
||||
background-color:var(--background) !important;
|
||||
font-family:"Montserrat",serif !important;
|
||||
min-height:100vh;
|
||||
font-size:16px;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
}
|
||||
|
||||
.logout-container {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
width:100%;
|
||||
max-width:500px;
|
||||
padding:20px;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
.logout-header {
|
||||
text-align: center;
|
||||
margin-bottom: 24px;
|
||||
text-align:center;
|
||||
margin-bottom:24px;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
color: var(--text-primary);
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
margin: 16px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color:var(--text-primary);
|
||||
font-size:24px;
|
||||
font-weight:600;
|
||||
margin:16px 0;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 24px;
|
||||
border-radius: 8px;
|
||||
margin-right: 8px;
|
||||
width:24px;
|
||||
border-radius:8px;
|
||||
margin-right:8px;
|
||||
}
|
||||
|
||||
.logout-card {
|
||||
background: var(--card-card);
|
||||
padding: 24px;
|
||||
border-radius: 24px;
|
||||
text-align: center;
|
||||
margin-bottom: 16px;
|
||||
box-shadow: 0px 1px var(--shadow-blur) 0px var(--accent-shadow);
|
||||
background:var(--card-card);
|
||||
padding:24px;
|
||||
border-radius:24px;
|
||||
text-align:center;
|
||||
margin-bottom:16px;
|
||||
box-shadow:0px 1px var(--shadow-blur) 0px var(--accent-shadow);
|
||||
}
|
||||
|
||||
.logout-message {
|
||||
margin-bottom: 24px;
|
||||
margin-bottom:24px;
|
||||
}
|
||||
|
||||
.logout-message strong {
|
||||
font-size: 18px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
font-size:18px;
|
||||
color:var(--text-primary);
|
||||
font-weight:600;
|
||||
}
|
||||
|
||||
.redirect-timer {
|
||||
font-size: 48px;
|
||||
font-weight: 700;
|
||||
color: var(--accent-accent);
|
||||
margin-bottom: 24px;
|
||||
font-size:48px;
|
||||
font-weight:700;
|
||||
color:var(--accent-accent);
|
||||
margin-bottom:24px;
|
||||
}
|
||||
|
||||
.btn-continue {
|
||||
display: inline-block;
|
||||
padding: 12px 24px;
|
||||
background: var(--accent-accent);
|
||||
color: var(--button-secondaryFill);
|
||||
text-decoration: none;
|
||||
border-radius: 12px;
|
||||
font-weight: 600;
|
||||
transition: background 0.2s ease, color 0.2s ease;
|
||||
display:inline-block;
|
||||
padding:12px 24px;
|
||||
background:var(--accent-accent);
|
||||
color:var(--button-secondaryFill);
|
||||
text-decoration:none;
|
||||
border-radius:12px;
|
||||
font-weight:600;
|
||||
transition:background 0.2s ease,color 0.2s ease;
|
||||
}
|
||||
|
||||
.btn-continue:hover {
|
||||
background: var(--accent-secondary) !important;
|
||||
color: var(--button-secondaryFill) !important;
|
||||
background:var(--accent-secondary) !important;
|
||||
color:var(--button-secondaryFill) !important;
|
||||
}
|
||||
|
||||
.logout-footer {
|
||||
text-align: center;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.privacy-link {
|
||||
color: var(--text-secondary);
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
margin-bottom: 8px;
|
||||
transition: color 0.2s ease;
|
||||
color:var(--text-secondary);
|
||||
text-decoration:none;
|
||||
font-size:14px;
|
||||
display:inline-block;
|
||||
margin-bottom:8px;
|
||||
transition:color 0.2s ease;
|
||||
}
|
||||
|
||||
.privacy-link:hover {
|
||||
color: var(--text-primary);
|
||||
color:var(--text-primary);
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
@media (max-width:600px) {
|
||||
.logout-container {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.logout-card {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.redirect-timer {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 20px;
|
||||
}
|
||||
padding:16px;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
.logout-card {
|
||||
padding:20px;
|
||||
}
|
||||
.redirect-timer {
|
||||
font-size:36px;
|
||||
}
|
||||
.logo-text {
|
||||
font-size:20px;
|
||||
}
|
||||
.logo {
|
||||
width:20px;
|
||||
}
|
||||
}@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
opacity:0;
|
||||
transform:translateY(-10px);
|
||||
}
|
||||
to {
|
||||
opacity:1;
|
||||
transform:translateY(0);
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,17 @@
|
||||
(() => {
|
||||
function loadFonts() {
|
||||
// Create a new style element
|
||||
const style = document.createElement('style');
|
||||
style.textContent = `
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Round');
|
||||
`;
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
function transformLogoutPage() {
|
||||
// Get current theme and school ID from cookies
|
||||
const theme = cookieManager.get('themePreference') || localStorage.getItem('themePreference') || 'light-green';
|
||||
const instituteCode = cookieManager.get('schoolSubdomain');
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
|
||||
// Create new HTML structure
|
||||
const theme =
|
||||
cookieManager.get("themePreference") ||
|
||||
localStorage.getItem("themePreference") ||
|
||||
"light-green";
|
||||
const instituteCode = cookieManager.get("schoolSubdomain");
|
||||
document.documentElement.setAttribute("data-theme", theme);
|
||||
|
||||
const newHTML = `
|
||||
<div class="logout-container">
|
||||
<header class="logout-header">
|
||||
<p class="logo-text">
|
||||
<img src=${chrome.runtime.getURL('images/firka_logo.png')} alt="Firka" class="logo">
|
||||
<img src=${chrome.runtime.getURL("images/firka_logo.png")} alt="Firka" class="logo">
|
||||
Firka
|
||||
</p>
|
||||
</header>
|
||||
@@ -42,38 +34,33 @@
|
||||
</footer>
|
||||
</div>
|
||||
`;
|
||||
|
||||
// Replace body content
|
||||
|
||||
document.body.innerHTML = newHTML;
|
||||
|
||||
// Start countdown timer
|
||||
const timerElement = document.getElementById('automaticRedirectTimer');
|
||||
|
||||
const timerElement = document.getElementById("automaticRedirectTimer");
|
||||
let remainingTime = 5;
|
||||
|
||||
|
||||
const countdownInterval = setInterval(() => {
|
||||
remainingTime--;
|
||||
if (timerElement) {
|
||||
timerElement.textContent = remainingTime;
|
||||
}
|
||||
|
||||
|
||||
if (remainingTime <= 0) {
|
||||
clearInterval(countdownInterval);
|
||||
window.location.href = `https://${instituteCode}.e-kreta.hu`;
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// Handle manual redirect click
|
||||
document.querySelector('.btn-continue')?.addEventListener('click', (e) => {
|
||||
|
||||
document.querySelector(".btn-continue")?.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
clearInterval(countdownInterval);
|
||||
window.location.href = `https://${instituteCode}.e-kreta.hu`;
|
||||
});
|
||||
}
|
||||
// Load fonts immediately
|
||||
loadFonts();
|
||||
// Run the transformation
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', transformLogoutPage);
|
||||
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", transformLogoutPage);
|
||||
} else {
|
||||
transformLogoutPage();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user