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
import axios from 'axios' | |
import log from 'jsbug' | |
const randHash = function () { | |
return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5) | |
} | |
const get = function (endpoint) { | |
const id = randHash() | |
const started = new Date().getTime() |
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
export default () => { | |
return new Promise((resolve) => { | |
const on = () => resolve(true) // is in private mode | |
const off = () => resolve(false) // not private mode | |
const testLocalStorage = () => { | |
try { | |
if (window.localStorage.length) { | |
return off() | |
} else { | |
window.localStorage.x = 1 |
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
// The mixin | |
@mixin elementquery ($elementsize) { | |
@if $elementsize == small { | |
&[max-width="200px"]{ @content; } | |
} | |
@else if $elementsize == medium { | |
&[max-width="500px"]{ @content; } | |
} | |
@else if $elementsize == large { | |
&[max-width="800px"]{ @content; } |