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
// Retrieve the object from storage onReady | |
var autosave = localStorage.getItem('file'); | |
// parses the string (btw. its UTF-8) | |
var text = JSON.parse(autosave); | |
//modifies the textarea with the id="inputTextArea" | |
$("textarea#inputTextArea").val(text); | |
// Autosave on keystroke works in offline mode |
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
define(function (require) { | |
var module; | |
// Setup temporary Google Analytics objects. | |
window.GoogleAnalyticsObject = "ga"; | |
window.ga = function () { (window.ga.q = window.ga.q || []).push(arguments); }; | |
window.ga.l = 1 * new Date(); | |
// Immediately add a pageview event to the queue. |
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 el = document.createElement('script'); | |
el.src = "https://cdn.jsdelivr.net/lodash/4.11.1/lodash.min.js"; | |
el.type = "text/javascript"; | |
document.head.appendChild(el); | |
// Use the following in a bookmarklet: | |
javascript:var el=document.createElement('script');el.src="https://cdn.jsdelivr.net/lodash/4.11.1/lodash.min.js";el.type = "text/javascript";document.head.appendChild(el); |
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 gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |