This file contains 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
var util = require('util'); | |
exports.assertion = function(selector, msg) { | |
var ancestors = selector; | |
// If the selector comes from a section of a page object | |
// selector will be an array of objects starting from the outermost | |
// ancestor (section), and ending with the element | |
// Join their selectors in order | |
// Should probably look into getting this added to core |
This file contains 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
/** | |
* Progressive Enahncement to use SVG sprites with PNG fallback for IE6+7 | |
* | |
* The trick: | |
* Legacy IE does not support rgba values. | |
* By defining a rgba background color together with the | |
* SVG background image for all modern browsers, legacy IE | |
* will ignore the SVG and use the | |
* first background definition containing the fallback PNG | |
* |
This file contains 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
var db; | |
var indexedDB = window.indexedDB || window.webkitIndexedDB | |
|| window.mozIndexedDB || window.msIndexedDB; | |
var IDBTransaction = window.IDBTransaction || | |
window.webkitIDBTransaction; |
This file contains 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
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
This file contains 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
var qs = (function(a) { | |
if (a == "") return {}; | |
var b = {}; | |
for (var i = 0; i < a.length; ++i) | |
{ | |
var p=a[i].split('='); | |
if (p.length != 2) continue; | |
b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " ")); | |
} | |
return b; |