$68 GRAYBYTE WORDPRESS FILE MANAGER $88

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/var/softaculous/sitepad/editor/site-data/plugins/siteseo-pro/assets/js/

HOME
Current File : /var/softaculous/sitepad/editor/site-data/plugins/siteseo-pro/assets/js//index-highlight.js
/***
The MIT License (MIT)

Copyright (c) luyilin <[email protected]> (https://github.com/luyilin)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
***/

const defaultColors = {
  keyColor: '#9CCC65',
  numberColor: 'lightskyblue',
  stringColor: 'lightcoral',
  trueColor: 'lightseagreen',
  falseColor: '#f66578',
  nullColor: 'cornflowerblue'
}

const entityMap = {
  '&': '&amp;',
  '<': '&lt;',
  '>': '&gt;',
  '"': '&quot;',
  "'": '&#39;',
  '`': '&#x60;',
  '=': '&#x3D;'
};

function escapeHtml (html){
  return String(html).replace(/[&<>"'`=]/g, function (s) {
      return entityMap[s];
  });
}

function highlightJson (json, colorOptions = {}) {
  const valueType = typeof json
  if (valueType !== 'string') {
    json = JSON.stringify(json, null, 2) || valueType
  }
  let colors = Object.assign({}, defaultColors, colorOptions)
  json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')
  return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+]?\d+)?)/g, (match) => {
    let color = colors.numberColor
    let style = ''
    if (/^"/.test(match)) {
      if (/:$/.test(match)) {
        color = colors.keyColor
      } else {
        color = colors.stringColor;
        match = '"' + escapeHtml(match.substr(1, match.length - 2)) + '"';
        style = 'word-wrap:break-word;white-space:pre-wrap;';
      }
    } else {
      color = /true/.test(match)
        ? colors.trueColor
        : /false/.test(match)
          ? colors.falseColor
          : /null/.test(match)
            ? colors.nullColor
            : color
    }
    return `<span style="${style}color:${color}">${match}</span>`
  })
}

document.addEventListener("DOMContentLoaded", () => {
	let jsonElement = document.getElementById("siteseo_highlighter");
	if(jsonElement && jsonElement.textContent){
		try{
			jsonElement.innerHTML = highlightJson(JSON.parse(jsonElement.textContent));
		} catch(e){
			console.log("Error parsing JSON for highlighting:", e);
		}
	}
});


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
21 Feb 2026 2.55 AM
root / root
0755
breadcrumbs
--
21 Feb 2026 2.55 AM
root / root
0755
admin.js
41.618 KB
18 Feb 2026 11.32 PM
root / root
0644
block.js
1.457 KB
18 Feb 2026 11.32 PM
root / root
0644
index-highlight.js
2.354 KB
18 Feb 2026 11.32 PM
root / root
0644
metabox.js
26.857 KB
18 Feb 2026 11.32 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF