This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"log": { | |
"version": "1.2", | |
"creator": { | |
"name": "PhantomJS", | |
"version": "1.9.0" | |
}, | |
"pages": [ | |
{ | |
"startedDateTime": "2014-01-21T22:51:06.795Z", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseQueryString(qs) { | |
if (!qs) { | |
return {}; | |
} | |
var chunks; | |
var result = []; | |
qs.split('&').forEach(function(val) { | |
chunks = val.split('='); | |
result.push({ | |
name: chunks[0], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. Install dotjs (https://addons.mozilla.org/en-US/firefox/addon/dotjs/ for Firefox or https://github.com/defunkt/dotjs for Chrome) | |
2. Put the contents of this file at ~/.js/sentry.dmz.phx1.mozilla.com.js | |
*/ | |
(function() { | |
function serialize(obj) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. Install dotjs (https://addons.mozilla.org/en-US/firefox/addon/dotjs/ for Firefox or https://github.com/defunkt/dotjs for Chrome) | |
2. Put the contents of this file at ~/.js/default.js | |
*/ | |
const API_URL = 'http://localhost:7000/'; | |
function getData(e, comment) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.throbber { | |
animation(unquote('.9s spin infinite steps(30)')); | |
border: 4px solid cyan; | |
border-left-color: transparent; | |
border-radius: 150px; | |
border-top-color: transparent; | |
bottom: 0; | |
display: block; | |
height: 33px; | |
left: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Usage: | |
<div class="throbber"><b></b><b></b><b></b></div> | |
*/ | |
.throbber { | |
position: absolute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function $(sel) { | |
if (!sel) { | |
return document.body; | |
} | |
var r = document.querySelectorAll(sel); | |
return r.length == 1 ? r[0] : Array.prototype.slice.call(r); | |
} | |
$.matches = function(el, sel) { | |
var matchesSelector = el.webkitMatchesSelector || el.mozMatchesSelector || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reqResponse(xhr) { | |
var data = xhr.responseText; | |
if ((xhr.getResponseHeader('Content-Type') || '').split(';', 1)[0].indexOf('json') !== -1) { | |
try { | |
return JSON.parse(data); | |
} catch(e) { | |
// Oh well. | |
return {}; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2011-2013 Fabien Cazenave, Mozilla. | |
* | |
* 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: | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!('CustomEvent' in window)) { | |
// For IE 9/10 lol. | |
function CustomEvent(eventName, params) { | |
params = params || {bubbles: false, cancelable: false, detail: undefined}; | |
var e = document.createEvent('CustomEvent'); | |
e.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail); | |
return e; | |
} | |
CustomEvent.prototype = window.CustomEvent.prototype; | |
window.CustomEvent = CustomEvent; |