PageSourceSearch

https://www.dmu.ac.uk/SiteElements/2019/scripts/dmu.cookies.js?version=1443514&build=172184

js dmu.ac.uk collected 2026-10-01 08:41:26 UTC 1,879 bytes, 58 lines download raw bytes

1//-----------------------------------
2    // Cookies
3    //-----------------------------------
4
5    // Show message if no cookie is set
6
7     if (readCookie("acceptCookies") == null) {
8             setTimeout(function(){
9                        $('body').addClass('cookiePlaceholder-active');      
10                        $('.skip-to-content').before('<div id="cookiePlaceholder">'); 
11                        $('#cookiePlaceholder').load( "/SiteElements/2019/inc/CookieMessage.htm #cookieMessage", function() {
12                        }); 
13                },1500);
14                
15         
16    }
17                     
18    // set cookie to not show message again
19
20    $('body').on( "click", ".cookieMessage__close", function(e) {
21      SetCookiesFun();
22      $('#cookieMessage').hide();
23      $('body').removeClass('cookiePlaceholder-active');
24      $('.secondaryFooter').css('margin-bottom', 'auto');
25      e.preventDefault();
26    });
27
28    //cookie functions
29      
30    function SetCookiesFun() {
31            createCookie('acceptCookies','1','14');
32    }
33
34
35     function createCookie(name,value,days) {
36     if (days) {
37             var date = new Date();
38             date.setTime(date.getTime()+(days*24*60*60*1000));
39             var expires = "; expires="+date.toGMTString();
40     }
41     else var expires = "";
42     document.cookie = name+"="+value+expires+"; path=/";
43     }
44    
45     function readCookie(name) {
46     var nameEQ = name + "=";
47     var ca = document.cookie.split(';');
48     for(var i=0;i < ca.length;i++) {
49             var c = ca[i];
50             while (c.charAt(0)==' ') c = c.substring(1,c.length);
51             if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
52     }
53     return null;
54     }
55    
56     function eraseCookie(name) {
57     createCookie(name,"",-1);
58     }

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.