PageSourceSearch

https://www.thetigernutcompany.co.uk/wp-content/themes/organics/fw/js/core.debug.js

js thetigernutcompany.co.uk collected 2026-10-06 18:05:02 UTC 2,317 bytes, 49 lines download raw bytes

1/**
2 * AxiomThemes Framework: Debug utilities
3 *
4 * @package	axiomthemes
5 * @since	axiomthemes 1.0
6 */
7
8
9function organics_debug_object(obj) {
10	"use strict";
11	var html = arguments[1] ? arguments[1] : false;				// Tags decorate
12	var recursive = arguments[2] ? arguments[2] : false;		// Show inner objects (arrays)
13	var showMethods = arguments[3] ? arguments[3] : false;		// Show object's methods
14	var level = arguments[4] ? arguments[4] : 0;				// Nesting level (for internal usage only)
15	var dispStr = "";
16	var addStr = "";
17	if (level>0) {
18		dispStr += (obj===null ? "null" : typeof(obj)) + (html ? "\n<br />" : "\n");
19		addStr = organics_replicate(html ? '&nbsp;' : ' ', level*2);
20	}
21	if (obj!==null) {
22		for (var prop in obj) {
23			if (!showMethods && typeof(obj[prop])=='function')	// || prop=='innerHTML' || prop=='outerHTML' || prop=='innerText' || prop=='outerText')
24				continue;
25			if (recursive && (typeof(obj[prop])=='object' || typeof(obj[prop])=='array') && obj[prop]!=obj)
26				dispStr += addStr + (html ? "<b>" : "")+prop+(html ? "</b>" : "")+'='+organics_debug_object(obj[prop], html, recursive, showMethods, level+1);
27			else
28				dispStr += addStr + (html ? "<b>" : "")+prop+(html ? "</b>" : "")+'='+(typeof(obj[prop])=='string' ? '"' : '')+obj[prop]+(typeof(obj[prop])=='string' ? '"' : '')+(html ? "\n<br />" : "\n");
29		}
30	}
31	return dispStr;	//decodeURI(dispStr);
32}
33
34function organics_debug_log(s) {
35	if (ORGANICS_GLOBALS['user_logged_in']) {
36		if (jQuery('#debug_log').length == 0) {
37			jQuery('body').append('<div id="debug_log"><span id="debug_log_close" onclick="jQuery(\'#debug_log\').hide();">x</span><div id="debug_log_content"></div></div>'); 
38		}
39		jQuery('#debug_log_content').append('<br>'+s);
40		jQuery('#debug_log').show();
41	}
42}
43
44if (window.dcl===undefined) function dcl(s) { console.log(s); }
45if (window.dco===undefined) function dco(s,h,r) { console.log(organics_debug_object(s,h,r)); }
46if (window.dal===undefined) function dal(s) { if (ORGANICS_GLOBALS['user_logged_in']) alert(s); }
47if (window.dao===undefined) function dao(s,h,r) { if (ORGANICS_GLOBALS['user_logged_in']) alert(organics_debug_object(s,h,r)); }
48if (window.ddl===undefined) function ddl(s) { organics_debug_log(s); }
49if (window.ddo===undefined) function ddo(s,h,r) { organics_debug_log(organics_debug_object(s,h,r)); }

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.