PageSourceSearch

https://www.pressis.com/skin/scripts/s3/session.js

js pressis.com collected 2026-10-02 13:35:53 UTC 13,444 bytes, 244 lines download raw bytes

1var browsernm;
2var viewportWidth = $(window).width();
3var viewportHeight = $(window).height();
4var section;
5var zittl = "Increase Font Size", zottl = "Decrease Font Size", zrttl = "Reset Font Size";
6var uril1 = document.location.origin + '/';
7var factor = 0.8;
8var uril = uril1;
9
10function getFontSize(el) {
11    var fs = $(el).css('font-size');
12    if (!el.originalFontSize) el.originalFontSize = fs; //set dynamic property for later reset  
13    return parseFloat(fs);
14}
15inIframe();
16function inIframe() {
17    try {
18        if (window.self !== window.top) {
19            console.log('in frame');
20            $('body').addClass('custom trimmed framed');
21            $('#bodydata').addClass('custom trimmed');
22
23            $('#bodydata > .container').addClass('custom trimmed');
24            //--$('.p_magnifier').remove();
25        }
26    } catch (e) {
27        return true;
28    }
29}
30//alert();
31function getSession() {
32  //  alert(uril + "WebServices/UserAuth.asmx/GetSession");
33$.ajax({
34    type: "POST",
35    url: uril + "WebServices/UserAuth.asmx/GetSession",
36    data: "{'key':'UserName','lvl':'UserType'}",
37    contentType: "application/json; charset=utf-8",
38    dataType: "json",
39    success: function (data) {
40        //
41
42        var vlg = data.d.replace(" ", "").split("~");
43        //  alert(data.d.replace(" ", ""));
44        if (data.d.replace(" ", "") == "~~") {
45            //  var id = $('mylock
46
47        }
48        else {
49            //--alert(vlg[2].trim().length);
50
51            // alert(parent.$('.account-menu'));
52            //  var id = $('mylock
53            console.log('session load: ' + vlg[2]);
54            if (vlg[2].trim().length > 0) {
55                $('#myaclg.account-menu ul.myacz li').eq(0).html('<a id="myaca" href="' + uril + 'myaccountnew.aspx" style="text-overflow:ellipsis;" title="' + vlg[0] + '"><span class="col-sm-12"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">  <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg> </span><br /></a><br /><span class="ucattype">( ' + vlg[2] + ' )</span>');
56                $('#myaclg.account-menu ul.myacz li').eq(0).html('<a id="myaca" href="' + uril + 'myaccountnew.aspx" style="text-overflow:ellipsis;" title="' + vlg[0] + '"><span class="col-sm-12"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">  <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg> </span><br /></a><br /><span class="ucattype">( ' + vlg[2] + ' )</span>');
57                $('#myacsm.account-menu ul.myacz li').eq(0).html('<a id="myac" href="' + uril + 'myaccountnew.aspx" style="text-overflow:ellipsis;" title="' + vlg[0] + '"><span class="col-sm-12"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">  <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg> </span><br /></a><br /><span class="ucattype">( ' + vlg[2] + ' )</span>');
58                $('.account-menu ul.myacz').append('<li><a class="logout" href="' + uril + 'logout.aspx"return=' + document.location + '"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-unlock-fill" viewBox="0 0 16 16"><path d="M11 1a2 2 0 0 0-2 2v4a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V3a3 3 0 0 1 6 0v4a.5.5 0 0 1-1 0V3a2 2 0 0 0-2-2z"/></svg>Loggut</a></li>');
59
60                $('#mylockmob').after('<a id="myacamob" class="col-sm-6 ml-1" href="' + uril + 'myaccountnew.aspx" style="text-overflow:ellipsis;" title="' + vlg[0] + '"><span class="col-sm-12"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">  <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"></path></svg> <br /><span class="ucattype">( ' + vlg[2] + ' )</span></a>');
61                $('#mylockmob').remove();
62                $('#mylockoutmob').after('<a class="logoutmob" href="' + uril + 'logout.aspx"return=' + document.location + '"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-unlock-fill" viewBox="0 0 16 16"><path d="M11 1a2 2 0 0 0-2 2v4a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V3a3 3 0 0 1 6 0v4a.5.5 0 0 1-1 0V3a2 2 0 0 0-2-2z"/></svg></a>');
63                $('#mylockoutmob').remove();
64                //$('#myacamob').after('<a class="logout col-sm-3" href="' + uril + 'logout.aspx"return=' + document.location + '"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-unlock-fill" viewBox="0 0 16 16"><path d="M11 1a2 2 0 0 0-2 2v4a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V3a3 3 0 0 1 6 0v4a.5.5 0 0 1-1 0V3a2 2 0 0 0-2-2z"/></svg><br />logout</a>');
65                if ($('#toplog').length > 0) {
66                    console.log('top menu is there...');
67                    $('#myaclg.account-menu ul#toplog li').remove();
68                    $('#myaclg.account-menu ul#toplog').html('<li><a id="myacatop" href="' + uril + 'myaccountnew.aspx" style="text-overflow:ellipsis;" title="' + vlg[0] + '"><span class="col-sm-12"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-pers
68on-fill" viewBox="0 0 16 16">  <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg> </span><br /></a>&nbsp;<span class="ucattype">( ' + vlg[2] + ' )</span></li>');
69                    // $('#myaclg.account-menu ul#toplog li#toploginr').eq(1).remove();
70                 //   $('.account-menu ul#toplog').append('<li><a class="logout" href="' + uril + 'logout.aspx"return=' + document.location + '"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-unlock-fill" viewBox="0 0 16 16"><path d="M11 1a2 2 0 0 0-2 2v4a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V3a3 3 0 0 1 6 0v4a.5.5 0 0 1-1 0V3a2 2 0 0 0-2-2z"/></svg></a></li>');
71
72                }
73
74
75
76            }
77            else {
78
79                $('#myaclg.account-menu ul.myacz li').eq(0).html('<a id="myaca" href="' + uril + 'myaccountnew.aspx" style="text-overflow:ellipsis;" title="' + vlg[0] + '"><span class="col-sm-12"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">  <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg> </span><br /></a><br /><span class="ucattype">( ' + vlg[2] + ' )</span>');
80                $('#myacsm.account-menu ul.myacz li').eq(0).html('<a id="myac" href="' + uril + 'myaccountnew.aspx" style="text-overflow:ellipsis;" title="' + vlg[0] + '"><span class="col-sm-12"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">  <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg> </span><br /></a><br /><span class="ucattype">( ' + vlg[2] + ' )</span>');
81                $('.account-menu ul.myacz').append('<li><a class="logout" href="' + uril + 'logout.aspx"return=' + document.location + '"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-unlock-fill" viewBox="0 0 16 16"><path d="M11 1a2 2 0 0 0-2 2v4a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V3a3 3 0 0 1 6 0v4a.5.5 0 0 1-1 0V3a2 2 0 0 0-2-2z"/></svg>Loggut</a></li>');
82                if ($('#toplog').length > 0) {
83                    console.log('top menu is there...');
84                    $('#myaclg.account-menu ul#toplog li').remove();
85                    $('#myaclg.account-menu ul#toplog').html('<li><a id="myacatop" href="' + uril + 'myaccountnew.aspx" style="text-overflow:ellipsis;" title="' + vlg[0] + '"><span class="col-sm-12"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">  <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg> </span><br /></a>&nbsp;<span class="ucattype">( ' + vlg[2] + ' )</span></li>');
86                    // $('#myaclg.account-menu ul#toplog li#toploginr').eq(1).remove();
87                   // $('.account-menu ul#toplog').append('<li><a class="logout" href="' + uril + 'logout.aspx"return=' + document.location + '"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-unlock-fill" viewBox="0 0 16 16"><path d="M11 1a2 2 0 0 0-2 2v4a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V3a3 3 0 0 1 6 0v4a.5.5 0 0 1-1 0V3a2 2 0 0 0-2-2z"/></svg></a></li>');
88
89                }
90            }
91            if (window.self === window.top) {
92                //  parent.$('.account-menu ul li').eq(0).html('hi');
93                //  parent.$('.account-menu ul').append('<li><a class="logout" href="' + uril + 'logout.aspx"return=' + document.location + '"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-unlock-fill" viewBox="0 0 16 16"><path d="M11 1a2 2 0 0 0-2 2v4a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V3a3 3 0 0 1 6 0v4a.5.5 0 0 1-1 0V3a2 2 0 0 0-2-2z"/></svg></a></li>');
94            }
95            //alert(vlg[1]);
96            if (vlg[1] == "0") {
97
98
99
100            }
101            else {
102                $('body').remove("adminbar");
103                $('.editbutton').addClass('hide');
104
105            }
106        }
107
108        $('.transbg').addClass('hide');
109        $('.loginbox').addClass('hide');
110        $('.pageeditordiv').addClass('hide');
111
112    }, error: function (data, status) {
113        //--  alert(data.d);
114        // alert(status);
115    }
116});
117}
118$('a.editz').on('click', function () {
119    // alert();
120    var idz = $(this).parent().attr('id');
121    //alert($(this).after('<iframe name="editt" id="editt" scrolling="yes" frameborder="0"></iframe>'));
122    $(this).after('<iframe name="editt" id="editt" scrolling="yes" frameborder="0"></iframe>');
123    top.frames["editt"].location.href = uril + "editor.aspx?secid=" + idz;
124    return false;
125});
126
127$('a.editl').on('click', function () {
128    var idz = $(this).parent().attr('id');
129    //alert($(this).after('<iframe name="editt" id="editt" scrolling="yes" frameborder="0"></iframe>'));
130    $('#UpdatePanel2').append('<iframe name="editt" id="editt" scrolling="yes" frameborder="0"></iframe>');
131    top.frames["editt"].location.href = uril + "editor.aspx?secid=login";
132    return false;
133   
134});
135
136//--$('html').prepend('<div class="p_magnifier"><a id="p_zoomin" title="' + zittl + '" href="javascript:void(0);">P+</a><a id="p_zoomreset" title="' + zrttl + '" href="javascript:void(0);">P</a><a id="p_zoomou" title="' + zottl + '" href="javascript:void(0);">P-</a></div>');
137
138$('#p_zoomin').on('click', function () {
139    //alert();
140    increaseFont();
141});
142
143$('#p_zoomreset').on('click', function () {
144    resetFont();
145});
146
147$('#p_zoomou').on('click', function () {
148    decreaseFont();
149});
150
151function resetFont() {
152    setFontSize();
153}
154
155function increaseFont() {
156
157    setFontSize(1 / factor);
158}
159
160function decreaseFont() {
161    setFontSize(factor);
162}
163
164function setFontSize(fact) {
165    if (section == null)
166        section = $('body').find('*')
167            .filter(
168                function () {
169                    return $(this).clone()
170                        .children()
171                        .remove()
172                        .end()
173                        .text().trim().length > 0;
174                }); //filter -> exclude all elements without text
175
176    section.each(function () {
177        var newsize = fact ? getFontSize(this) * fact : this.originalFontSize;
178        if (newsize) $(this).css('font-size', newsize);
179    });
180}
181
182$('.p_magnifier').on('mouseenter', function () {
183    $('.p_magnifier').animate({
184        top: '0px'
185    }, 200, function () {
186    });
187
188});
189
190$('.p_magnifier').on('mouseleave', function () {
191    $('.p_magnifier').animate({
192        top: '-28px'
193    }, 200, function () {
194    });
195
196});
197
198
199//#region load package
200
201if ($('input[name^="pressispakkerkontrol"]').length > 0) {
202    // alert($('input[name^="pressispakkerkontrol"]').attr('name'));
203
204    if ($("link[href$='custom.css']").length > 0) {
205        var l = $("link[href$='custom.css']").attr('href').split('/').length;
206        var skin = $("link[href$='custom.css']").attr('href').split('/')[l - 2];
207
208        var cuspath = document.location.origin + "/skin/scripts/s2/" + skin + "/custom.js";
209
210        $.ajax({
211            url: cuspath,
212            type: 'HEAD',
213            error: function () {
214
215            },
216            success: function () {
217
218
219                var par = $('input[name^="pressispakkerkontrol"]').parent()
220
221                $('<script />', { src: cuspath }).appendTo(par).ready(function () { });
222            }
223        });
224    }
225}
226
227//#endregion
228
229$(document).ready(function () {
230   // $('.container').removeClass('slim');
231    
232        getSession();
233});
234
235
236
237
238
239
240
241
242
243
244

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.