diff --git a/._TODO.txt b/._TODO.txt deleted file mode 100755 index 415539b..0000000 Binary files a/._TODO.txt and /dev/null differ diff --git a/._about.html b/._about.html deleted file mode 100755 index 415539b..0000000 Binary files a/._about.html and /dev/null differ diff --git a/._assets b/._assets deleted file mode 100755 index 415539b..0000000 Binary files a/._assets and /dev/null differ diff --git a/._contact.html b/._contact.html deleted file mode 100755 index 415539b..0000000 Binary files a/._contact.html and /dev/null differ diff --git a/._extras.html b/._extras.html deleted file mode 100755 index 415539b..0000000 Binary files a/._extras.html and /dev/null differ diff --git a/._index.html b/._index.html deleted file mode 100755 index 5d2e803..0000000 Binary files a/._index.html and /dev/null differ diff --git a/._login.html b/._login.html deleted file mode 100755 index 415539b..0000000 Binary files a/._login.html and /dev/null differ diff --git a/._new.html b/._new.html deleted file mode 100755 index 415539b..0000000 Binary files a/._new.html and /dev/null differ diff --git a/._register.html b/._register.html deleted file mode 100755 index 415539b..0000000 Binary files a/._register.html and /dev/null differ diff --git a/._scripts b/._scripts deleted file mode 100755 index 415539b..0000000 Binary files a/._scripts and /dev/null differ diff --git a/._styles b/._styles deleted file mode 100755 index 415539b..0000000 Binary files a/._styles and /dev/null differ diff --git a/._vnos.html b/._vnos.html deleted file mode 100755 index 415539b..0000000 Binary files a/._vnos.html and /dev/null differ diff --git a/about.html b/about.html index 9a21c1b..22d3442 100755 --- a/about.html +++ b/about.html @@ -24,7 +24,7 @@


- Glavna stran + Glavna stran

diff --git a/assets/._1.jpg b/assets/._1.jpg deleted file mode 100755 index 415539b..0000000 Binary files a/assets/._1.jpg and /dev/null differ diff --git a/assets/._2.jpg b/assets/._2.jpg deleted file mode 100755 index 415539b..0000000 Binary files a/assets/._2.jpg and /dev/null differ diff --git a/assets/._3.jpg b/assets/._3.jpg deleted file mode 100755 index 415539b..0000000 Binary files a/assets/._3.jpg and /dev/null differ diff --git a/contact.html b/contact.html index c683135..cf13056 100755 --- a/contact.html +++ b/contact.html @@ -20,7 +20,7 @@

- Glavna stran + Glavna stran

diff --git a/extras.html b/extras.html index 5123449..b6c5599 100755 --- a/extras.html +++ b/extras.html @@ -26,7 +26,7 @@

- Glavna stran + Glavna stran

To je skrit del strani. Kliknite gumb zgoraj, da ga prikažete ali skrijete.

diff --git a/login.html b/login.html index 896f660..4901d98 100755 --- a/login.html +++ b/login.html @@ -30,11 +30,11 @@
-

Še nimate računa? Registrirajte se

+

Še nimate računa? Registrirajte se

- Glavna stran + Glavna stran

diff --git a/new.html b/new.html index 8b972fe..818294a 100755 --- a/new.html +++ b/new.html @@ -19,7 +19,7 @@

- Glavna stran + Glavna stran

-

Že imate račun? Prijavite se

+

Že imate račun? Prijavite se

- Glavna stran + Glavna stran

diff --git a/scripts/._contact.js b/scripts/._contact.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._contact.js and /dev/null differ diff --git a/scripts/._extras.js b/scripts/._extras.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._extras.js and /dev/null differ diff --git a/scripts/._index.js b/scripts/._index.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._index.js and /dev/null differ diff --git a/scripts/._login.js b/scripts/._login.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._login.js and /dev/null differ diff --git a/scripts/._main.js b/scripts/._main.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._main.js and /dev/null differ diff --git a/scripts/._new.js b/scripts/._new.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._new.js and /dev/null differ diff --git a/scripts/._preload.js b/scripts/._preload.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._preload.js and /dev/null differ diff --git a/scripts/._register.js b/scripts/._register.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._register.js and /dev/null differ diff --git a/scripts/._vnos.js b/scripts/._vnos.js deleted file mode 100755 index 415539b..0000000 Binary files a/scripts/._vnos.js and /dev/null differ diff --git a/scripts/contact.js b/scripts/contact.js index 03b9cd4..ff62c36 100755 --- a/scripts/contact.js +++ b/scripts/contact.js @@ -6,6 +6,10 @@ const form = `

Vaše sporočilo bo vezano na vaš račun, zato vam bomo lahko odgovorili na e-pošto, ki ste jo vnesli ob registraciji.

`; +function navigateTop(page) { + window.open(new URL(page, window.location.href).href, "_top"); +} + document.addEventListener("DOMContentLoaded", () => { const contactFormContainer = document.getElementById("contact-form-container"); // Najdi cookie "token" v cookies @@ -35,14 +39,14 @@ document.addEventListener("DOMContentLoaded", () => { console.log("Success:", data); document.getElementById("contact-form").innerHTML = `

Hvala za vaše sporočilo! Odgovorili vam bomo v najkrajšem možnem času.

`; setTimeout(() => { - window.location.href = "index.html"; + navigateTop("index.html"); }, 3000); }) .catch((error) => { console.error("Error:", error); document.getElementById("contact-form").innerHTML = `

Prišlo je do napake pri pošiljanju vašega sporočila. Prosimo, poskusite znova pozneje.

`; setTimeout(() => { - window.location.href = "index.html"; + navigateTop("index.html"); }, 3000); }); diff --git a/scripts/index.js b/scripts/index.js index e6b20bc..a51d05a 100755 --- a/scripts/index.js +++ b/scripts/index.js @@ -1,5 +1,5 @@ function getSpecific(kljuc) { - window.location.href = `vnos.html?kljuc=${kljuc}`; + window.open(new URL(`vnos.html?kljuc=${kljuc}`, window.location.href).href, "_top"); } function getLast() { @@ -101,7 +101,7 @@ document.getElementById("search-input").addEventListener("keydown", (event) => { }); function addEntry() { - window.location.href = "new.html"; + window.open(new URL("new.html", window.location.href).href, "_top"); } // DELAJ DELAJ diff --git a/scripts/login.js b/scripts/login.js index 6ffffeb..1a388ac 100755 --- a/scripts/login.js +++ b/scripts/login.js @@ -4,6 +4,10 @@ const errmsg = `
`; +function navigateTop(page) { + window.open(new URL(page, window.location.href).href, "_top"); +} + document.getElementById("login-form").addEventListener("submit", async function(event) { event.preventDefault(); @@ -14,6 +18,7 @@ document.getElementById("login-form").addEventListener("submit", async function( const username = document.getElementById("username").value; const password = document.getElementById("password").value; const form = document.getElementById("login-form"); + const cookiePath = window.location.pathname.replace(/[^/]+$/, "/"); try { const response = await fetch("https://ssnj.dcrubro.com/api/prijava", { @@ -28,10 +33,10 @@ document.getElementById("login-form").addEventListener("submit", async function( if (response.status === 200) { // Nastavi cookie, 3 ure veljaven - document.cookie = `token=${data.token}; max-age=${3 * 60 * 60}; path=/; secure; samesite=strict`; - document.cookie = `username=${username}; max-age=${3 * 60 * 60}; path=/; secure; samesite=strict`; + document.cookie = `token=${data.token}; max-age=${3 * 60 * 60}; path=${cookiePath}; samesite=strict`; + document.cookie = `username=${username}; max-age=${3 * 60 * 60}; path=${cookiePath}; samesite=strict`; - window.location.href = "index.html"; + navigateTop("index.html"); return; } diff --git a/scripts/main.js b/scripts/main.js index 629c87e..9a22145 100755 --- a/scripts/main.js +++ b/scripts/main.js @@ -2,12 +2,12 @@ const headerHtml = `