summaryrefslogtreecommitdiffstats
path: root/_posts/2021-04-09-kako-se-znebiti-NLB-avtentikatorja.html
diff options
context:
space:
mode:
authorsijanec <anton@sijanec.eu>2021-04-11 10:58:59 +0200
committersijanec <anton@sijanec.eu>2021-04-11 10:58:59 +0200
commitcdd44938139daa15c440c5f29c226ea42ba7ece0 (patch)
treeca3fc0a7bec354d8478409ce3df81e6d30f9d5bc /_posts/2021-04-09-kako-se-znebiti-NLB-avtentikatorja.html
parentmanjše urejanje stiliziranje blokov kode (diff)
downloadsijanec.eu-cdd44938139daa15c440c5f29c226ea42ba7ece0.tar
sijanec.eu-cdd44938139daa15c440c5f29c226ea42ba7ece0.tar.gz
sijanec.eu-cdd44938139daa15c440c5f29c226ea42ba7ece0.tar.bz2
sijanec.eu-cdd44938139daa15c440c5f29c226ea42ba7ece0.tar.lz
sijanec.eu-cdd44938139daa15c440c5f29c226ea42ba7ece0.tar.xz
sijanec.eu-cdd44938139daa15c440c5f29c226ea42ba7ece0.tar.zst
sijanec.eu-cdd44938139daa15c440c5f29c226ea42ba7ece0.zip
Diffstat (limited to '_posts/2021-04-09-kako-se-znebiti-NLB-avtentikatorja.html')
-rw-r--r--_posts/2021-04-09-kako-se-znebiti-NLB-avtentikatorja.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/_posts/2021-04-09-kako-se-znebiti-NLB-avtentikatorja.html b/_posts/2021-04-09-kako-se-znebiti-NLB-avtentikatorja.html
index 0e11591..03769f2 100644
--- a/_posts/2021-04-09-kako-se-znebiti-NLB-avtentikatorja.html
+++ b/_posts/2021-04-09-kako-se-znebiti-NLB-avtentikatorja.html
@@ -135,7 +135,7 @@ endofbody: <script src=//cdn.sijanec.eu/etc/npm/node_modules/@otplib/preset-brow
Če bi bili sedaj na posebni povezavi, s katero generirate žetone, bi se tukaj izpisal trenutno veljaven žeton. Če ste na tej povezavi, očitno nekaj ne deluje.
</p>
<script>
- var h;
+ var h = "";
window.onhashchange = function () {
var x = window.location.hash.split("=").pop();
if (x != "") {
@@ -146,9 +146,12 @@ endofbody: <script src=//cdn.sijanec.eu/etc/npm/node_modules/@otplib/preset-brow
};
document.addEventListener("DOMContentLoaded", function () {
window.otplib.hotp.options = {digits: 8, algorithm: "sha256", encoding: "hex"};
- h = window.location.hash.split("=").pop();
- if (h != "")
+ var x = window.location.hash.split("=").pop();
+ if (x != "") {
+ window.location.hash = ""; /* da ni v URLju, če kdo pride mimo in slika ekran */
+ h = x;
document.getElementById("generator-otp-žetonov").scrollIntoView();
+ }
});
setInterval(function() {
if (h != "") {