Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

/**
* Works in Chrome, Firefox, MSIE, Opera and Safari.
*/
function onDOMContentLoaded( event ) {
if( event ) {
document.removeEventListener( event.type, onDOMContentLoaded, false );
}
document.onreadystatechange = null;
// For testing purposes.
alert( "DOM Content Loaded" );
@dalethedeveloper
dalethedeveloper / gist:5041690
Last active December 14, 2015 06:19 — forked from anonymous/gist:5041678
Enable debugging on a WordPress site for your session only. Uses a simple URL Variable thats only security is obscurity. Replaces existing WP_DEBUG definition in your wp-config.php
// Replace existing definition in your wp-config.php
// define('WP_DEBUG',false);
if( !isset($_COOKIE['likeaboss']) and isset($_GET['likeaboss']) )
setcookie('likeaboss',($_GET['likeaboss']=='fosho'?'fosho':false), time()+3600);
define('WP_DEBUG',((isset($_COOKIE['likeaboss']) and $_COOKIE['likeaboss']=='fosho')?true:false));
// Drop ?likeaboss=fosho on your URL to enable WP_DEBUG for a bit