PageSourceSearch

https://16bpp.net/static/scripts/main.js

js 16bpp.net collected 2026-10-02 06:42:28 UTC 1,340 bytes, 36 lines download raw bytes

1// When the user clicks "OK" on the privacy box messsage it will hide the box
2function privacy_ok() {
3  // Remove it from the DOM (i.e hide it)
4  var privacy_notice = document.getElementById('privacy-notice');
5  privacy_notice.parentNode.removeChild(privacy_notice);
6
7  // Set a cookie (for 7 days)
8  document.cookie = `privacy_ok=yes; path=/; max-age=${60 * 60 * 24 * 7}; SameSite=None; Secure;`;
9}
10
11// On a page load, check a coookie to see if the privacy message has been OK'd or
12// not.  If so, then we can remove the privacy notice.  If not, then we need to
13// show it.
14function maybe_show_privacy_notice() {
15  var privacy_notice = document.getElementById('privacy-notice');
16
17  // Check the cookie to see if they've OK'd the privacy messag
18  var privacy_ok = get_cookie('privacy_ok');
19  if (privacy_ok === 'yes')
20    privacy_notice.parentNode.removeChild(privacy_notice);    // Hide it
21  else
22    privacy_notice.style.opacity = "1.0";                     // Show it
23}
24
25
26/**
27 * Get the value of a cookie
28 * Source: https://gist.github.com/wpsmith/6cf23551dd140fb72ae7
29 * @param  {String} name  The name of the cookie
30 * @return {String}       The cookie value
31 */
32 function get_cookie(name) {
33	let value = `; ${document.cookie}`;
34	let parts = value.split(`; ${name}=`);
35	if (parts.length === 2) return parts.pop().split(';').shift();
36}

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.