Skip to content

Instantly share code, notes, and snippets.

View jpehman's full-sized avatar

Jonathan Ehman jpehman

View GitHub Profile
(function () {
"use strict";
function timeout (callback, duration) {
var startTime = null, pauseTime = null,
remainingTime = 0,
timer = null;
repeating = repeating || false;
callback = callback || function () {};
(function () {
var charArray = "ABCDEFGHI~`!@JKLMNOPQRSTUVWXYZ#$%^abcdefghijklm&*()nopqrstuvwxyz-_=+1234567890{[}]|:;',.<>?/".split("");
var crypto = window.crypto || window.msCrypto;
if (!crypto.subtle) {
console.log("crypto not supported");
return;
}