From cad20248de005923b002986b2d90c5c1b782eb66 Mon Sep 17 00:00:00 2001 From: May Kittens Devour Your Soul <yoshimitsu002@gmail.com> Date: Thu, 20 Jul 2017 13:57:28 +0200 Subject: [PATCH 01/35] updates 4 vue and uikit --- src/library-list.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/library-list.js b/src/library-list.js index 177433c..f04fe82 100644 --- a/src/library-list.js +++ b/src/library-list.js @@ -37,7 +37,7 @@ window.jsLibs = [ type: 'js' }, { - url: 'https://unpkg.com/vue@2.4.0/dist/vue.min.js', + url: 'https://unpkg.com/vue@2.4.1/dist/vue.min.js', label: 'Vue.js', type: 'js' }, @@ -69,7 +69,7 @@ window.jsLibs = [ }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.25/js/uikit.min.js', + 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.26/js/uikit.min.js', label: 'UIkit 3', type: 'js' } @@ -111,7 +111,7 @@ window.cssLibs = [ }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.25/css/uikit.min.css', + 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.26/css/uikit.min.css', label: 'UIkit 3', type: 'css' }, From 0bc2f1b55c20d5504362026d187d3c4fcecb6562 Mon Sep 17 00:00:00 2001 From: May Kittens Devour Your Soul <yoshimitsu002@gmail.com> Date: Thu, 20 Jul 2017 16:30:05 +0200 Subject: [PATCH 02/35] Update library-list.js --- src/library-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library-list.js b/src/library-list.js index f04fe82..58058a8 100644 --- a/src/library-list.js +++ b/src/library-list.js @@ -69,7 +69,7 @@ window.jsLibs = [ }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.26/js/uikit.min.js', + 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/js/uikit.min.js', label: 'UIkit 3', type: 'js' } @@ -111,7 +111,7 @@ window.cssLibs = [ }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.26/css/uikit.min.css', + 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/css/uikit.min.css', label: 'UIkit 3', type: 'css' }, From 977f71e16937c14c6117dd00fd0c390987c0c0c5 Mon Sep 17 00:00:00 2001 From: Basit Ali <basitalimundia@gmail.com> Date: Sat, 12 Aug 2017 00:46:58 +0500 Subject: [PATCH 03/35] Ability to configure whether to preserve console logs on preview refresh or not. --- src/index.html | 3 +++ src/script.js | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index f507c84..b5ecd6e 100644 --- a/src/index.html +++ b/src/index.html @@ -455,6 +455,9 @@ <label class="line"> <input type="checkbox" d-change="updateSetting" data-setting="replaceNewTab"> Replace new tab page </label> + <label class="line"> + <input type="checkbox" d-change="updateSetting" data-setting="preserveConsoleLogs"> Preserve console logs + </label> </p> <hr> diff --git a/src/script.js b/src/script.js index 60ca0af..f9eaede 100644 --- a/src/script.js +++ b/src/script.js @@ -1042,6 +1042,10 @@ customEditorFontInput } scope.setPreviewContent = function(isForced) { + if( !prefs.preserveConsoleLogs ) { + scope.clearConsole(); + } + var currentCode = { html: scope.cm.html.getValue(), css: scope.cm.css.getValue(), @@ -1588,6 +1592,7 @@ customEditorFontInput $('[data-setting=editorCustomFont]').value = prefs.editorCustomFont; $('[data-setting=autoSave]').checked = prefs.autoSave; $('[data-setting=autoComplete]').checked = prefs.autoComplete; + $('[data-setting=preserveConsoleLogs]').checked = prefs.preserveConsoleLogs; } /** @@ -2154,7 +2159,8 @@ customEditorFontInput editorFont: 'FiraCode', editorCustomFont: '', autoSave: true, - autoComplete: true + autoComplete: true, + preserveConsoleLogs: true }, function syncGetCallback(result) { if (result.preserveLastCode && lastCode) { @@ -2190,6 +2196,7 @@ customEditorFontInput prefs.editorCustomFont = result.editorCustomFont; prefs.autoSave = result.autoSave; prefs.autoComplete = result.autoComplete; + prefs.preserveConsoleLogs = result.preserveConsoleLogs; updateSettingsInUi(); scope.updateSetting(); From 013e5d40f685a66109573a69ea668f1c12831016 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sat, 19 Aug 2017 17:47:58 +0530 Subject: [PATCH 04/35] update uikit to beta 28 --- src/library-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library-list.js b/src/library-list.js index 58058a8..42a5b5c 100644 --- a/src/library-list.js +++ b/src/library-list.js @@ -69,7 +69,7 @@ window.jsLibs = [ }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/js/uikit.min.js', + 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/js/uikit.min.js', label: 'UIkit 3', type: 'js' } @@ -111,7 +111,7 @@ window.cssLibs = [ }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/css/uikit.min.css', + 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/css/uikit.min.css', label: 'UIkit 3', type: 'css' }, From 230033cb10ea4dff980facd055fe3ec82fe04f55 Mon Sep 17 00:00:00 2001 From: Andrew Luca <thendrluca@gmail.com> Date: Thu, 27 Jul 2017 00:23:45 +0300 Subject: [PATCH 05/35] Add option to enable/disable blur overlay --- src/index.html | 3 +++ src/script.js | 9 ++++++++- src/style.css | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index f507c84..e8235b9 100644 --- a/src/index.html +++ b/src/index.html @@ -455,6 +455,9 @@ <label class="line"> <input type="checkbox" d-change="updateSetting" data-setting="replaceNewTab"> Replace new tab page </label> + <label class="line"> + <input type="checkbox" d-change="updateSetting" data-setting="useBlur"> Use blur overlay (needs restart) + </label> </p> <hr> diff --git a/src/script.js b/src/script.js index 60ca0af..1e614ee 100644 --- a/src/script.js +++ b/src/script.js @@ -1588,6 +1588,11 @@ customEditorFontInput $('[data-setting=editorCustomFont]').value = prefs.editorCustomFont; $('[data-setting=autoSave]').checked = prefs.autoSave; $('[data-setting=autoComplete]').checked = prefs.autoComplete; + $('[data-setting=useBlur]').checked = prefs.useBlur; + + if (prefs.useBlur) { + document.body.classList.add('blur'); + } } /** @@ -2154,7 +2159,8 @@ customEditorFontInput editorFont: 'FiraCode', editorCustomFont: '', autoSave: true, - autoComplete: true + autoComplete: true, + useBlur: true }, function syncGetCallback(result) { if (result.preserveLastCode && lastCode) { @@ -2190,6 +2196,7 @@ customEditorFontInput prefs.editorCustomFont = result.editorCustomFont; prefs.autoSave = result.autoSave; prefs.autoComplete = result.autoComplete; + prefs.useBlur = result.useBlur; updateSettingsInUi(); scope.updateSetting(); diff --git a/src/style.css b/src/style.css index 3dcd712..98a10d5 100644 --- a/src/style.css +++ b/src/style.css @@ -117,7 +117,7 @@ select, input[type="text"], input[type="number"], textarea { will-change: -webkit-filter; transition: 0.10s ease 0.2s; } -.overlay-visible .main-container { +.blur.overlay-visible .main-container { transition-duration: 0.5s; transition-delay: 0.4s; -webkit-filter: blur(3px); From ebdfd2e4bef83f32633e20187fb3e2c58fc7c7a1 Mon Sep 17 00:00:00 2001 From: Andrew Luca <thendrluca@gmail.com> Date: Sat, 19 Aug 2017 23:11:15 +0300 Subject: [PATCH 06/35] =?UTF-8?q?=E2=9A=A1=20Change=20useBlur=20setting=20?= =?UTF-8?q?to=20lightVersion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.html | 2 +- src/script.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.html b/src/index.html index e8235b9..dc87533 100644 --- a/src/index.html +++ b/src/index.html @@ -456,7 +456,7 @@ <input type="checkbox" d-change="updateSetting" data-setting="replaceNewTab"> Replace new tab page </label> <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="useBlur"> Use blur overlay (needs restart) + <input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Toggle fast/light version (needs restart) </label> </p> <hr> diff --git a/src/script.js b/src/script.js index 1e614ee..81c9636 100644 --- a/src/script.js +++ b/src/script.js @@ -1588,9 +1588,9 @@ customEditorFontInput $('[data-setting=editorCustomFont]').value = prefs.editorCustomFont; $('[data-setting=autoSave]').checked = prefs.autoSave; $('[data-setting=autoComplete]').checked = prefs.autoComplete; - $('[data-setting=useBlur]').checked = prefs.useBlur; + $('[data-setting=lightVersion]').checked = prefs.lightVersion; - if (prefs.useBlur) { + if (!prefs.lightVersion) { document.body.classList.add('blur'); } } @@ -2160,7 +2160,7 @@ customEditorFontInput editorCustomFont: '', autoSave: true, autoComplete: true, - useBlur: true + lightVersion: true }, function syncGetCallback(result) { if (result.preserveLastCode && lastCode) { @@ -2196,7 +2196,7 @@ customEditorFontInput prefs.editorCustomFont = result.editorCustomFont; prefs.autoSave = result.autoSave; prefs.autoComplete = result.autoComplete; - prefs.useBlur = result.useBlur; + prefs.lightVersion = result.lightVersion; updateSettingsInUi(); scope.updateSetting(); From 935cab53147405769a204850ec6a1df84a16e1f8 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Fri, 1 Sep 2017 09:42:00 +0530 Subject: [PATCH 07/35] set onboardmodal event as soon as the modal is seen --- src/script.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/script.js b/src/script.js index 60ca0af..fdaf18c 100644 --- a/src/script.js +++ b/src/script.js @@ -2206,15 +2206,14 @@ customEditorFontInput if (!result.lastSeenVersion) { onboardModal.classList.add('is-modal-visible'); trackEvent('ui', 'onboardModalSeen'); - // set the current version as seen on closing the onboard modal + chrome.storage.sync.set( + { + lastSeenVersion: version + }, + function() {} + ); + // set some initial preferences on closing the onboard modal utils.once(document, 'overlaysClosed', function() { - chrome.storage.sync.set( - { - lastSeenVersion: version - }, - function() {} - ); - chrome.storage.sync.set( { replaceNewTab: onboardShowInTabOptionBtn.classList.contains( From aa1108919e1facaf9ab0e3361bc3190e36571115 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Fri, 1 Sep 2017 09:48:26 +0530 Subject: [PATCH 08/35] add charset utf8 in preview html. fixes #173 --- src/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script.js b/src/script.js index fdaf18c..058a6a3 100644 --- a/src/script.js +++ b/src/script.js @@ -924,6 +924,7 @@ customEditorFontInput }, ''); var contents = '<html>\n<head>\n' + + '<meta charset="UTF-8" />\n' + externalCss + '\n' + '<style id="webmakerstyle">\n' + From 0420ef04f392366b9ad30ad3f96f1e9ecd093f40 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Fri, 1 Sep 2017 10:05:42 +0530 Subject: [PATCH 09/35] update vue version. --- src/library-list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library-list.js b/src/library-list.js index 42a5b5c..e19b6d4 100644 --- a/src/library-list.js +++ b/src/library-list.js @@ -37,7 +37,7 @@ window.jsLibs = [ type: 'js' }, { - url: 'https://unpkg.com/vue@2.4.1/dist/vue.min.js', + url: 'https://unpkg.com/vue@2.4.2/dist/vue.min.js', label: 'Vue.js', type: 'js' }, From 004ca688063876e3c3214b20555ff06b47594fdf Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Fri, 1 Sep 2017 10:05:56 +0530 Subject: [PATCH 10/35] add changelog --- src/changelog.html | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/changelog.html b/src/changelog.html index 2fc1714..68bbd3a 100644 --- a/src/changelog.html +++ b/src/changelog.html @@ -1,4 +1,16 @@ <h1>Whats new?</h1> +<div class="notification"> + <span class="notification__version">2.8.1</span> + <ul> + <li>Vue.js & UIKit version updated to latest version in 'Add Library' list.</li> + <li>UTF-8 charset added to preview HTML to support universal characters.</li> + <br> + <li><strong>🚀 Announcement</strong>: Web Maker has a <a href="https://gitter.im/web-maker-app/Lobby" target="_blank">chat lobby on Gitter</a> now - incase you need any help or just want to say Hi!</li> + <li><a href="https://github.com/chinchang/web-maker/issues" target="_blank">Suggest features or report bugs.</a></li> + <li>Thank you for being a part of this community of thousands of awesome developers. If you find Web Maker helpful, <a href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews" target="_blank" class="btn">Please rate Web Maker <span class="star"></span></a> <a href="http://twitter.com/share?url=https://webmakerapp.com/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,editor,chrome,extension" target="_blank" target="_blank" class="btn">Share it</a> <a aria-label="Support the developer" href="https://www.paypal.me/kushagragour" target="_blank" class="btn btn-icon">Support the developer</a></li> + </ul> +</div> + <div class="notification"> <span class="notification__version">2.8.0</span> <ul> @@ -20,10 +32,6 @@ </li> <li>Vue.js version updated to 2.4.0 in popular library list.</li> <li>Downloads permission is optional. Asked only when you take screenshot.</li> - <br> - <li><strong>🚀 Announcement</strong>: Web Maker has a <a href="https://gitter.im/web-maker-app/Lobby" target="_blank">chat lobby on Gitter</a> now - incase you need any help or just want to say Hi!</li> - <li><a href="https://github.com/chinchang/web-maker/issues" target="_blank">Suggest features or report bugs.</a></li> - <li>Thank you for being a part of this community of thousands of awesome developers. If you find Web Maker helpful, <a href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews" target="_blank" class="btn">Please rate Web Maker <span class="star"></span></a> <a href="http://twitter.com/share?url=https://webmakerapp.com/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,editor,chrome,extension" target="_blank" target="_blank" class="btn">Share it</a> <a aria-label="Support the developer" href="https://www.paypal.me/kushagragour" target="_blank" class="btn btn-icon">Support the developer</a></li> </ul> </div> From 83e28635d055ab6aaeb7dc028beefbbd92be8733 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Fri, 1 Sep 2017 10:07:49 +0530 Subject: [PATCH 11/35] bump to 2.8.1 --- package.json | 2 +- src/index.html | 2 +- src/manifest.json | 2 +- src/options.html | 2 +- src/script.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 07321ce..cb238ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "web-maker", - "version": "2.7.2", + "version": "2.8.1", "description": "A blazing fast & offline web playground", "main": "index.html", "devDependencies": { diff --git a/src/index.html b/src/index.html index f507c84..87aa7d0 100644 --- a/src/index.html +++ b/src/index.html @@ -256,7 +256,7 @@ <div class="modal" id="helpModal"> <div class="modal__content"> - <h1>Web Maker<small style="font-size:14px;"> v2.8.0</small></h1> + <h1>Web Maker<small style="font-size:14px;"> v2.8.1</small></h1> <div> <p>Made with <span style="margin-right: 8px;">💖</span> & <span style="margin-right: 8px;">🙌</span> by <a href="https://twitter.com/chinchang457" target="_blank">Kushagra Gour</a></p> <p>Tweet out your feature requests, comments & suggestions to <a target="_blank" href="https://twitter.com/webmakerApp">@webmakerApp</a>.</p> diff --git a/src/manifest.json b/src/manifest.json index 43710c8..3f4d01a 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "Web Maker", - "version": "2.8.0", + "version": "2.8.1", "manifest_version": 2, "description": "Blazing fast & offline playground for your web experiments", "homepage_url": "https://webmakerapp.com", diff --git a/src/options.html b/src/options.html index 189f4ba..762f547 100644 --- a/src/options.html +++ b/src/options.html @@ -29,7 +29,7 @@ </head> <body> <h3>Settings <span style="opacity: 0.6;font-size:0.7em;"> - v2.8.0</span></h3> + v2.8.1</span></h3> <form name="optionsForm"> <label> <input type="checkbox" name="preserveLastCode"> diff --git a/src/script.js b/src/script.js index 058a6a3..f3f0faf 100644 --- a/src/script.js +++ b/src/script.js @@ -12,7 +12,7 @@ customEditorFontInput (function(alertsService) { /* eslint-enable no-extra-semi */ var scope = scope || {}; - var version = '2.8.0'; + var version = '2.8.1'; if (window.DEBUG) { window.scope = scope; From 90f50f5502b28064843b14d4e111ed6a20f78daa Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Mon, 4 Sep 2017 03:17:26 +0530 Subject: [PATCH 12/35] add basic detached preview mode. fixes #92 --- src/detached-window.js | 3 +++ src/index.html | 6 ++++++ src/preview.html | 9 +++++++++ src/script.js | 22 ++++++++++++++++++++++ src/style.css | 19 +++++++++++++++++++ 5 files changed, 59 insertions(+) create mode 100644 src/detached-window.js create mode 100644 src/preview.html diff --git a/src/detached-window.js b/src/detached-window.js new file mode 100644 index 0000000..42e3258 --- /dev/null +++ b/src/detached-window.js @@ -0,0 +1,3 @@ +window.addEventListener('message', e => { + document.querySelector('iframe').src = e.data; +}); diff --git a/src/index.html b/src/index.html index 87aa7d0..8c38fed 100644 --- a/src/index.html +++ b/src/index.html @@ -194,6 +194,12 @@ <rect x="0" y="0" width="100" height="100" /> </svg> </a> + <a class="mode-btn hint--top-left hint--rounded" aria-label="Detach Preview" d-click="openDetachedPreview"> + <svg viewBox="0 0 24 24"> + <path d="M22,17V7H6V17H22M22,5A2,2 0 0,1 24,7V17C24,18.11 23.1,19 22,19H16V21H18V23H10V21H12V19H6C4.89,19 4,18.11 4,17V7A2,2 0 0,1 6,5H22M2,3V15H0V3A2,2 0 0,1 2,1H20V3H2Z" /> + </svg> + </a> + <div class="footer__separator"></div> diff --git a/src/preview.html b/src/preview.html new file mode 100644 index 0000000..32b727b --- /dev/null +++ b/src/preview.html @@ -0,0 +1,9 @@ +<link rel="stylesheet" href="style.css"> + +<body> + + <iframe src="about://blank" frameborder="0" id="demo-frame"></iframe> + + + <script src="detached-window.js"></script> +</body> diff --git a/src/script.js b/src/script.js index f3f0faf..8c38f49 100644 --- a/src/script.js +++ b/src/script.js @@ -1038,6 +1038,9 @@ customEditorFontInput chrome.i18n.getMessage('@@extension_id') + '/temporary/' + 'preview.html'; + if (scope.detachedWindow) { + scope.detachedWindow.postMessage(frame.src, '*'); + } }); }); } @@ -1805,6 +1808,25 @@ customEditorFontInput }); } + scope.openDetachedPreview = function() { + document.body.classList.add('is-detached-mode'); + scope.detachedWindow = window.open( + './preview.html', + 'Web Maker', + 'width=420,height=230,resizable,scrollbars=yes,status=1' + ); + setTimeout(() => { + scope.detachedWindow.postMessage(frame.src, '*'); + }, 1000); + function checkWindow() { + if (scope.detachedWindow && scope.detachedWindow.closed) { + clearInterval(intervalID); + document.body.classList.remove('is-detached-mode'); + } + } + var intervalID = window.setInterval(checkWindow, 500); + }; + function init() { var lastCode; diff --git a/src/style.css b/src/style.css index 3dcd712..ddb877d 100644 --- a/src/style.css +++ b/src/style.css @@ -886,6 +886,25 @@ li.CodeMirror-hint-active { cursor: ns-resize; } +.is-detached-mode .demo-side { + display: none; +} + +.is-detached-mode .code-side { + width: 100% !important; +} + +.layout-4 .code-side { + display: none; +} +.layout-4 .code-side + .gutter { + display: none; +} +.layout-4 .demo-side { + width: 100% !important; +} + + /* Codemirror themes basic bg styles. This is here so that there is no big FOUC while the theme CSS file is loading */ .cm-s-paraiso-dark.CodeMirror { background: #2f1e2e; color: #b9b6b0; } From fc343eb02488cd22ca8042f7da4c26ae79ed8175 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Fri, 8 Sep 2017 10:32:22 +0530 Subject: [PATCH 13/35] add find/replace functionality. fixes #20 --- src/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.html b/src/index.html index 8c38fed..3976560 100644 --- a/src/index.html +++ b/src/index.html @@ -8,6 +8,7 @@ <link rel="stylesheet" href="lib/codemirror/addon/hint/show-hint.css"> <link rel="stylesheet" href="lib/codemirror/addon/fold/foldgutter.css"> + <link rel="stylesheet" href="lib/codemirror/addon/dialog/dialog.css"> <link rel="stylesheet" href="lib/hint.min.css"> <link rel="stylesheet" href="lib/inlet.css"> <link rel="stylesheet" href="style.css"> @@ -577,6 +578,9 @@ <script src="lib/codemirror/addon/hint/html-hint.js"></script> <script src="lib/codemirror/addon/hint/css-hint.js"></script> <script src="lib/codemirror/addon/selection/active-line.js"></script> + <script src="lib/codemirror/addon/search/search.js"></script> + <script src="lib/codemirror/addon/dialog/dialog.js"></script> + <script src="lib/codemirror/addon/search/jump-to-line.js"></script> <script src="lib/codemirror/mode/xml/xml.js"></script> <script src="lib/codemirror/mode/javascript/javascript.js"></script> From 813b30db59b9398b31a2342d07c20b76f22266e5 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Tue, 12 Sep 2017 21:37:02 +0530 Subject: [PATCH 14/35] Refactor settings layout and add help to all settings. fixes #165 --- src/index.html | 194 +++++++++++++++++++++++++------------------------ src/style.css | 7 +- 2 files changed, 103 insertions(+), 98 deletions(-) diff --git a/src/index.html b/src/index.html index e76b5ed..5cfa92f 100644 --- a/src/index.html +++ b/src/index.html @@ -364,113 +364,117 @@ <h1>Settings</h1> <h3>Indentation</h3> - <p> - <div class="line"> - <label> - <input type="radio" checked="true" name="indentation" value="spaces" d-change="updateSetting" data-setting="indentWith"> Spaces - </label> - <label class="ml-1"> - <input type="radio" name="indentation" value="tabs" d-change="updateSetting" data-setting="indentWith"> Tabs - </label> - </div> - <label class="line"> - Indentation Size <input type="range" class="va-m ml-1" value="2" min="1" max="7" list="indentationSizeList" data-setting="indentSize" d-change="updateSetting"> - <span id="indentationSizeValueEl"></span> - <datalist id="indentationSizeList"> - <option>1</option> - <option>2</option> - <option>3</option> - <option>4</option> - <option>5</option> - <option>6</option> - <option>7</option> - </datalist> + <div class="line" title="I know this is tough, but you have to decide one!"> + <label> + <input type="radio" checked="true" name="indentation" value="spaces" d-change="updateSetting" data-setting="indentWith"> Spaces </label> - </p> + <label class="ml-1"> + <input type="radio" name="indentation" value="tabs" d-change="updateSetting" data-setting="indentWith"> Tabs + </label> + </div> + <label class="line" title=""> + Indentation Size <input type="range" class="va-m ml-1" value="2" min="1" max="7" list="indentationSizeList" data-setting="indentSize" d-change="updateSetting"> + <span id="indentationSizeValueEl"></span> + <datalist id="indentationSizeList"> + <option>1</option> + <option>2</option> + <option>3</option> + <option>4</option> + <option>5</option> + <option>6</option> + <option>7</option> + </datalist> + </label> <hr> <h3>Editor</h3> - <p> - <label class="line"> - Default Preprocessors - </label> - <div class="flex line"> - <select style="flex:1;margin:0 20px" data-setting="htmlMode" d-change="updateSetting"> - <option value="html">HTML</option> - <option value="markdown">Markdown</option> - <option value="jade">Pug</option> - </select> - <select style="flex:1;margin:0 20px" data-setting="cssMode" d-change="updateSetting"> - <option value="css">CSS</option> - <option value="scss">SCSS</option> - <option value="sass">SASS</option> - <option value="less">LESS</option> - <option value="stylus">Stylus</option> - <option value="acss">Atomic CSS</option> - </select> - <select style="flex:1;margin:0 20px" data-setting="jsMode" d-change="updateSetting"> - <option value="js">JS</option> - <option value="coffee">CoffeeScript</option> - <option value="es6">ES6 (Babel)</option> - <option value="typescript">TypeScript</option> - </select> - </div> - <label class="line"> - Theme - <select style="flex:1;margin:0 20px" data-setting="editorTheme" d-change="updateSetting"></select> - </label> - <label class="line"> - Font - <select style="flex:1;margin:0 20px" data-setting="editorFont" d-change="updateSetting"> - <option value="FiraCode">Fira Code</option> - <option value="Inconsolata">Inconsolata</option> - <option value="Monoid">Monoid</option> - <option value="FixedSys">FixedSys</option> - <option disabled="disabled">----</option> - <option value="other">Other font from system</option> - </select> - <input id="customEditorFontInput" type="text" value="" placeholder="Custom font name here" data-setting="editorCustomFont" d-change="updateSetting"> - </label> - <label class="line"> - Font Size <input type="number" value="16" data-setting="fontSize" d-change="updateSetting"> px + <div class="flex"> - </label> - <div class="line"> - Key bindings - <label class="ml-1"> - <input type="radio" checked="true" name="keymap" value="sublime" d-change="updateSetting" data-setting="keymap"> Sublime + <div> + <label class="line"> + Default Preprocessors </label> - <label class="ml-1"> - <input type="radio" name="keymap" value="vim" d-change="updateSetting" data-setting="keymap"> Vim + <div class="flex line"> + <select style="flex:1;margin:0 20px" data-setting="htmlMode" d-change="updateSetting"> + <option value="html">HTML</option> + <option value="markdown">Markdown</option> + <option value="jade">Pug</option> + </select> + <select style="flex:1;margin:0 20px" data-setting="cssMode" d-change="updateSetting"> + <option value="css">CSS</option> + <option value="scss">SCSS</option> + <option value="sass">SASS</option> + <option value="less">LESS</option> + <option value="stylus">Stylus</option> + <option value="acss">Atomic CSS</option> + </select> + <select style="flex:1;margin:0 20px" data-setting="jsMode" d-change="updateSetting"> + <option value="js">JS</option> + <option value="coffee">CoffeeScript</option> + <option value="es6">ES6 (Babel)</option> + <option value="typescript">TypeScript</option> + </select> + </div> + <label class="line"> + Theme + <select style="flex:1;margin:0 20px" data-setting="editorTheme" d-change="updateSetting"></select> + </label> + <label class="line"> + Font + <select style="flex:1;margin:0 20px" data-setting="editorFont" d-change="updateSetting"> + <option value="FiraCode">Fira Code</option> + <option value="Inconsolata">Inconsolata</option> + <option value="Monoid">Monoid</option> + <option value="FixedSys">FixedSys</option> + <option disabled="disabled">----</option> + <option value="other">Other font from system</option> + </select> + <input id="customEditorFontInput" type="text" value="" placeholder="Custom font name here" data-setting="editorCustomFont" d-change="updateSetting"> + </label> + <label class="line"> + Font Size <input type="number" value="16" data-setting="fontSize" d-change="updateSetting"> px + + </label> + <div class="line"> + Key bindings + <label class="ml-1"> + <input type="radio" checked="true" name="keymap" value="sublime" d-change="updateSetting" data-setting="keymap"> Sublime + </label> + <label class="ml-1"> + <input type="radio" name="keymap" value="vim" d-change="updateSetting" data-setting="keymap"> Vim + </label> + </div> + </div> + <div class="ml-2"> + <label class="line" title="Your Preview will refresh when you resize the preview split"> + <input type="checkbox" d-change="updateSetting" data-setting="refreshOnResize"> Refresh preview on resize + </label> + <label class="line" title="Turns on the auto-completion suggestions as you type"> + <input type="checkbox" d-change="updateSetting" data-setting="autoComplete"> Auto-complete suggestions + </label> + <label class="line" title="Refreshes the preview as you code. Otherwise use the Run button"> + <input type="checkbox" d-change="updateSetting" data-setting="autoPreview"> Auto-preview + </label> + <label class="line" title="Auto-save keeps saving your code at regular intervals after you hit the first save manually"> + <input type="checkbox" d-change="updateSetting" data-setting="autoSave"> Auto-save + </label> + <label class="line" title="Loads the last open creation when app starts"> + <input type="checkbox" d-change="updateSetting" data-setting="preserveLastCode"> Preserve last written code + </label> + <label class="line" title="Turning this on will start showing Web Maker in every new tab you open"> + <input type="checkbox" d-change="updateSetting" data-setting="replaceNewTab"> Replace new tab page + </label> + <label class="line" title="Preserves the console logs across your preview refreshes"> + <input type="checkbox" d-change="updateSetting" data-setting="preserveConsoleLogs"> Preserve console logs </label> </div> - <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="refreshOnResize"> Refresh preview on resize - </label> - <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="autoComplete"> Auto-complete suggestions - </label> - <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="autoPreview"> Auto-preview - </label> - <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="autoSave"> Auto-save - </label> - <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="preserveLastCode"> Preserve last written code - </label> - <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="replaceNewTab"> Replace new tab page - </label> - <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="preserveConsoleLogs"> Preserve console logs - </label> - </p> + </div> + <hr> <h3>Fun</h3> <p> - <label class="line"> + <label class="line" title="Enjoy wonderful particle blasts while you type"> <input type="checkbox" d-change="updateSetting" data-setting="isCodeBlastOn"> Code blast! </label> </p> diff --git a/src/style.css b/src/style.css index ddb877d..abf5b3e 100644 --- a/src/style.css +++ b/src/style.css @@ -31,6 +31,7 @@ a { text-decoration: none; color: crimson; cursor: pointer; } .opacity--30 { opacity: 0.3; } .pointer-none { pointer-events: none; } .ml-1 { margin-left: 1rem; } +.ml-2 { margin-left: 2rem; } hr { background: 0; border: 0; @@ -462,8 +463,8 @@ li.CodeMirror-hint-active { /* Make settings modal smaller */ @media screen and (min-width: 600px) { .modal--settings { - width: 600px; - margin-left: -300px; + /* width: 600px; */ + /* margin-left: -300px; */ } } .saved-items-pane { @@ -944,4 +945,4 @@ while the theme CSS file is loading */ color: #D1EDFF; } .cm-s-midnight .CodeMirror-gutters { background: #0F192A; border-right: 1px solid; } -.cm-s-midnight .CodeMirror-activeline-background { background: #253540; } +.cm-s-midnight .CodeMirror-activeline-background { background: #253540; } \ No newline at end of file From 1693afa74713248a46914857eda5e13414f2b282 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Wed, 13 Sep 2017 00:12:25 +0530 Subject: [PATCH 15/35] add configurations support for ACSS. fixes #109 --- src/index.html | 15 +++++++++++++++ src/script.js | 40 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/src/index.html b/src/index.html index 5cfa92f..84be713 100644 --- a/src/index.html +++ b/src/index.html @@ -101,6 +101,11 @@ </select> </label> <div class="code-wrap__header-right-options"> + <a href="#" id="cssSettingsBtn" title="Atomic CSS configuration" d-click="openCssSettingsModal" class="code-wrap__header-btn hide"> + <svg> + <use xlink:href="#settings-icon"></use> + </svg> + </a> <a class="js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn" title="Toggle code pane"> </a> </div> @@ -261,6 +266,16 @@ </div> </div> + <div class="modal" id="cssSettingsModal"> + <div class="modal__content"> + <h1>Atomic CSS Settings</h1> + <h3>Configure Atomizer settings. <a href="https://github.com/acss-io/atomizer#api" target="_blank">Read more</a> about available settings.</h3> + <div style="height: calc(100vh - 350px);"> + <textarea id="acssSettingsTextarea" cols="30" rows="10"></textarea> + </div> + </div> + </div> + <div class="modal" id="helpModal"> <div class="modal__content"> <h1>Web Maker<small style="font-size:14px;"> v2.8.1</small></h1> diff --git a/src/script.js b/src/script.js index d896bb2..518629e 100644 --- a/src/script.js +++ b/src/script.js @@ -6,7 +6,7 @@ notificationsModal, notificationsBtn, codepenBtn, saveHtmlBtn, saveBtn, settings onboardModal, settingsModal, notificationsBtn, onboardShowInTabOptionBtn, editorThemeLinkTag, onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl, indentationSizeValueEl, runBtn, searchInput, consoleEl, consoleLogEl, logCountEl, fontStyleTag, fontStyleTemplate, -customEditorFontInput +customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea */ /* eslint-disable no-extra-semi */ (function(alertsService) { @@ -95,7 +95,8 @@ customEditorFontInput cmPath: 'css', cmMode: 'css', codepenVal: 'notsupported', - cmDisable: true + cmDisable: true, + hasSettings: true }; const AUTO_SAVE_INTERVAL = 15000; // 15 seconds @@ -369,6 +370,9 @@ customEditorFontInput currentItem.htmlMode = htmlMode; currentItem.cssMode = cssMode; currentItem.jsMode = jsMode; + currentItem.cssSettings = { + acssConfig: scope.acssSettingsCm.getValue() + }; currentItem.updatedOn = Date.now(); currentItem.layoutMode = currentLayoutMode; currentItem.externalLibs = { @@ -592,6 +596,11 @@ customEditorFontInput scope.cm.css.refresh(); scope.cm.js.refresh(); + scope.acssSettingsCm.setValue( + currentItem.cssSettings ? currentItem.cssSettings.acssConfig : '' + ); + scope.acssSettingsCm.refresh(); + scope.clearConsole(); // To have the library count updated @@ -614,6 +623,7 @@ customEditorFontInput addLibraryModal.classList.remove('is-modal-visible'); onboardModal.classList.remove('is-modal-visible'); settingsModal.classList.remove('is-modal-visible'); + cssSettingsModal.classList.remove('is-modal-visible'); toggleSavedItemsPane(false); document.dispatchEvent(new Event('overlaysClosed')); } @@ -681,6 +691,9 @@ customEditorFontInput cssModelLabel.parentElement.querySelector('select').value = value; scope.cm.css.setOption('mode', modes[value].cmMode); scope.cm.css.setOption('readOnly', modes[value].cmDisable); + cssSettingsBtn.classList[modes[value].hasSettings ? 'remove' : 'add']( + 'hide' + ); CodeMirror.autoLoadMode( scope.cm.css, modes[value].cmPath || modes[value].cmMode @@ -770,7 +783,15 @@ customEditorFontInput } else if (cssMode === CssModes.ACSS) { const html = scope.cm.html.getValue(); const foundClasses = atomizer.findClassNames(html); - const finalConfig = atomizer.getConfig(foundClasses, {}); + var finalConfig; + try { + finalConfig = atomizer.getConfig( + foundClasses, + JSON.parse(scope.acssSettingsCm.getValue()) + ); + } catch (e) { + finalConfig = atomizer.getConfig(foundClasses, {}); + } const acss = atomizer.getCss(finalConfig); scope.cm.css.setValue(acss); d.resolve(acss); @@ -1046,7 +1067,7 @@ customEditorFontInput } scope.setPreviewContent = function(isForced) { - if( !prefs.preserveConsoleLogs ) { + if (!prefs.preserveConsoleLogs) { scope.clearConsole(); } @@ -1832,6 +1853,10 @@ customEditorFontInput var intervalID = window.setInterval(checkWindow, 500); }; + scope.openCssSettingsModal = function() { + scope.toggleModal(cssSettingsModal); + }; + function init() { var lastCode; @@ -2270,6 +2295,13 @@ customEditorFontInput } ); + scope.acssSettingsCm = CodeMirror.fromTextArea(acssSettingsTextarea, { + mode: 'json' + }); + scope.acssSettingsCm.on('blur', () => { + scope.setPreviewContent(true); + }); + var options = ''; [ '3024-day', From 02c32a3eaac107a095968acd54e5d72766c23fe4 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Wed, 13 Sep 2017 00:15:35 +0530 Subject: [PATCH 16/35] set same theme on acss config codemirror --- src/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/script.js b/src/script.js index 518629e..c7d4eec 100644 --- a/src/script.js +++ b/src/script.js @@ -1690,6 +1690,10 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea scope.cm[type].refresh(); }); scope.consoleCm.setOption('theme', $('[data-setting=editorTheme]').value); + scope.acssSettingsCm.setOption( + 'theme', + $('[data-setting=editorTheme]').value + ); if (prefs.autoSave) { if (!autoSaveInterval) { autoSaveInterval = setInterval(autoSaveLoop, AUTO_SAVE_INTERVAL); @@ -2296,7 +2300,7 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea ); scope.acssSettingsCm = CodeMirror.fromTextArea(acssSettingsTextarea, { - mode: 'json' + mode: 'application/ld+json' }); scope.acssSettingsCm.on('blur', () => { scope.setPreviewContent(true); From 6232d7a12cdf0b4cf1ce1cf674db29cde237a48f Mon Sep 17 00:00:00 2001 From: jlapitan <jlapitan@gmail.com> Date: Thu, 14 Sep 2017 15:09:37 +0400 Subject: [PATCH 17/35] add bootstrap 4 beta library --- src/library-list.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/library-list.js b/src/library-list.js index e19b6d4..dd7172a 100644 --- a/src/library-list.js +++ b/src/library-list.js @@ -15,6 +15,13 @@ window.jsLibs = [ label: 'Bootstrap 4α', type: 'js' }, + { + url: + 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js', + label: 'Bootstrap 4β', + type: 'js' + }, + { url: 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/js/foundation.min.js', @@ -87,6 +94,12 @@ window.cssLibs = [ label: 'Bootstrap 4α', type: 'css' }, + { + url: + 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css', + label: 'Bootstrap 4β', + type: 'css' + }, { url: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.2/css/bulma.min.css', label: 'Bulma', From 6494b4ccda78e0d2f14efcbfb59e566970aec00f Mon Sep 17 00:00:00 2001 From: jlapitan <jlapitan@gmail.com> Date: Thu, 14 Sep 2017 15:16:20 +0400 Subject: [PATCH 18/35] fix trailing space --- src/library-list.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/library-list.js b/src/library-list.js index dd7172a..bb46cc9 100644 --- a/src/library-list.js +++ b/src/library-list.js @@ -21,7 +21,6 @@ window.jsLibs = [ label: 'Bootstrap 4β', type: 'js' }, - { url: 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/js/foundation.min.js', From a8ec36cc49e899a08206fe90dcf675309d09cfc4 Mon Sep 17 00:00:00 2001 From: May Kittens Devour Your Soul <yoshimitsu002@gmail.com> Date: Fri, 15 Sep 2017 10:16:22 +0200 Subject: [PATCH 19/35] Update library-list.js * updated foundation | bulma * updated vue | react | d3 * removed bootstrap alpha in favor of bootstrap beta (in another pull request already) * added Semantic UI as requested in #189 --- src/library-list.js | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/library-list.js b/src/library-list.js index e19b6d4..88216e7 100644 --- a/src/library-list.js +++ b/src/library-list.js @@ -11,14 +11,14 @@ window.jsLibs = [ }, { url: - 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js', - label: 'Bootstrap 4α', + 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/js/foundation.min.js', + label: 'Foundation', type: 'js' }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/js/foundation.min.js', - label: 'Foundation', + 'https://semantic-ui.com/dist/semantic.min.js', + label: 'Semantic UI', type: 'js' }, { @@ -32,12 +32,12 @@ window.jsLibs = [ type: 'js' }, { - url: 'https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react-dom.min.js', + url: 'https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react-dom.min.js', label: 'React DOM', type: 'js' }, { - url: 'https://unpkg.com/vue@2.4.2/dist/vue.min.js', + url: 'https://unpkg.com/vue@2.4.4/dist/vue.min.js', label: 'Vue.js', type: 'js' }, @@ -47,7 +47,7 @@ window.jsLibs = [ type: 'js' }, { - url: 'https://cdnjs.cloudflare.com/ajax/libs/d3/4.9.1/d3.min.js', + url: 'https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.2/d3.min.js', label: 'D3', type: 'js' }, @@ -69,7 +69,7 @@ window.jsLibs = [ }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/js/uikit.min.js', + 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/js/uikit.min.js', label: 'UIkit 3', type: 'js' } @@ -82,19 +82,13 @@ window.cssLibs = [ type: 'css' }, { - url: - 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css', - label: 'Bootstrap 4α', - type: 'css' - }, - { - url: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.2/css/bulma.min.css', + url: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.2/css/bulma.min.css', label: 'Bulma', type: 'css' }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/css/foundation.min.css', + 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/css/foundation.min.css', label: 'Foundation', type: 'css' }, @@ -103,6 +97,11 @@ window.cssLibs = [ label: 'Hint.css', type: 'css' }, + { + url:'https://semantic-ui.com/dist/semantic.min.css', + label: 'Semantic UI', + type: 'css' + }, { url: 'https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.4/css/uikit.min.css', @@ -111,7 +110,7 @@ window.cssLibs = [ }, { url: - 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.28/css/uikit.min.css', + 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/css/uikit.min.css', label: 'UIkit 3', type: 'css' }, From eb1cd50ebbb78d74a326d7ccc63403c5bc25ff9a Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sat, 16 Sep 2017 16:56:03 +0530 Subject: [PATCH 20/35] refactor code for light version mode. fixes #172 --- src/index.html | 8 ++++---- src/script.js | 8 ++++---- src/style.css | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/index.html b/src/index.html index db4c0fe..bcda82d 100644 --- a/src/index.html +++ b/src/index.html @@ -460,7 +460,7 @@ </label> </div> </div> - <div class="ml-2"> + <div class="ml-2"> <label class="line" title="Your Preview will refresh when you resize the preview split"> <input type="checkbox" d-change="updateSetting" data-setting="refreshOnResize"> Refresh preview on resize </label> @@ -482,9 +482,9 @@ <label class="line" title="Preserves the console logs across your preview refreshes"> <input type="checkbox" d-change="updateSetting" data-setting="preserveConsoleLogs"> Preserve console logs </label> - <label class="line"> - <input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Toggle fast/light version (needs restart) - </label> + <label class="line" title="Switch to lighter version for better performance. Removes things like blur etc."> + <input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Fast/light version (needs refresh) + </label> </div> </div> diff --git a/src/script.js b/src/script.js index 71de9b1..ab8ae4f 100644 --- a/src/script.js +++ b/src/script.js @@ -1619,10 +1619,6 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea $('[data-setting=autoComplete]').checked = prefs.autoComplete; $('[data-setting=preserveConsoleLogs]').checked = prefs.preserveConsoleLogs; $('[data-setting=lightVersion]').checked = prefs.lightVersion; - - if (!prefs.lightVersion) { - document.body.classList.add('blur'); - } } /** @@ -1707,6 +1703,10 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea clearInterval(autoSaveInterval); autoSaveInterval = null; } + + document.body.classList[prefs.lightVersion ? 'add' : 'false']( + 'light-version' + ); }; scope.onNewBtnClick = function() { diff --git a/src/style.css b/src/style.css index dc4ebcf..4483607 100644 --- a/src/style.css +++ b/src/style.css @@ -118,10 +118,11 @@ select, input[type="text"], input[type="number"], textarea { will-change: -webkit-filter; transition: 0.10s ease 0.2s; } -.blur.overlay-visible .main-container { +body:not(.light-version).overlay-visible .main-container { transition-duration: 0.5s; transition-delay: 0.4s; -webkit-filter: blur(3px); + filter: blur(3px); } .code-side, .demo-side { From cd2ab830e126067b63ad1e66a2d76083fc643baf Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sat, 16 Sep 2017 17:52:34 +0530 Subject: [PATCH 21/35] Add line wrap settings. fixes #186 --- src/index.html | 3 +++ src/script.js | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index bcda82d..b5c370c 100644 --- a/src/index.html +++ b/src/index.html @@ -461,6 +461,9 @@ </div> </div> <div class="ml-2"> + <label class="line" title="Toggle wrapping of long sentences onto new line"> + <input type="checkbox" d-change="updateSetting" data-setting="lineWrap"> Line wrap + </label> <label class="line" title="Your Preview will refresh when you resize the preview split"> <input type="checkbox" d-change="updateSetting" data-setting="refreshOnResize"> Refresh preview on resize </label> diff --git a/src/script.js b/src/script.js index ab8ae4f..966f712 100644 --- a/src/script.js +++ b/src/script.js @@ -1619,6 +1619,7 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea $('[data-setting=autoComplete]').checked = prefs.autoComplete; $('[data-setting=preserveConsoleLogs]').checked = prefs.preserveConsoleLogs; $('[data-setting=lightVersion]').checked = prefs.lightVersion; + $('[data-setting=lineWrap]').checked = prefs.lineWrap; } /** @@ -1688,6 +1689,10 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea 'keyMap', $('[data-setting=keymap]:checked').value ); + scope.cm[type].setOption( + 'lineWrapping', + $('[data-setting=lineWrap]').checked + ); scope.cm[type].refresh(); }); scope.consoleCm.setOption('theme', $('[data-setting=editorTheme]').value); @@ -2030,7 +2035,6 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea } // Ctrl/⌘ + Shift + 5 if ( - !prefs.autoPreview && (event.ctrlKey || event.metaKey) && event.shiftKey && event.keyCode === 53 @@ -2218,7 +2222,8 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea autoSave: true, autoComplete: true, preserveConsoleLogs: true, - lightVersion: true + lightVersion: true, + lineWrap: true }, function syncGetCallback(result) { if (result.preserveLastCode && lastCode) { @@ -2256,6 +2261,7 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea prefs.autoComplete = result.autoComplete; prefs.preserveConsoleLogs = result.preserveConsoleLogs; prefs.lightVersion = result.lightVersion; + prefs.lineWrap = result.lineWrap; updateSettingsInUi(); scope.updateSetting(); From 95bcd036f19d093dbf0148ceb1bac818e4b24082 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sat, 16 Sep 2017 17:53:42 +0530 Subject: [PATCH 22/35] add semantic-ui.com to manifest --- src/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.json b/src/manifest.json index 3f4d01a..b6da806 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -6,7 +6,7 @@ "homepage_url": "https://webmakerapp.com", "permissions": ["storage", "tabs", "<all_urls>"], "optional_permissions": ["downloads"], - "content_security_policy": "script-src 'self' filesystem: http://localhost:* https://localhost:* https://ajax.googleapis.com https://code.jquery.com https://cdnjs.cloudflare.com https://unpkg.com https://maxcdn.com https://cdn77.com https://maxcdn.bootstrapcdn.com https://cdn.jsdelivr.net/ https://*.stripe.com/ https://builds.framerjs.com/ https://rawgit.com https://wzrd.in https://www.google-analytics.com 'unsafe-eval'; object-src 'self'", + "content_security_policy": "script-src 'self' filesystem: http://localhost:* https://localhost:* https://ajax.googleapis.com https://code.jquery.com https://cdnjs.cloudflare.com https://unpkg.com https://maxcdn.com https://cdn77.com https://maxcdn.bootstrapcdn.com https://cdn.jsdelivr.net/ https://*.stripe.com/ https://builds.framerjs.com/ https://rawgit.com https://wzrd.in https://semantic-ui.com https://www.google-analytics.com 'unsafe-eval'; object-src 'self'", "options_ui": { "page": "options.html", "chrome_style": true From eadccb5c2e0a367c669124ea15e31ae469216bd4 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sat, 16 Sep 2017 18:01:18 +0530 Subject: [PATCH 23/35] typo in lightversion condition --- src/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script.js b/src/script.js index 966f712..588fda9 100644 --- a/src/script.js +++ b/src/script.js @@ -1709,7 +1709,7 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea autoSaveInterval = null; } - document.body.classList[prefs.lightVersion ? 'add' : 'false']( + document.body.classList[prefs.lightVersion ? 'add' : 'remove']( 'light-version' ); }; From 99800a728c5aea7b8f727391fd61e6250c777169 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sat, 16 Sep 2017 19:04:59 +0530 Subject: [PATCH 24/35] some mroe fixes for detached mode. fixes #92 --- src/script.js | 3 +++ src/style.css | 28 ++++++++++------------------ 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/script.js b/src/script.js index 588fda9..251f14b 100644 --- a/src/script.js +++ b/src/script.js @@ -912,6 +912,9 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea }; window.onunload = function() { saveCode('code'); + if (scope.detachedWindow) { + scope.detachedWindow.close(); + } }; function cleanupErrors(lang) { diff --git a/src/style.css b/src/style.css index 4483607..3e912c2 100644 --- a/src/style.css +++ b/src/style.css @@ -156,6 +156,16 @@ body:not(.light-version).overlay-visible .main-container { .layout-4 .demo-side { width: 100% !important; } +.is-detached-mode .demo-side { + display: none; +} +.is-detached-mode .code-side { + width: 100% !important; +} +.is-detached-mode.layout-2 .code-side { + height: auto !important; +} + .code-wrap { display: flex; flex-direction: column; @@ -888,24 +898,6 @@ li.CodeMirror-hint-active { cursor: ns-resize; } -.is-detached-mode .demo-side { - display: none; -} - -.is-detached-mode .code-side { - width: 100% !important; -} - -.layout-4 .code-side { - display: none; -} -.layout-4 .code-side + .gutter { - display: none; -} -.layout-4 .demo-side { - width: 100% !important; -} - /* Codemirror themes basic bg styles. This is here so that there is no big FOUC while the theme CSS file is loading */ From afd491b5430a3a5cbf77f89a6927a3b8be479a3d Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sat, 16 Sep 2017 19:26:54 +0530 Subject: [PATCH 25/35] fixes for acss config. fixes #109 --- src/script.js | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/src/script.js b/src/script.js index 251f14b..f153e9d 100644 --- a/src/script.js +++ b/src/script.js @@ -781,20 +781,24 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea d.resolve(result); }); } else if (cssMode === CssModes.ACSS) { - const html = scope.cm.html.getValue(); - const foundClasses = atomizer.findClassNames(html); - var finalConfig; - try { - finalConfig = atomizer.getConfig( - foundClasses, - JSON.parse(scope.acssSettingsCm.getValue()) - ); - } catch (e) { - finalConfig = atomizer.getConfig(foundClasses, {}); + if (!window.atomizer) { + d.resolve(''); + } else { + const html = scope.cm.html.getValue(); + const foundClasses = atomizer.findClassNames(html); + var finalConfig; + try { + finalConfig = atomizer.getConfig( + foundClasses, + JSON.parse(scope.acssSettingsCm.getValue()) + ); + } catch (e) { + finalConfig = atomizer.getConfig(foundClasses, {}); + } + const acss = atomizer.getCss(finalConfig); + scope.cm.css.setValue(acss); + d.resolve(acss); } - const acss = atomizer.getCss(finalConfig); - scope.cm.css.setValue(acss); - d.resolve(acss); } return d.promise; @@ -1872,6 +1876,11 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea scope.openCssSettingsModal = function() { scope.toggleModal(cssSettingsModal); + setTimeout(() => { + // Refresh is required because codemirror gets scaled inside modal and loses alignement. + scope.acssSettingsCm.refresh(); + scope.acssSettingsCm.focus(); + }, 500); }; function init() { From 748c8a0b00a2bee797c63fda8dbe128c7253a333 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sat, 16 Sep 2017 19:27:28 +0530 Subject: [PATCH 26/35] focus detached window if already present and size it same as iframe. fixes #92 --- src/script.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/script.js b/src/script.js index f153e9d..c0b0bdf 100644 --- a/src/script.js +++ b/src/script.js @@ -1856,11 +1856,19 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea } scope.openDetachedPreview = function() { + if (scope.detachedWindow) { + scope.detachedWindow.focus(); + return; + } + var iframeBounds = frame.getBoundingClientRect(); + const iframeWidth = iframeBounds.width; + const iframeHeight = iframeBounds.height; document.body.classList.add('is-detached-mode'); + scope.detachedWindow = window.open( './preview.html', 'Web Maker', - 'width=420,height=230,resizable,scrollbars=yes,status=1' + `width=${iframeWidth},height=${iframeHeight},resizable,scrollbars=yes,status=1` ); setTimeout(() => { scope.detachedWindow.postMessage(frame.src, '*'); From 2879758ae0255224dc7aa5a082facb8c76e435dd Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 01:36:54 +0530 Subject: [PATCH 27/35] Make console work with detached mode also. fixes #92 --- src/index.html | 3 ++- src/script.js | 6 +++++- src/style.css | 18 +++++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/index.html b/src/index.html index b5c370c..1097f31 100644 --- a/src/index.html +++ b/src/index.html @@ -155,7 +155,8 @@ </div> </div> </div> - <div class="footer"> + <div class="global-console-container" id="globalConsoleContainerEl"></div> + <div id="footer" class="footer"> <div class="footer__right fr"> <a id="saveHtmlBtn" class="mode-btn hint--rounded hint--top-left" data-hint="Save as HTML file"> <svg viewBox="0 0 24 24"> diff --git a/src/script.js b/src/script.js index c0b0bdf..33db7ca 100644 --- a/src/script.js +++ b/src/script.js @@ -6,7 +6,8 @@ notificationsModal, notificationsBtn, codepenBtn, saveHtmlBtn, saveBtn, settings onboardModal, settingsModal, notificationsBtn, onboardShowInTabOptionBtn, editorThemeLinkTag, onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl, indentationSizeValueEl, runBtn, searchInput, consoleEl, consoleLogEl, logCountEl, fontStyleTag, fontStyleTemplate, -customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea +customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea, +globalConsoleContainerEl */ /* eslint-disable no-extra-semi */ (function(alertsService) { @@ -1864,6 +1865,7 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea const iframeWidth = iframeBounds.width; const iframeHeight = iframeBounds.height; document.body.classList.add('is-detached-mode'); + globalConsoleContainerEl.insertBefore(consoleEl, null); scope.detachedWindow = window.open( './preview.html', @@ -1877,6 +1879,8 @@ customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea if (scope.detachedWindow && scope.detachedWindow.closed) { clearInterval(intervalID); document.body.classList.remove('is-detached-mode'); + $('#js-demo-side').insertBefore(consoleEl, null); + scope.detachedWindow = null; } } var intervalID = window.setInterval(checkWindow, 500); diff --git a/src/style.css b/src/style.css index 3e912c2..b9b2a1a 100644 --- a/src/style.css +++ b/src/style.css @@ -296,6 +296,10 @@ li.CodeMirror-hint-active { z-index: 1; background: white; } +/* When demo frame is in detached window */ +body > #demo-frame { + height: 100%; /* Because console is no more here */ +} .main-header, .footer { padding: 5px 10px; @@ -897,7 +901,19 @@ li.CodeMirror-hint-active { .console:not(.is-minimized) .code-wrap__header { cursor: ns-resize; } - +.global-console-container { + display: none; + position: relative; + height: 35px; +} +/* Detached mode */ +.is-detached-mode .console, +.is-detached-mode .footer { + z-index: 4; +} +.is-detached-mode .global-console-container { + display: block; +} /* Codemirror themes basic bg styles. This is here so that there is no big FOUC while the theme CSS file is loading */ From c044513e9036ca8e6263ac507c03de31ec88ceba Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 01:39:47 +0530 Subject: [PATCH 28/35] screenslog.js: Fix parent reference fixes #92 --- src/lib/screenlog.js | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/lib/screenlog.js b/src/lib/screenlog.js index 010fec8..a6dd519 100644 --- a/src/lib/screenlog.js +++ b/src/lib/screenlog.js @@ -1,20 +1,19 @@ -(function () { - +(function() { var logEl, isInitialized = false, _console = {}; // backup console obj to contain references of overridden fns. - _options = { - bgColor: 'black', - logColor: 'lightgreen', - infoColor: 'blue', - warnColor: 'orange', - errorColor: 'red', - freeConsole: false, - css: '', - autoScroll: true, - proxyCallback: null, - noUi: false - }; + _options = { + bgColor: 'black', + logColor: 'lightgreen', + infoColor: 'blue', + warnColor: 'orange', + errorColor: 'red', + freeConsole: false, + css: '', + autoScroll: true, + proxyCallback: null, + noUi: false + }; function createElement(tag, css) { var element = document.createElement(tag); @@ -23,7 +22,13 @@ } function createPanel() { - var div = createElement('div', 'z-index:2147483647;font-family:Helvetica,Arial,sans-serif;font-size:10px;font-weight:bold;padding:5px;text-align:left;opacity:0.8;position:fixed;right:0;top:0;min-width:200px;max-height:50vh;overflow:auto;background:' + _options.bgColor + ';' + _options.css); + var div = createElement( + 'div', + 'z-index:2147483647;font-family:Helvetica,Arial,sans-serif;font-size:10px;font-weight:bold;padding:5px;text-align:left;opacity:0.8;position:fixed;right:0;top:0;min-width:200px;max-height:50vh;overflow:auto;background:' + + _options.bgColor + + ';' + + _options.css + ); return div; } @@ -170,18 +175,19 @@ destroy: checkInitDecorator(destroy) }; })(); +var mainWindow = window.parent.onMessageFromConsole ? window.parent : window.parent.opener; screenLog.init({ noUi: true, proxyCallback: function () { - window.parent.onMessageFromConsole.apply(null, arguments); + mainWindow.onMessageFromConsole.apply(null, arguments); } }); window._wmEvaluate = function _wmEvaluate(expr) { try { var result = eval(expr); } catch(e) { - window.parent.onMessageFromConsole.call(null, e); + mainWindow.onMessageFromConsole.call(null, e); return; } - window.parent.onMessageFromConsole.call(null, result); + mainWindow.onMessageFromConsole.call(null, result); } \ No newline at end of file From 87aaffe3284cf131b079320adc6da16172893f5e Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 02:20:34 +0530 Subject: [PATCH 29/35] add changelog --- src/changelog.html | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/changelog.html b/src/changelog.html index 68bbd3a..092cc8f 100644 --- a/src/changelog.html +++ b/src/changelog.html @@ -1,13 +1,34 @@ <h1>Whats new?</h1> + +<div class="notification"> + <span class="notification__version">2.9.0</span> + <ul> + <li><a href="https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6" target="_blank">Read blog post about this release.</a></li> + <li><strong>Detached Preview</strong> - Yes, you read that correct! You can now detach your preview and send it to your secondary monitor. + </li> + <li><strong>Find & Replae</strong> - Long awaited, now its there. Ctrl/Cmd+f to find and add Alt to replace.</li> + <li><strong>Atomic CSS (Atomizer) configurations</strong> - Add custom config for Atomic CSS. <a href="https://github.com/acss-io/atomizer#api" target="_blank">Read more</a>.</li> + <li><strong>Light mode</strong> - This new setting makes Web Maker drop some heavy effects like blur etc to gain more performance. Thanks <a href="https://github.com/iamandrewluca" target="_blank">Andrew</a>.</li> + <li><strong>Preserve logs setting</strong> - Choose whether or not to preserve logs across preview refreshes. Thanks <a href="https://github.com/BasitAli" target="_blank">Basit</a>.</li> + <li><strong>Line wrap setting</strong> - As the name says.</li> + <li>Semantic UI added to popular libraries.</li> + <li>Bootstrap, Vue, UI-Kit and more updated to latest versions in popular libraries.</li> + <li>UX improvements in settings UI</li> + + <li><strong>Bugfix</strong> - Trigger preview refresh anytime with Ctrl/⌘ + Shift + 5. Even with auto-preview on.</li> + + <br> + <li><strong>🚀 Announcement</strong>: Web Maker has a <a href="https://gitter.im/web-maker-app/Lobby" target="_blank">chat lobby on Gitter</a> now - incase you need any help or just want to say Hi!</li> + <li><a href="https://github.com/chinchang/web-maker/issues" target="_blank">Suggest features or report bugs.</a></li> + <li>Thank you for being a part of this community of thousands of awesome developers. If you find Web Maker helpful, <a href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews" target="_blank" class="btn">Please rate Web Maker <span class="star"></span></a> <a href="http://twitter.com/share?url=https://webmakerapp.com/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,editor,chrome,extension" target="_blank" target="_blank" class="btn">Share it</a> <a aria-label="Support the developer" href="https://www.paypal.me/kushagragour" target="_blank" class="btn btn-icon">Support the developer</a></li> + </ul> +</div> + <div class="notification"> <span class="notification__version">2.8.1</span> <ul> <li>Vue.js & UIKit version updated to latest version in 'Add Library' list.</li> <li>UTF-8 charset added to preview HTML to support universal characters.</li> - <br> - <li><strong>🚀 Announcement</strong>: Web Maker has a <a href="https://gitter.im/web-maker-app/Lobby" target="_blank">chat lobby on Gitter</a> now - incase you need any help or just want to say Hi!</li> - <li><a href="https://github.com/chinchang/web-maker/issues" target="_blank">Suggest features or report bugs.</a></li> - <li>Thank you for being a part of this community of thousands of awesome developers. If you find Web Maker helpful, <a href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews" target="_blank" class="btn">Please rate Web Maker <span class="star"></span></a> <a href="http://twitter.com/share?url=https://webmakerapp.com/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,editor,chrome,extension" target="_blank" target="_blank" class="btn">Share it</a> <a aria-label="Support the developer" href="https://www.paypal.me/kushagragour" target="_blank" class="btn btn-icon">Support the developer</a></li> </ul> </div> From 12f8924450d6b54c22323b53bb9c4a8e06a55347 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 02:25:19 +0530 Subject: [PATCH 30/35] index.html: indentation fix --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 1097f31..dd07923 100644 --- a/src/index.html +++ b/src/index.html @@ -486,7 +486,7 @@ <label class="line" title="Preserves the console logs across your preview refreshes"> <input type="checkbox" d-change="updateSetting" data-setting="preserveConsoleLogs"> Preserve console logs </label> - <label class="line" title="Switch to lighter version for better performance. Removes things like blur etc."> + <label class="line" title="Switch to lighter version for better performance. Removes things like blur etc."> <input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Fast/light version (needs refresh) </label> </div> From 415f5fde60e77dc88e6ecbeb7d054c842d0cacb7 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 02:27:00 +0530 Subject: [PATCH 31/35] index.html: copy change for light mode settings --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index dd07923..3bca5f0 100644 --- a/src/index.html +++ b/src/index.html @@ -487,7 +487,7 @@ <input type="checkbox" d-change="updateSetting" data-setting="preserveConsoleLogs"> Preserve console logs </label> <label class="line" title="Switch to lighter version for better performance. Removes things like blur etc."> - <input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Fast/light version (needs refresh) + <input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Fast/light version </label> </div> </div> From 1d5b647a12c141385570fe45872ce0fd95f756a1 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 02:28:43 +0530 Subject: [PATCH 32/35] library-list.js: update indentation --- src/library-list.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/library-list.js b/src/library-list.js index cbfdc7a..d58efc6 100644 --- a/src/library-list.js +++ b/src/library-list.js @@ -11,11 +11,11 @@ window.jsLibs = [ }, { url: - 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js', + 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js', label: 'Bootstrap 4β', type: 'js' }, - { + { url: 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/js/foundation.min.js', label: 'Foundation', @@ -92,19 +92,19 @@ window.cssLibs = [ label: 'Bootstrap 4β', type: 'css' }, - { + { url: 'https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/css/foundation.min.css', label: 'Foundation', type: 'css' }, - { - url:'https://semantic-ui.com/dist/semantic.min.css', + { + url: 'https://semantic-ui.com/dist/semantic.min.css', label: 'Semantic UI', type: 'css' }, { - url: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.2/css/bulma.min.css', + url: 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.2/css/bulma.min.css', label: 'Bulma', type: 'css' }, From 576a707cd4b0312f611c8543eef7f909ffa62d82 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 02:33:44 +0530 Subject: [PATCH 33/35] script.js: save settings when available only. --- src/script.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/script.js b/src/script.js index 33db7ca..1d0d246 100644 --- a/src/script.js +++ b/src/script.js @@ -371,9 +371,11 @@ globalConsoleContainerEl currentItem.htmlMode = htmlMode; currentItem.cssMode = cssMode; currentItem.jsMode = jsMode; - currentItem.cssSettings = { - acssConfig: scope.acssSettingsCm.getValue() - }; + if (modes[cssMode].hasSettings) { + currentItem.cssSettings = { + acssConfig: scope.acssSettingsCm.getValue() + }; + } currentItem.updatedOn = Date.now(); currentItem.layoutMode = currentLayoutMode; currentItem.externalLibs = { From ea2c34efaa2112006e07a8fa7c184513e7f2cc26 Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 02:36:42 +0530 Subject: [PATCH 34/35] script.js: set default of lightVersion as false --- src/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script.js b/src/script.js index 1d0d246..64c1bce 100644 --- a/src/script.js +++ b/src/script.js @@ -2248,7 +2248,7 @@ globalConsoleContainerEl autoSave: true, autoComplete: true, preserveConsoleLogs: true, - lightVersion: true, + lightVersion: false, lineWrap: true }, function syncGetCallback(result) { From 617da3716b369b8a77dfc105f536a91fe4ac966a Mon Sep 17 00:00:00 2001 From: Kushagra Gour <chinchang457@gmail.com> Date: Sun, 17 Sep 2017 02:42:14 +0530 Subject: [PATCH 35/35] bump to 2.9.0 --- src/index.html | 2 +- src/manifest.json | 2 +- src/options.html | 2 +- src/script.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.html b/src/index.html index 3bca5f0..58bd190 100644 --- a/src/index.html +++ b/src/index.html @@ -279,7 +279,7 @@ <div class="modal" id="helpModal"> <div class="modal__content"> - <h1>Web Maker<small style="font-size:14px;"> v2.8.1</small></h1> + <h1>Web Maker<small style="font-size:14px;"> v2.9.0</small></h1> <div> <p>Made with <span style="margin-right: 8px;">💖</span> & <span style="margin-right: 8px;">🙌</span> by <a href="https://twitter.com/chinchang457" target="_blank">Kushagra Gour</a></p> <p>Tweet out your feature requests, comments & suggestions to <a target="_blank" href="https://twitter.com/webmakerApp">@webmakerApp</a>.</p> diff --git a/src/manifest.json b/src/manifest.json index b6da806..715584f 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "name": "Web Maker", - "version": "2.8.1", + "version": "2.9.0", "manifest_version": 2, "description": "Blazing fast & offline playground for your web experiments", "homepage_url": "https://webmakerapp.com", diff --git a/src/options.html b/src/options.html index 762f547..f88a88f 100644 --- a/src/options.html +++ b/src/options.html @@ -29,7 +29,7 @@ </head> <body> <h3>Settings <span style="opacity: 0.6;font-size:0.7em;"> - v2.8.1</span></h3> + v2.9.0</span></h3> <form name="optionsForm"> <label> <input type="checkbox" name="preserveLastCode"> diff --git a/src/script.js b/src/script.js index 64c1bce..0ba399b 100644 --- a/src/script.js +++ b/src/script.js @@ -13,7 +13,7 @@ globalConsoleContainerEl (function(alertsService) { /* eslint-enable no-extra-semi */ var scope = scope || {}; - var version = '2.8.1'; + var version = '2.9.0'; if (window.DEBUG) { window.scope = scope;