PageSourceSearch

https://cloudinary.com/wp-content/themes/cld-2021/assets/js/alert-bar.js?ver=1.0.0

js cloudinary.com collected 2026-09-24 06:03:33 UTC 1,593 bytes, 55 lines download raw bytes

1function get_current_page_id() {
2  var page_body = jQuery('body');
3  var id = 0;
4  if(jQuery('body').hasClass('page')) {
5    var classList = page_body.attr('class').split(/\s+/);
6    $.each(classList, function(index, item) {
7      if (item.indexOf('page-id') >= 0) {
8        var item_arr = item.split('-');
9        id =  item_arr[item_arr.length -1];
10        return false;
11      }
12    });
13  }
14  return id;
15}
16function close_alert_bar(page_id) {
17  //Set Cookie
18  var days = 5;
19  var name = 'alert-bar-'+page_id;
20  var value = 'closed';
21  var date = new Date();
22  date.setTime(date.getTime() + (days*24*60*60*1000));
23  expires = "; expires=" + date.toUTCString();
24  document.cookie = name + "=" + (value || "")  + expires + "; path=/;SameSite=Lax";
25
26  //Close
27  jQuery('#alert-bar').slideUp('slow', function() {
28	  jQuery('#alert-bar').remove();
29  });
30}
31function readCookie(name) {
32	var nameEQ = name + "=";
33	var ca = document.cookie.split(';');
34	for(var i=0;i < ca.length;i++) {
35			var c = ca[i];
36			while (c.charAt(0)==' ') c = c.substring(1,c.length);
37			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
38	}
39	return null;
40}
41function eraseCookie(name) {
42  document.cookie = name +'=;Path=/;Expires=Thu, 01 Jan 1970 00:00:01 GMT;'
43}
44if(jQuery('#alert-bar').length) {
45  var page_id = jQuery('#alert-bar').attr('data-page-id');
46  if(readCookie('alert-bar-'+page_id)) {
47    jQuery('#alert-bar').remove();
48  }
49} else {
50  var page_id = get_current_page_id();
51  if(readCookie('alert-bar-'+page_id)) {
52    console.log('no alert bar');
53    eraseCookie('alert-bar-'+page_id);
54  }
55}

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.