PageSourceSearch

https://www.haugesund.kommune.no/script/js/login.e9fcj.js

js haugesund.kommune.no collected 2026-09-24 09:57:14 UTC 1,511 bytes, 37 lines download raw bytes

1(function() {
2document.addEventListener("DOMContentLoaded", function (event) {
3    var loginBar = document.querySelector('.js-cms-direkteredigering-login-bar');
4    var loginButton = document.querySelector('.js-cms-direkteredigering-login-button');
5    var currentUrl = encodeURIComponent(window.location.href);
6
7    if (loginBar) {
8        window.onscroll = function () {
9            var scrollHeight, totalHeight;
10            scrollHeight = document.body.scrollHeight;
11            totalHeight = window.scrollY + window.innerHeight;
12
13            if (totalHeight >= scrollHeight) {
14                loginBar.className = 'cms-direkteredigering-login-bar cms-direkteredigering-login-bar--active js-cms-direkteredigering-login-bar';
15            } else {
16                loginBar.className = 'cms-direkteredigering-login-bar js-cms-direkteredigering-login-bar';
17            }
18        };
19    }
20
21    if (currentUrl !== null && currentUrl !== '' && window.location.href.indexOf("?") >= 0) {
22        currentUrl += "&direkte=edit";
23    } else if (currentUrl !== null && currentUrl !== '') {
24        currentUrl += "?direkte=edit";
25    }
26
27    if (loginButton) {
28        loginButton.addEventListener('click', function () {
29            window.location = '/login?returnUrl=' + currentUrl;
30        });
31        // Iphone 7, Safari. 
32        loginButton.addEventListener('touchstart', function () {
33            window.location = '/login?returnUrl=' + currentUrl;
34        });
35    }
36});
37})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.