diff --git a/js/webdgap.js b/js/webdgap.js
index 4f125b6..ec5d3c5 100755
--- a/js/webdgap.js
+++ b/js/webdgap.js
@@ -1406,7 +1406,7 @@ $(document).ready(function() {
}
// Files for exported app
- zip.file("config.xml", "\n\n "+ $("[data-id=sitename]").val() +"\n \n "+ $("[data-pgb=description]").val() +"\n \n \n "+ $("[data-pgb=author]").val() +"\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n\n \n \n\n \n \n "+ filestorageIntent +"\n\n \n \n \n \n \n "+ listIntentions +"\n");
+ zip.file("config.xml", "\n\n "+ $("[data-id=sitename]").val() +"\n \n "+ $("[data-pgb=description]").val() +"\n \n \n "+ $("[data-pgb=author]").val() +"\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n\n \n \n\n \n \n "+ filestorageIntent +"\n\n \n \n \n \n \n "+ listIntentions +"\n");
zip.file("README.md", "# Thank you for using WebDGap!\n\nIntro to your PhoneGap Build Export\n-------------\n\n### File Structure\n\n**NOTICE:** This export is just a template. Structure it however you like for PhoneGap Build!\n\n - www\n - (your application source code)\n - res/icon\n - (your logo is located here for windows phone, ios, and android)\n - logo.png\n - config.xml\n\n**DON'T FORGET** to add `` or `` into your `index.html` file (which should be located in the `www` directory)\n\nDonate To The Project!\n-------------\n\nIf WebDGap was at all helpful for you. [Would you consider donating to the project?](https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=JryIEtO_GiYnqlvRfV6BGnO6bAxR3JtIQif2j1z1eFYuoLkYf_XZOY6QbWe&dispatch=5885d80a13c0db1f8e263663d3faee8dcce3e160f5b9538489e17951d2c62172)");
// Export Chrome Application
diff --git a/js/webdgapjs.js b/js/webdgapjs.js
index 47e1506..b5f2b3f 100644
--- a/js/webdgapjs.js
+++ b/js/webdgapjs.js
@@ -298,7 +298,7 @@ function webdgap(os, YourName, AppImg, url) {
zip.file("assets/logo.png", document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64: true});
// Files for exported app
- zip.file("config.xml", "\n\n "+ YourName +"\n \n A shortcut app generated via WebDGap.\n \n \n John Smith\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n\n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n");
+ zip.file("config.xml", "\n\n "+ YourName +"\n \n A shortcut app generated via WebDGap.\n \n \n John Smith\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n\n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n");
zip.file("www/index.html", "\n");
// Export application
diff --git a/js/webdgapjs.min.js b/js/webdgapjs.min.js
index cbae734..3b75c37 100644
--- a/js/webdgapjs.min.js
+++ b/js/webdgapjs.min.js
@@ -5,4 +5,4 @@
// This is WebDGap (https://michaelsboost.github.io/WebDGap/), Easily create multi-platform desktop apps.
// implemented in JavaScript!
-function webdgap(e,n,t,i){function a(e,n){var t=new Image;t.crossOrigin="Anonymous",t.src=e,t.onload=function(){var e=document.createElement("canvas");e.width=n,e.height=n;var t=e.getContext("2d");t.clearRect(0,0,n,n),t.drawImage(this,0,0,n,n);var i=e.toDataURL("image/png"),a=document.createElement("img");a.crossOrigin="Anonymous",a.setAttribute("data-webdgapsize","f"+n),a.src=i,d.appendChild(a)}}function o(){var e=document.createElement("script"),n=document.createElement("script"),t=document.createElement("script");e.type="text/javascript",e.src="https://michaelsboost.github.io/WebDGap/dist/jszip.min.js",n.type="text/javascript",n.src="https://michaelsboost.github.io/WebDGap/dist/jszip-utils.js",t.type="text/javascript",t.src="https://michaelsboost.github.io/WebDGap/dist/FileSaver.js",document.head.appendChild(e),document.head.appendChild(n),document.head.appendChild(t)}function r(){if("win"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourWinApp.zip",function(e,t){if(e)throw e;var a=new JSZip(t);a.file("resources/default_app/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/css/style.css","html, body {\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: hidden;\n}\n\niframe {\n width: 100%;\n height: 100%;\n border: 0;\n}"),a.file("resources/default_app/index.html","\n\n
\n "+n+'\n \n \n \n \n \n \n \n \n'),a.file("resources/default_app/package.json",'{\n "name": "'+n+'",\n "productName": "'+n+'",\n "version": "1.0.0",\n "main": "default_app.js",\n "license": "MIT"\n}\n');var o=a.generate({type:"blob"});return saveAs(o,n.replace(/ /g,"-").toLowerCase()+"-win.zip"),s(),!1});else if("win32"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourWin32App.zip",function(e,t){if(e)throw e;var a=new JSZip(t);a.file("app/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),a.file("package.json",'{\n "main" : "app/index.html",\n "name" : "'+n+'",\n "window": {\n "toolbar" : false,\n "icon" : "app/icons/128.png",\n "width" : 1000,\n "height" : 600,\n "position": "center"\n }\n}'),a.file("app/index.html","\n\n \n "+n+'\n \n \n \n \n \n');var o=a.generate({type:"blob"});return saveAs(o,n.replace(/ /g,"-").toLowerCase()+"-win32.zip"),s(),!1});else if("mac"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourMacApp.zip",function(e,t){if(e)throw e;var a=new JSZip(t);a.file("data/content/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),a.file("data/content/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),a.file("data/content/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),a.file("data/content/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),a.file("data/content/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),a.file("data/package.json",'{\n "main" : "content/index.html",\n "name" : "'+n+'",\n "window": {\n "toolbar" : false\n }\n}'),a.file("data/content/index.html","\n\n \n "+n+'\n \n \n \n \n\n \n \n'),a.file("data/content/js/main.js",'document.addEventListener("DOMContentLoaded", function() {\n // Load library\n var gui = require("nw.gui");\n\n // Reference to window\n var win = gui.Window.get();\n\n // Create menu container\n var Menu = new gui.Menu({\n type: "menubar"\n });\n\n //initialize default mac menu\n Menu.createMacBuiltin("'+n+'");\n\n // Get the root menu from the default mac menu\n var rootMenu = Menu.items[0].submenu;\n var windowMenu = Menu.items[2].submenu;\n\n // Append new item to root menu\n windowMenu.insert(\n new gui.MenuItem({\n type: "normal",\n label: "Toggle Fullscreen",\n key: "F",\n modifiers: "cmd",\n click : function () {\n win.toggleFullscreen();\n }\n })\n );\n\n windowMenu.insert(\n new gui.MenuItem({\n type: "normal",\n label: "Reload App",\n key: "r",\n modifiers: "cmd",\n click : function () {\n win.reload();\n }\n })\n );\n\n // Remove About Node-Webkit\n rootMenu.removeAt(0);\n\n // Append Menu to Window\n gui.Window.get().menu = Menu;\n});'),a.file("run.sh","open -a /Applications/"+n+".app/Contents/data/"+n.replace(/ /g,"")+".app");var o=a.generate({type:"blob"});return saveAs(o,n.replace(/ /g,"-").toLowerCase()+"-mac.zip"),s(),!1});else if("lin"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourLinApp.zip",function(e,t){if(e)throw e;var a=new JSZip,o=a.folder(n.replace(/ /g,"-"));o.load(t),o.file("resources/default_app/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/index.html","\n\n \n "+n+'\n \n \n \n \n \n'),o.file("resources/default_app/package.json",'{\n "name": "'+n+'",\n "productName": "'+n+'",\n "version": "1.0.0",\n "main": "default_app.js",\n "license": "MIT"\n}\n'),a.file("make.sh","if [ -d ${HOME}/"+n.replace(/ /g,"-")+" ]; then\n typeset LP_FILE=${HOME}/"+n.replace(/ /g,"-")+"/"+n.replace(/ /g,"-")+'.desktop\n\n # Remove the target file if any\n rm -f ${LP_FILE}\n printf "%s[Desktop Entry]\\nName='+n+"\\nPath=${HOME}/"+n.replace(/ /g,"-")+"\\nActions=sudo\\nExec=./"+n.replace(/ /g,"-")+"/electron\\nIcon=${HOME}/"+n.replace(/ /g,"-")+"/resources/default_app/icons/128.png\\nTerminal=true\\nType=Application\\nStartupNotify=true > ${HOME}/"+n.replace(/ /g,"-")+".desktop\" >> ${LP_FILE}\n\n echo 'Your application and launcher are now located at ${HOME}/"+n.replace(/ /g,"-")+"'\n rm README.md\n rm make.sh\n cd ../\n rmdir "+n.replace(/ /g,"-")+"-linsite\n cd ${HOME}/"+n.replace(/ /g,"-")+"/\n chmod 775 electron\nfi\n\nif [ ! -d ${HOME}/"+n.replace(/ /g,"-")+" ]; then\n mv "+n.replace(/ /g,"-")+" ${HOME}\n\n typeset LP_FILE=${HOME}/"+n.replace(/ /g,"-")+"/"+n.replace(/ /g,"-")+'.desktop\n\n # Remove the target file if any\n rm -f ${LP_FILE}\n printf "%s[Desktop Entry]\\nName='+n+"\\nPath=${HOME}/"+n.replace(/ /g,"-")+"\\nActions=sudo\\nExec=./"+n.replace(/ /g,"-")+"/electron\\nIcon=${HOME}/"+n.replace(/ /g,"-")+"/resources/default_app/icons/128.png\\nTerminal=true\\nType=Application\\nStartupNotify=true > ${HOME}/"+n.replace(/ /g,"-")+".desktop\" >> ${LP_FILE}\n\n echo 'Your application and launcher are now located at ${HOME}/"+n.replace(/ /g,"-")+"'\n rm README.md\n rm make.sh\n cd ../\n rmdir "+n.replace(/ /g,"-")+"-linsite\n cd ${HOME}/"+n.replace(/ /g,"-")+"/\n chmod 775 electron\nfi\n\n# For Windows OS\n#if EXIST ${HOME}/"+n.replace(/ /g,"-")+" (\n #echo Yes\n#) ELSE (\n #echo No\n#)\n"),a.file("README.md","### Instructions\n 1. Extract the `"+n.replace(/ /g,"-")+"-linsite.zip` folder anywhere on your computer except the home folder. \n 2. Open a terminal and then navigate to "+n.replace(/ /g,"-")+"'s directory and `run the make.sh file`.\n\n **example**:\n cd Downloads/"+n.replace(/ /g,"-")+"-linsite\n\n 3. This will move the "+n.replace(/ /g,"-")+" sibling folder and it's descendants to your home directory and create an application launcher.\n");var r=a.generate({type:"blob"});return saveAs(r,n.replace(/ /g,"-").toLowerCase()+"-linsite.zip"),s(),!1});else if("lin32"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourLin32App.zip",function(e,t){if(e)throw e;var i=new JSZip,a=i.folder(n.replace(/ /g,"-"));a.load(t),a.file("app/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),a.file("package.json",'{\n "main" : "app/index.html",\n "name" : "'+n+'",\n "window": {\n "toolbar" : false,\n "icon" : "app/icons/128.png",\n "width" : 1000,\n "height" : 600,\n "position": "center"\n }\n}'),a.file("app/index.html","\n\n \n "+n+'\n \n \n \n \n \n'),i.file("make.sh","if [ -d ${HOME}/"+n.replace(/ /g,"-")+" ]; then\n typeset LP_FILE=${HOME}/"+n.replace(/ /g,"-")+"/"+n.replace(/ /g,"-")+'.desktop\n\n # Remove the target file if any\n rm -f ${LP_FILE}\n printf "%s[Desktop Entry]\\nName='+n+"\\nPath=${HOME}/"+n.replace(/ /g,"-")+"\\nActions=sudo\\nExec=./"+n.replace(/ /g,"-")+"/nw\\nIcon=${HOME}/"+n.replace(/ /g,"-")+"/app/icons/128.png\\nTerminal=true\\nType=Application\\nStartupNotify=true > ${HOME}/"+n.replace(/ /g,"-")+".desktop\" >> ${LP_FILE}\n\n echo 'Your application and launcher are now located at ${HOME}/"+n.replace(/ /g,"-")+"'\n rm README.md\n rm make.sh\n cd ../\n rmdir "+n.replace(/ /g,"-")+"-lin32site\n cd ${HOME}/"+n.replace(/ /g,"-")+"/\n chmod 775 nw\nfi\n\nif [ ! -d ${HOME}/"+n.replace(/ /g,"-")+" ]; then\n mv "+n.replace(/ /g,"-")+" ${HOME}\n\n typeset LP_FILE=${HOME}/"+n.replace(/ /g,"-")+"/"+n.replace(/ /g,"-")+'.desktop\n\n # Remove the target file if any\n rm -f ${LP_FILE}\n printf "%s[Desktop Entry]\\nName='+n+"\\nPath=${HOME}/"+n.replace(/ /g,"-")+"\\nActions=sudo\\nExec=./"+n.replace(/ /g,"-")+"/nw\\nIcon=${HOME}/"+n.replace(/ /g,"-")+"/app/icons/128.png\\nTerminal=true\\nType=Application\\nStartupNotify=true > ${HOME}/"+n.replace(/ /g,"-")+".desktop\" >> ${LP_FILE}\n\n echo 'Your application and launcher are now located at ${HOME}/"+n.replace(/ /g,"-")+"'\n rm README.md\n rm make.sh\n cd ../\n rmdir "+n.replace(/ /g,"-")+"-lin32site\n cd ${HOME}/"+n.replace(/ /g,"-")+"/\n chmod 775 nw\nfi\n\n# For Windows OS\n#if EXIST ${HOME}/"+n.replace(/ /g,"-")+" (\n #echo Yes\n#) ELSE (\n #echo No\n#)\n"),i.file("README.md","### Instructions\n 1. Extract the `"+n.replace(/ /g,"-")+"-lin32site.zip` folder anywhere on your computer except the home folder. \n 2. Open a terminal and then navigate to "+n.replace(/ /g,"-")+"'s directory and `run the make.sh file`.\n\n **example**:\n cd Downloads/"+n.replace(/ /g,"-")+"-lin32site\n\n 3. This will move the "+n.replace(/ /g,"-")+" sibling folder and it's descendants to your home directory and create an application launcher.\n");var o=i.generate({type:"blob"});return saveAs(o,n.replace(/ /g,"-").toLowerCase()+"-lin32site.zip"),s(),!1});else if("chrome"===e){var t=new JSZip;t.file("img/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),t.file("img/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),t.file("img/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),t.file("img/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),t.file("img/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),t.file("css/reset.css","/* http://meyerweb.com/eric/tools/css/reset/ \n v2.0 | 20110126\n License: none (public domain)\n*/\n\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, u, i, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed, \nfigure, figcaption, footer, header, hgroup, \nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline;\n}\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure, \nfooter, header, hgroup, menu, nav, section {\n display: block;\n}\nbody {\n line-height: 1;\n}\nol, ul {\n list-style: none;\n}\nblockquote, q {\n quotes: none;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\n content: '';\n content: none;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}"),t.file("css/style.css","webview {\n width: 100vw;\n height: 100vh;\n}"),t.file("html/embed.html",'\n\n \n \n '+n+'\n \n \n \n \n \n \n'),t.file("js/background.js","/**\n * Listens for the app launching then creates the window\n *\n * @see http://developer.chrome.com/apps/app.runtime.html\n * @see http://developer.chrome.com/apps/app.window.html\n */\nchrome.app.runtime.onLaunched.addListener(function () {\n runApp();\n});\n\n/**\n * Listens for the app restarting then re-creates the window.\n *\n * @see http://developer.chrome.com/apps/app.runtime.html\n */\nchrome.app.runtime.onRestarted.addListener(function () {\n runApp();\n});\n\n/**\n * Creates the window for the application.\n *\n * @see http://developer.chrome.com/apps/app.window.html\n */\nfunction runApp() {\n // Creat a new Chrome app window\n chrome.app.window.create('html/embed.html', {\"id\":\"embed\",\"frame\":{\"type\":\"chrome\"},\"innerBounds\":{\"width\":1180,\"height\":900}}, onWindowLoaded());\n}\n\n/**\n * Called before the contentWindow's onload event\n *\n * @see http://developer.chrome.com/apps/app.window.html\n */\nfunction onWindowLoaded(popup) {\n return function (win) {\n // On window loaded event\n win.contentWindow.onload = function () {\n // Get webview \n var webview = win.contentWindow.document.getElementById('webview');\n\n // Sign up for 'permissionrequest' event\n webview.addEventListener('permissionrequest', function (e) {\n // Allow all permission requests\n e.request.allow();\n });\n\n // Sign up for 'newwindow' event\n // Emitted when a target='_blank' link is clicked within the webview\n webview.addEventListener('newwindow', function (e) {\n // Popup?\n if (e.initialWidth > 0 && e.initialHeight > 0) {\n // Open it in a popup window with a set width and height\n return chrome.app.window.create('html/embed.html', { frame: { type: 'chrome' }, innerBounds: { width: e.initialWidth, height: e.initialHeight } }, onWindowLoaded(e));\n }\n\n // Open the link in a new browser tab/window\n win.contentWindow.open(e.targetUrl);\n });\n\n // Is this a popup window?\n if (popup) {\n // Override webview source with popup's target URL\n webview.src = popup.targetUrl;\n }\n };\n };\n}\n"),t.file("manifest.json",'{\n "app": {\n "background": {\n "pages": [ "html/embed.html" ],\n "scripts": [ "js/background.js" ]\n }\n },\n "description": "A shortcut app generated via WebDGap.",\n "icons": {\n "128": "img/128.png",\n "16" : "img/16.png",\n "32" : "img/32.png",\n "64" : "img/64.png"\n },\n "manifest_version": 2,\n "name": "'+n+'",\n "permissions": [ "webview", "audioCapture", "videoCapture", "storage", "fileSystem", "unlimitedStorage", "http://*/", "https://*/" ],\n "version": "0.1"\n}\n');var a=t.generate({type:"blob"});saveAs(a,n.replace(/ /g,"-").toLowerCase()+"-chrome.zip"),s()}else if("chromeext"===e){var t=new JSZip;t.file("assets/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),t.file("assets/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),t.file("assets/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),t.file("assets/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),t.file("assets/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),t.file("background.js","/**\n * Listens for the app launching, then creates the window.\n *\n * @see http://developer.chrome.com/apps/app.runtime.html\n * @see http://developer.chrome.com/apps/app.window.html\n */\nchrome.app.runtime.onLaunched.addListener(function(launchData) {\n chrome.app.window.create(\n 'index.html',\n {\n id: 'mainWindow',\n innerBounds: {\n 'width': 800,\n 'height': 600\n }\n }\n );\n});"),t.file("css/style.css","html, body {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n}\n\nbody {\n min-width: 300px;\n min-height: 420px;\n}\n\nwebview, iframe {\n width: 100%;\n height: 100%;\n border: 0;\n}"),t.file("index.html","\n\n \n "+n+'\n \n \n \n \n \n'),t.file("manifest.json",'{\n "manifest_version": 2,\n "name": "'+n+'",\n "short_name": "'+n+'",\n "description": "A shortcut app generated via WebDGap.",\n "version": "0.1",\n "minimum_chrome_version": "38",\n "permissions": [ "storage", "unlimitedStorage", "http://*/", "https://*/" ],\n "icons": {\n "16": "assets/16.png",\n "32": "assets/32.png",\n "64": "assets/64.png",\n "128": "assets/128.png"\n },\n\n "browser_action": {\n "default_icon": "assets/128.png",\n "default_title": "'+n+'",\n "default_popup": "index.html"\n },\n \n "content_security_policy": "script-src \'self\' \'unsafe-eval\'; object-src \'self\'"\n}');var a=t.generate({type:"blob"});saveAs(a,n.replace(/ /g,"-").toLowerCase()+"-chromeext.zip"),s()}else if("phonegap"===e){var t=new JSZip;t.file("res/icon/android/icon-96-xhdpi.png",document.querySelector("[data-webdgapsize=f96]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/android/icon-72-hdpi.png",document.querySelector("[data-webdgapsize=f72]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/android/icon-48-mdpi.png",document.querySelector("[data-webdgapsize=f48]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/android/icon-36-ldpi.png",document.querySelector("[data-webdgapsize=f36]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/ios/icon-72.png",document.querySelector("[data-webdgapsize=f72]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/ios/icon-72-2x.png",document.querySelector("[data-webdgapsize=f144]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/ios/icon-57.png",document.querySelector("[data-webdgapsize=f57]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/ios/icon-57-2x.png",document.querySelector("[data-webdgapsize=f114]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/wp8/ApplicationIcon.png",document.querySelector("[data-webdgapsize=f159]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/wp8/Background.png",document.querySelector("[data-webdgapsize=f99]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/blackberry/icon-80.png",document.querySelector("[data-webdgapsize=f80]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/webos/icon-64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),t.file("assets/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),t.file("config.xml",'\n\n '+n+'\n \n A shortcut app generated via WebDGap.\n \n \n John Smith\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n\n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),t.file("www/index.html","\n");var a=t.generate({type:"blob"});saveAs(a,n.replace(/ /g,"-").toLowerCase()+"-pgb.zip"),s()}else alert("Oops something went wrong. Maybe wrong argument for operating system? Are you using a valid image url? - https://michaelsboost.github.io/WebDGap/plugin/");return!1}window.File&&window.FileReader&&window.FileList&&window.Blob||alert("The File APIs are not fully supported in this browser.");var s=function(){console.log("WebDGap built your "+e+" application")};o();for(var p=document.querySelectorAll("[data-webdgap=container]"),l=0;l';var m=document.createElement("img");return m.setAttribute("data-webdgapimgload","webdgapimg"),m.src=t,d.appendChild(m),a(t,"16"),a(t,"32"),a(t,"64"),a(t,"128"),a(t,"96"),a(t,"72"),a(t,"48"),a(t,"36"),a(t,"72"),a(t,"144"),a(t,"57"),a(t,"114"),a(t,"159"),a(t,"99"),a(t,"80"),console.log("WebDGap is exporting your "+e+" application..."),setTimeout(function(){r()},1e3),!1}
+function webdgap(e,n,t,i){function a(e,n){var t=new Image;t.crossOrigin="Anonymous",t.src=e,t.onload=function(){var e=document.createElement("canvas");e.width=n,e.height=n;var t=e.getContext("2d");t.clearRect(0,0,n,n),t.drawImage(this,0,0,n,n);var i=e.toDataURL("image/png"),a=document.createElement("img");a.crossOrigin="Anonymous",a.setAttribute("data-webdgapsize","f"+n),a.src=i,d.appendChild(a)}}function o(){var e=document.createElement("script"),n=document.createElement("script"),t=document.createElement("script");e.type="text/javascript",e.src="https://michaelsboost.github.io/WebDGap/dist/jszip.min.js",n.type="text/javascript",n.src="https://michaelsboost.github.io/WebDGap/dist/jszip-utils.js",t.type="text/javascript",t.src="https://michaelsboost.github.io/WebDGap/dist/FileSaver.js",document.head.appendChild(e),document.head.appendChild(n),document.head.appendChild(t)}function r(){if("win"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourWinApp.zip",function(e,t){if(e)throw e;var a=new JSZip(t);a.file("resources/default_app/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),a.file("resources/default_app/css/style.css","html, body {\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: hidden;\n}\n\niframe {\n width: 100%;\n height: 100%;\n border: 0;\n}"),a.file("resources/default_app/index.html","\n\n \n "+n+'\n \n \n \n \n \n \n \n \n'),a.file("resources/default_app/package.json",'{\n "name": "'+n+'",\n "productName": "'+n+'",\n "version": "1.0.0",\n "main": "default_app.js",\n "license": "MIT"\n}\n');var o=a.generate({type:"blob"});return saveAs(o,n.replace(/ /g,"-").toLowerCase()+"-win.zip"),s(),!1});else if("win32"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourWin32App.zip",function(e,t){if(e)throw e;var a=new JSZip(t);a.file("app/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),a.file("package.json",'{\n "main" : "app/index.html",\n "name" : "'+n+'",\n "window": {\n "toolbar" : false,\n "icon" : "app/icons/128.png",\n "width" : 1000,\n "height" : 600,\n "position": "center"\n }\n}'),a.file("app/index.html","\n\n \n "+n+'\n \n \n \n \n \n');var o=a.generate({type:"blob"});return saveAs(o,n.replace(/ /g,"-").toLowerCase()+"-win32.zip"),s(),!1});else if("mac"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourMacApp.zip",function(e,t){if(e)throw e;var a=new JSZip(t);a.file("data/content/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),a.file("data/content/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),a.file("data/content/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),a.file("data/content/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),a.file("data/content/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),a.file("data/package.json",'{\n "main" : "content/index.html",\n "name" : "'+n+'",\n "window": {\n "toolbar" : false\n }\n}'),a.file("data/content/index.html","\n\n \n "+n+'\n \n \n \n \n\n \n \n'),a.file("data/content/js/main.js",'document.addEventListener("DOMContentLoaded", function() {\n // Load library\n var gui = require("nw.gui");\n\n // Reference to window\n var win = gui.Window.get();\n\n // Create menu container\n var Menu = new gui.Menu({\n type: "menubar"\n });\n\n //initialize default mac menu\n Menu.createMacBuiltin("'+n+'");\n\n // Get the root menu from the default mac menu\n var rootMenu = Menu.items[0].submenu;\n var windowMenu = Menu.items[2].submenu;\n\n // Append new item to root menu\n windowMenu.insert(\n new gui.MenuItem({\n type: "normal",\n label: "Toggle Fullscreen",\n key: "F",\n modifiers: "cmd",\n click : function () {\n win.toggleFullscreen();\n }\n })\n );\n\n windowMenu.insert(\n new gui.MenuItem({\n type: "normal",\n label: "Reload App",\n key: "r",\n modifiers: "cmd",\n click : function () {\n win.reload();\n }\n })\n );\n\n // Remove About Node-Webkit\n rootMenu.removeAt(0);\n\n // Append Menu to Window\n gui.Window.get().menu = Menu;\n});'),a.file("run.sh","open -a /Applications/"+n+".app/Contents/data/"+n.replace(/ /g,"")+".app");var o=a.generate({type:"blob"});return saveAs(o,n.replace(/ /g,"-").toLowerCase()+"-mac.zip"),s(),!1});else if("lin"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourLinApp.zip",function(e,t){if(e)throw e;var a=new JSZip,o=a.folder(n.replace(/ /g,"-"));o.load(t),o.file("resources/default_app/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),o.file("resources/default_app/index.html","\n\n \n "+n+'\n \n \n \n \n \n'),o.file("resources/default_app/package.json",'{\n "name": "'+n+'",\n "productName": "'+n+'",\n "version": "1.0.0",\n "main": "default_app.js",\n "license": "MIT"\n}\n'),a.file("make.sh","if [ -d ${HOME}/"+n.replace(/ /g,"-")+" ]; then\n typeset LP_FILE=${HOME}/"+n.replace(/ /g,"-")+"/"+n.replace(/ /g,"-")+'.desktop\n\n # Remove the target file if any\n rm -f ${LP_FILE}\n printf "%s[Desktop Entry]\\nName='+n+"\\nPath=${HOME}/"+n.replace(/ /g,"-")+"\\nActions=sudo\\nExec=./"+n.replace(/ /g,"-")+"/electron\\nIcon=${HOME}/"+n.replace(/ /g,"-")+"/resources/default_app/icons/128.png\\nTerminal=true\\nType=Application\\nStartupNotify=true > ${HOME}/"+n.replace(/ /g,"-")+".desktop\" >> ${LP_FILE}\n\n echo 'Your application and launcher are now located at ${HOME}/"+n.replace(/ /g,"-")+"'\n rm README.md\n rm make.sh\n cd ../\n rmdir "+n.replace(/ /g,"-")+"-linsite\n cd ${HOME}/"+n.replace(/ /g,"-")+"/\n chmod 775 electron\nfi\n\nif [ ! -d ${HOME}/"+n.replace(/ /g,"-")+" ]; then\n mv "+n.replace(/ /g,"-")+" ${HOME}\n\n typeset LP_FILE=${HOME}/"+n.replace(/ /g,"-")+"/"+n.replace(/ /g,"-")+'.desktop\n\n # Remove the target file if any\n rm -f ${LP_FILE}\n printf "%s[Desktop Entry]\\nName='+n+"\\nPath=${HOME}/"+n.replace(/ /g,"-")+"\\nActions=sudo\\nExec=./"+n.replace(/ /g,"-")+"/electron\\nIcon=${HOME}/"+n.replace(/ /g,"-")+"/resources/default_app/icons/128.png\\nTerminal=true\\nType=Application\\nStartupNotify=true > ${HOME}/"+n.replace(/ /g,"-")+".desktop\" >> ${LP_FILE}\n\n echo 'Your application and launcher are now located at ${HOME}/"+n.replace(/ /g,"-")+"'\n rm README.md\n rm make.sh\n cd ../\n rmdir "+n.replace(/ /g,"-")+"-linsite\n cd ${HOME}/"+n.replace(/ /g,"-")+"/\n chmod 775 electron\nfi\n\n# For Windows OS\n#if EXIST ${HOME}/"+n.replace(/ /g,"-")+" (\n #echo Yes\n#) ELSE (\n #echo No\n#)\n"),a.file("README.md","### Instructions\n 1. Extract the `"+n.replace(/ /g,"-")+"-linsite.zip` folder anywhere on your computer except the home folder. \n 2. Open a terminal and then navigate to "+n.replace(/ /g,"-")+"'s directory and `run the make.sh file`.\n\n **example**:\n cd Downloads/"+n.replace(/ /g,"-")+"-linsite\n\n 3. This will move the "+n.replace(/ /g,"-")+" sibling folder and it's descendants to your home directory and create an application launcher.\n");var r=a.generate({type:"blob"});return saveAs(r,n.replace(/ /g,"-").toLowerCase()+"-linsite.zip"),s(),!1});else if("lin32"===e)JSZipUtils.getBinaryContent("https://michaelsboost.github.io/WebDGap/assets/YourLin32App.zip",function(e,t){if(e)throw e;var i=new JSZip,a=i.folder(n.replace(/ /g,"-"));a.load(t),a.file("app/icons/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),a.file("app/icons/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),a.file("package.json",'{\n "main" : "app/index.html",\n "name" : "'+n+'",\n "window": {\n "toolbar" : false,\n "icon" : "app/icons/128.png",\n "width" : 1000,\n "height" : 600,\n "position": "center"\n }\n}'),a.file("app/index.html","\n\n \n "+n+'\n \n \n \n \n \n'),i.file("make.sh","if [ -d ${HOME}/"+n.replace(/ /g,"-")+" ]; then\n typeset LP_FILE=${HOME}/"+n.replace(/ /g,"-")+"/"+n.replace(/ /g,"-")+'.desktop\n\n # Remove the target file if any\n rm -f ${LP_FILE}\n printf "%s[Desktop Entry]\\nName='+n+"\\nPath=${HOME}/"+n.replace(/ /g,"-")+"\\nActions=sudo\\nExec=./"+n.replace(/ /g,"-")+"/nw\\nIcon=${HOME}/"+n.replace(/ /g,"-")+"/app/icons/128.png\\nTerminal=true\\nType=Application\\nStartupNotify=true > ${HOME}/"+n.replace(/ /g,"-")+".desktop\" >> ${LP_FILE}\n\n echo 'Your application and launcher are now located at ${HOME}/"+n.replace(/ /g,"-")+"'\n rm README.md\n rm make.sh\n cd ../\n rmdir "+n.replace(/ /g,"-")+"-lin32site\n cd ${HOME}/"+n.replace(/ /g,"-")+"/\n chmod 775 nw\nfi\n\nif [ ! -d ${HOME}/"+n.replace(/ /g,"-")+" ]; then\n mv "+n.replace(/ /g,"-")+" ${HOME}\n\n typeset LP_FILE=${HOME}/"+n.replace(/ /g,"-")+"/"+n.replace(/ /g,"-")+'.desktop\n\n # Remove the target file if any\n rm -f ${LP_FILE}\n printf "%s[Desktop Entry]\\nName='+n+"\\nPath=${HOME}/"+n.replace(/ /g,"-")+"\\nActions=sudo\\nExec=./"+n.replace(/ /g,"-")+"/nw\\nIcon=${HOME}/"+n.replace(/ /g,"-")+"/app/icons/128.png\\nTerminal=true\\nType=Application\\nStartupNotify=true > ${HOME}/"+n.replace(/ /g,"-")+".desktop\" >> ${LP_FILE}\n\n echo 'Your application and launcher are now located at ${HOME}/"+n.replace(/ /g,"-")+"'\n rm README.md\n rm make.sh\n cd ../\n rmdir "+n.replace(/ /g,"-")+"-lin32site\n cd ${HOME}/"+n.replace(/ /g,"-")+"/\n chmod 775 nw\nfi\n\n# For Windows OS\n#if EXIST ${HOME}/"+n.replace(/ /g,"-")+" (\n #echo Yes\n#) ELSE (\n #echo No\n#)\n"),i.file("README.md","### Instructions\n 1. Extract the `"+n.replace(/ /g,"-")+"-lin32site.zip` folder anywhere on your computer except the home folder. \n 2. Open a terminal and then navigate to "+n.replace(/ /g,"-")+"'s directory and `run the make.sh file`.\n\n **example**:\n cd Downloads/"+n.replace(/ /g,"-")+"-lin32site\n\n 3. This will move the "+n.replace(/ /g,"-")+" sibling folder and it's descendants to your home directory and create an application launcher.\n");var o=i.generate({type:"blob"});return saveAs(o,n.replace(/ /g,"-").toLowerCase()+"-lin32site.zip"),s(),!1});else if("chrome"===e){var t=new JSZip;t.file("img/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),t.file("img/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),t.file("img/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),t.file("img/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),t.file("img/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),t.file("css/reset.css","/* http://meyerweb.com/eric/tools/css/reset/ \n v2.0 | 20110126\n License: none (public domain)\n*/\n\nhtml, body, div, span, applet, object, iframe,\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\na, abbr, acronym, address, big, cite, code,\ndel, dfn, em, img, ins, kbd, q, s, samp,\nsmall, strike, strong, sub, sup, tt, var,\nb, u, i, center,\ndl, dt, dd, ol, ul, li,\nfieldset, form, label, legend,\ntable, caption, tbody, tfoot, thead, tr, th, td,\narticle, aside, canvas, details, embed, \nfigure, figcaption, footer, header, hgroup, \nmenu, nav, output, ruby, section, summary,\ntime, mark, audio, video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline;\n}\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure, \nfooter, header, hgroup, menu, nav, section {\n display: block;\n}\nbody {\n line-height: 1;\n}\nol, ul {\n list-style: none;\n}\nblockquote, q {\n quotes: none;\n}\nblockquote:before, blockquote:after,\nq:before, q:after {\n content: '';\n content: none;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}"),t.file("css/style.css","webview {\n width: 100vw;\n height: 100vh;\n}"),t.file("html/embed.html",'\n\n \n \n '+n+'\n \n \n \n \n \n \n'),t.file("js/background.js","/**\n * Listens for the app launching then creates the window\n *\n * @see http://developer.chrome.com/apps/app.runtime.html\n * @see http://developer.chrome.com/apps/app.window.html\n */\nchrome.app.runtime.onLaunched.addListener(function () {\n runApp();\n});\n\n/**\n * Listens for the app restarting then re-creates the window.\n *\n * @see http://developer.chrome.com/apps/app.runtime.html\n */\nchrome.app.runtime.onRestarted.addListener(function () {\n runApp();\n});\n\n/**\n * Creates the window for the application.\n *\n * @see http://developer.chrome.com/apps/app.window.html\n */\nfunction runApp() {\n // Creat a new Chrome app window\n chrome.app.window.create('html/embed.html', {\"id\":\"embed\",\"frame\":{\"type\":\"chrome\"},\"innerBounds\":{\"width\":1180,\"height\":900}}, onWindowLoaded());\n}\n\n/**\n * Called before the contentWindow's onload event\n *\n * @see http://developer.chrome.com/apps/app.window.html\n */\nfunction onWindowLoaded(popup) {\n return function (win) {\n // On window loaded event\n win.contentWindow.onload = function () {\n // Get webview \n var webview = win.contentWindow.document.getElementById('webview');\n\n // Sign up for 'permissionrequest' event\n webview.addEventListener('permissionrequest', function (e) {\n // Allow all permission requests\n e.request.allow();\n });\n\n // Sign up for 'newwindow' event\n // Emitted when a target='_blank' link is clicked within the webview\n webview.addEventListener('newwindow', function (e) {\n // Popup?\n if (e.initialWidth > 0 && e.initialHeight > 0) {\n // Open it in a popup window with a set width and height\n return chrome.app.window.create('html/embed.html', { frame: { type: 'chrome' }, innerBounds: { width: e.initialWidth, height: e.initialHeight } }, onWindowLoaded(e));\n }\n\n // Open the link in a new browser tab/window\n win.contentWindow.open(e.targetUrl);\n });\n\n // Is this a popup window?\n if (popup) {\n // Override webview source with popup's target URL\n webview.src = popup.targetUrl;\n }\n };\n };\n}\n"),t.file("manifest.json",'{\n "app": {\n "background": {\n "pages": [ "html/embed.html" ],\n "scripts": [ "js/background.js" ]\n }\n },\n "description": "A shortcut app generated via WebDGap.",\n "icons": {\n "128": "img/128.png",\n "16" : "img/16.png",\n "32" : "img/32.png",\n "64" : "img/64.png"\n },\n "manifest_version": 2,\n "name": "'+n+'",\n "permissions": [ "webview", "audioCapture", "videoCapture", "storage", "fileSystem", "unlimitedStorage", "http://*/", "https://*/" ],\n "version": "0.1"\n}\n');var a=t.generate({type:"blob"});saveAs(a,n.replace(/ /g,"-").toLowerCase()+"-chrome.zip"),s()}else if("chromeext"===e){var t=new JSZip;t.file("assets/16.png",document.querySelector("[data-webdgapsize=f16]").src.split("base64,")[1],{base64:!0}),t.file("assets/32.png",document.querySelector("[data-webdgapsize=f32]").src.split("base64,")[1],{base64:!0}),t.file("assets/64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),t.file("assets/128.png",document.querySelector("[data-webdgapsize=f128]").src.split("base64,")[1],{base64:!0}),t.file("assets/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),t.file("background.js","/**\n * Listens for the app launching, then creates the window.\n *\n * @see http://developer.chrome.com/apps/app.runtime.html\n * @see http://developer.chrome.com/apps/app.window.html\n */\nchrome.app.runtime.onLaunched.addListener(function(launchData) {\n chrome.app.window.create(\n 'index.html',\n {\n id: 'mainWindow',\n innerBounds: {\n 'width': 800,\n 'height': 600\n }\n }\n );\n});"),t.file("css/style.css","html, body {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n}\n\nbody {\n min-width: 300px;\n min-height: 420px;\n}\n\nwebview, iframe {\n width: 100%;\n height: 100%;\n border: 0;\n}"),t.file("index.html","\n\n \n "+n+'\n \n \n \n \n \n'),t.file("manifest.json",'{\n "manifest_version": 2,\n "name": "'+n+'",\n "short_name": "'+n+'",\n "description": "A shortcut app generated via WebDGap.",\n "version": "0.1",\n "minimum_chrome_version": "38",\n "permissions": [ "storage", "unlimitedStorage", "http://*/", "https://*/" ],\n "icons": {\n "16": "assets/16.png",\n "32": "assets/32.png",\n "64": "assets/64.png",\n "128": "assets/128.png"\n },\n\n "browser_action": {\n "default_icon": "assets/128.png",\n "default_title": "'+n+'",\n "default_popup": "index.html"\n },\n \n "content_security_policy": "script-src \'self\' \'unsafe-eval\'; object-src \'self\'"\n}');var a=t.generate({type:"blob"});saveAs(a,n.replace(/ /g,"-").toLowerCase()+"-chromeext.zip"),s()}else if("phonegap"===e){var t=new JSZip;t.file("res/icon/android/icon-96-xhdpi.png",document.querySelector("[data-webdgapsize=f96]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/android/icon-72-hdpi.png",document.querySelector("[data-webdgapsize=f72]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/android/icon-48-mdpi.png",document.querySelector("[data-webdgapsize=f48]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/android/icon-36-ldpi.png",document.querySelector("[data-webdgapsize=f36]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/ios/icon-72.png",document.querySelector("[data-webdgapsize=f72]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/ios/icon-72-2x.png",document.querySelector("[data-webdgapsize=f144]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/ios/icon-57.png",document.querySelector("[data-webdgapsize=f57]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/ios/icon-57-2x.png",document.querySelector("[data-webdgapsize=f114]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/wp8/ApplicationIcon.png",document.querySelector("[data-webdgapsize=f159]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/wp8/Background.png",document.querySelector("[data-webdgapsize=f99]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/blackberry/icon-80.png",document.querySelector("[data-webdgapsize=f80]").src.split("base64,")[1],{base64:!0}),t.file("res/icon/webos/icon-64.png",document.querySelector("[data-webdgapsize=f64]").src.split("base64,")[1],{base64:!0}),t.file("assets/logo.png",document.querySelector("[data-webdgapimgload=webdgapimg]").src.split("base64,")[1],{base64:!0}),t.file("config.xml",'\n\n '+n+'\n \n A shortcut app generated via WebDGap.\n \n \n John Smith\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n\n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),t.file("www/index.html","\n");var a=t.generate({type:"blob"});saveAs(a,n.replace(/ /g,"-").toLowerCase()+"-pgb.zip"),s()}else alert("Oops something went wrong. Maybe wrong argument for operating system? Are you using a valid image url? - https://michaelsboost.github.io/WebDGap/plugin/");return!1}window.File&&window.FileReader&&window.FileList&&window.Blob||alert("The File APIs are not fully supported in this browser.");var s=function(){console.log("WebDGap built your "+e+" application")};o();for(var p=document.querySelectorAll("[data-webdgap=container]"),l=0;l';var m=document.createElement("img");return m.setAttribute("data-webdgapimgload","webdgapimg"),m.src=t,d.appendChild(m),a(t,"16"),a(t,"32"),a(t,"64"),a(t,"128"),a(t,"96"),a(t,"72"),a(t,"48"),a(t,"36"),a(t,"72"),a(t,"144"),a(t,"57"),a(t,"114"),a(t,"159"),a(t,"99"),a(t,"80"),console.log("WebDGap is exporting your "+e+" application..."),setTimeout(function(){r()},1e3),!1}