Skip to content

Instantly share code, notes, and snippets.

View dexygen's full-sized avatar

George Jempty dexygen

  • Dexygen
  • Carrollton, TX (suburb of Dallas)
View GitHub Profile
@dexygen
dexygen / meek.js
Last active December 20, 2015 03:09
Genuinely Unobtrusive Javascript
(function(scope) {
function destroyAutoGlobals(options) {
var allElements = document.getElementsByTagName("*"), elementId;
for (var i=allElements.length; i--; ) {
elementId = allElements[i].id;
if (elementId && window[elementId] instanceof HTMLElement) {
options && options.verbose && console.log('Destroying window["' + elementId + '"]');
window[elementId] = null;
@eriwen
eriwen / qunit-to-junit-for-phantom.js
Created November 14, 2011 02:33
JUnit XML output for QUnit tests compatible with PhantomJS 1.3
var module, moduleStart, testStart, testCases = [],
current_test_assertions = [];
console.log('<?xml version="1.0" encoding="UTF-8"?>');
console.log('<testsuites name="testsuites">');
QUnit.begin = function() {
// That does not work when invoked in PhantomJS
}
QUnit.moduleStart = function(context) {
moduleStart = new Date();