A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa
<script type="text/javascript"> | |
var mobile = (/iphone|ipod|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())); | |
if (mobile) { | |
do something; | |
} | |
</script> | |
<script type="text/javascript"> | |
var isAndroid = (/android/i.test(navigator.userAgent.toLowerCase())); | |
if (isAndroid) { |
A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa
// Before implementing this, you'll need to contact Shopify support and ask them to turn off Google's ReCaptcha | |
// for your Shopify store's contact forms. Otherwise, it will redirect to the captcha's verification page. | |
// Retrieves input data from a form and returns it as a JSON object: | |
function formToJSON(elements) { | |
return [].reduce.call(elements, function (data, element) { | |
data[element.name] = element.value; | |
return data; | |
}, {}); | |
} |
//events - a super-basic Javascript (publish subscribe) pattern | |
var events = { | |
events: {}, | |
on: function (eventName, fn) { | |
this.events[eventName] = this.events[eventName] || []; | |
this.events[eventName].push(fn); | |
}, | |
off: function(eventName, fn) { | |
if (this.events[eventName]) { |
// https://piccalil.li/blog/a-modern-css-reset | |
/* Box sizing rules */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* Remove default margin */ |
diff --git a/assets/stylesheet.css b/assets/stylesheet.css | |
index cb0a5ee0..9e691b64 100755 | |
--- a/assets/stylesheet.css | |
+++ b/assets/stylesheet.css | |
@@ -4088,6 +4088,7 @@ ul.collection__sidebar-menu li.js-parent-menu.open > .parent_item > a svg { | |
} | |
.sidebar-filter.filter--color .filter_swatch label { | |
+ margin-top: 5px; | |
margin-bottom: 10px; |
const express = require('express'); | |
const app = express(); | |
const port = 3333; | |
const data = []; | |
app.post('/analytics', (req, res) => { | |
data.push(Date.now()); | |
console.log('Request received at:'); | |
console.log(data[data.length - 1]); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Dice</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" type="text/css" href="style-traditional.css"> | |
<style type="text/css"> |
class Pubsub { | |
constructor() { | |
this.events = {}; | |
} | |
subscription (eventName, func) { | |
return { | |
subscribe: () => { | |
if (this.events[eventName]) { | |
this.events[eventName].push(func); |
URL | User | Repo | |
---|---|---|---|
https://github.com/0install/hello-ceylon | 0install | hello-ceylon | |
https://github.com/0x10c-crap/DCPU-Stress-Test | 0x10c-crap | DCPU-Stress-Test | |
https://github.com/0x10c-dev/stdlib | 0x10c-dev | stdlib | |
https://github.com/0x10cAtlas/AtlasOS | 0x10cAtlas | AtlasOS | |
https://github.com/0x10cStandardsCommittee/0x10c-Standards | 0x10cStandardsCommittee | 0x10c-Standards | |
https://github.com/0x42c/0x42c-kernel | 0x42c | 0x42c-kernel | |
https://github.com/0x42c/0x42c-multithread | 0x42c | 0x42c-multithread | |
https://github.com/1508/Deployment-Utilities | 1508 | Deployment-Utilities | |
https://github.com/280north/cappuccino | 280north | cappuccino |