A Pen by Trevor Clarke on CodePen.
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 parseQuery() { | |
var s = window.location.search.substring(1); | |
return (typeof s === 'string') ? {} : JSON.parse('{\"' + decodeURI(s).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"') + '\"}'); | |
} |
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
input[type=range]{ | |
-webkit-appearance: none; | |
border: none; | |
&::-webkit-slider-runnable-track { | |
width: 250px; | |
height: 2px; | |
background: #CCC; | |
border: none; | |
border-radius: 1px; |
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
var emulatorDeviceList = [ | |
{ name: 'Amazon Kindle Fire HDX', width: 2560, height: 1600, ratio: 2 }, | |
{ name: 'Apple iPad', width: 1024, height: 768, ratio: 2 }, | |
{ name: 'Apple iPad Mini', width: 1024, height: 768, ratio: 1 }, | |
{ name: 'Apple iPhone 4', width: 320, height: 480, ratio: 2 }, | |
{ name: 'Apple iPhone 5', width: 320, height: 568, ratio: 2 }, | |
{ name: 'Apple iPhone 6', width: 375, height: 667, ratio: 2 }, | |
{ name: 'Apple iPhone 6 Plus', width: 414, height: 736, ratio: 3 }, | |
{ name: 'BlackBerry PlayBook', width: 1024, height: 600, ratio: 1 }, | |
{ name: 'BlackBerry Z30', width: 360, height: 640, ratio: 2 }, |
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
var commonBrowserViewports = [ | |
{ name: 'Desktop - Extra Large', width: 2880, height: 1800, ratio: 2 }, | |
{ name: 'Desktop - Large', width: 1920, height: 1080, ratio: 1 }, | |
{ name: 'Desktop', width: 1440, height: 900, ratio: 1 }, | |
{ name: 'Desktop', width: 1366, height: 768, ratio: 1 }, | |
{ name: 'Desktop', width: 1280, height: 800, ratio: 1 }, | |
{ name: 'Tablet - Portrait', width: 768, height: 1024, ratio: 1 }, | |
{ name: 'Tablet - Landscape', width: 1024, height: 768, ratio: 1 } | |
]; |
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
var devices = [ | |
{ name: 'Desktop - Huge', width: 2880, height: 1800, ratio: 2, type: 'desktop' }, | |
{ name: 'Desktop - Extra Large', width: 1920, height: 1080, ratio: 1, type: 'desktop' }, | |
{ name: 'Desktop - Large', width: 1440, height: 900, ratio: 1, type: 'desktop' }, | |
{ name: 'Desktop - HiDPI', width: 1366, height: 768, ratio: 1, type: 'desktop' }, | |
{ name: 'Desktop - MDPI', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
{ name: 'Laptop with HiDPI screen', width: 1440, height: 900, ratio: 2, type: 'desktop' }, | |
{ name: 'Laptop with MDPI screen', width: 1280, height: 800, ratio: 1, type: 'desktop' }, | |
{ name: 'Laptop with touch', width: 1280, height: 950, ratio: 1, type: 'desktop' }, | |
{ name: 'Tablet - Portrait', width: 768, height: 1024, ratio: 1, type: 'tablet' }, |
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
// ::-webkit-scrollbar{ | |
// width:10px; | |
// height:10px; | |
// } | |
// ::-webkit-scrollbar-thumb{ | |
// background:0 0; | |
// background-color:rgba(50,50,50,.25); | |
// border:2px solid transparent; | |
// border-radius:10px; | |
// background-clip:padding-box; |
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
'use strict'; | |
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function() { | |
// Update 'version' if you need to refresh the cache | |
var staticCacheName = 'static'; | |
var version = 'v1::'; |
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
::-moz-selection { background: yellow; } | |
::selection { background: yellow; } |
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
var all = $('a[data-html="true"]'); | |
var done = []; | |
$.each(all, function(idx, item){ | |
var fin = $(item).parent().parent()[0].innerText.split('\n'); | |
var first = fin[0] + ';'; | |
var second = fin[1].split(' (')[0] + ';'; | |
var third = fin[1].split(' (')[1].replace(')', '') + '\n'; | |
var i = first + second + third; | |
done.push(i); | |
}); |