diff --git a/README.md b/README.md index a54eafb..3e2968b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Web-Maker +Web-Maker ![Build](https://travis-ci.org/chinchang/web-maker.svg?branch=master) ====== **Web-Maker** is a chrome extension that converts your Chrome tabs into an offline playground for your web experiments. Something like CodePen or JSFiddle, but much more faster and works offline being local on your system. diff --git a/src/manifest.json b/src/manifest.json index fc4ba6f..2896457 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "Web Maker", - "version": "1.7.2", + "version": "1.7.4", "manifest_version": 2, "description": "Convert new tabs into an offline playground for your web experiments", "homepage_url": "https://kushagragour.in/lab/web-maker", diff --git a/src/script.js b/src/script.js index e7f5443..2d312c4 100644 --- a/src/script.js +++ b/src/script.js @@ -546,11 +546,21 @@ return contents; } function createPreviewFile(html, css, js) { - var contents = getCompleteHtml(html, css, js) + var contents = getCompleteHtml(html, css, js); var fileWritten = false; - var blob = new Blob([ contents ], { type: "text/plain;charset=UTF-8" }); + // Track if people have written code. + if (!trackEvent.hasTrackedCode && (html || css || js)) { + trackEvent('fn', 'hasCode'); + trackEvent.hasTrackedCode = true; + } + // Track when people actually are working. + trackEvent.previewCount = (trackEvent.previewCount || 0) + 1; + if (trackEvent.previewCount === 4) { + trackEvent('fn', 'usingPreview'); + } + function errorHandler() { console.utils.log(arguments); } window.webkitRequestFileSystem(window.TEMPORARY, 1024 * 1024 * 5, function(fs){