diff --git a/src/partials/changelog.html b/src/partials/changelog.html
index e83b6a6..d57e027 100644
--- a/src/partials/changelog.html
+++ b/src/partials/changelog.html
@@ -6,17 +6,31 @@
Whats new?
+
+
2.9.8
+
+ The wait is over and Web Maker 3.0 is here. You might be wondering, nothing
+ seems changed here. Yes, because Web Maker 3.0 bring you - "The Web Maker web app"!
+ Try out the awesomeness here -> https://webmakerapp.com/app/ - Web
+ Maker as a web app, still works offline, with user accounts and more!
+
+ What about Chrome extension, you ask? Worry not. The Chrome extension will be updated to 3.0
+ too very soon in coming days.
+
+
+
+ ๐ Announcement : Hi! I am Kushagra Gour (creator of Web Maker) and I have launched a Patreon campaign . If you love Web Maker, consider pledging to support me and my open-source & free work :)
+
+
+
+
+
diff --git a/src/partials/pledge-modal.html b/src/partials/pledge-modal.html
new file mode 100644
index 0000000..a81d572
--- /dev/null
+++ b/src/partials/pledge-modal.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
Support the Developer
+
Hi, Kushagra here! Web Maker is a free and open-source project. To keep myself motivated for working on such open-source and free side projects , I am accepting donations. Your pledge, no matter how small, will act as an appreciation towards my work and keep me going forward making Web Maker more awesome๐ฅ. So please consider donating. ๐๐ผ (could be as small as $1/month).
+
+
+
+
+
+ Or, make a one time donation
+
+
\ No newline at end of file
diff --git a/src/patreon.png b/src/patreon.png
new file mode 100644
index 0000000..5443ec9
Binary files /dev/null and b/src/patreon.png differ
diff --git a/src/script.js b/src/script.js
index b64af40..9db0b59 100644
--- a/src/script.js
+++ b/src/script.js
@@ -7,7 +7,8 @@ onboardModal, settingsModal, notificationsBtn, onboardShowInTabOptionBtn, editor
onboardDontShowInTabOptionBtn, TextareaAutoComplete, savedItemCountEl, indentationSizeValueEl,
runBtn, searchInput, consoleEl, consoleLogEl, logCountEl, fontStyleTag, fontStyleTemplate,
customEditorFontInput, cssSettingsModal, cssSettingsBtn, acssSettingsTextarea,
-globalConsoleContainerEl, externalLibrarySearchInput, keyboardShortcutsModal
+globalConsoleContainerEl, externalLibrarySearchInput, keyboardShortcutsModal,
+pledgeModal
*/
/* eslint-disable no-extra-semi */
(function(alertsService) {
@@ -648,6 +649,7 @@ globalConsoleContainerEl, externalLibrarySearchInput, keyboardShortcutsModal
settingsModal.classList.remove('is-modal-visible');
cssSettingsModal.classList.remove('is-modal-visible');
keyboardShortcutsModal.classList.remove('is-modal-visible');
+ pledgeModal.classList.remove('is-modal-visible');
toggleSavedItemsPane(false);
document.dispatchEvent(new Event('overlaysClosed'));
}
@@ -1990,6 +1992,12 @@ globalConsoleContainerEl, externalLibrarySearchInput, keyboardShortcutsModal
e.preventDefault();
};
+ scope.openSupportDeveloperModal = function() {
+ closeAllOverlays();
+ trackEvent('ui', 'patreonModalSeenOnUpgrade');
+ scope.toggleModal(pledgeModal);
+ };
+
function init() {
var lastCode;
@@ -2430,6 +2438,15 @@ globalConsoleContainerEl, externalLibrarySearchInput, keyboardShortcutsModal
notificationsBtn.classList.add('has-new');
hasSeenNotifications = false;
}
+ // If its an upgrade
+ if (
+ result.lastSeenVersion &&
+ utils.semverCompare(result.lastSeenVersion, version) === -1 &&
+ !window.localStorage.pledgeModalSeen
+ ) {
+ scope.openSupportDeveloperModal();
+ window.localStorage.pledgeModalSeen = true;
+ }
}
);
diff --git a/src/style.css b/src/style.css
index bfdf889..278c3c1 100644
--- a/src/style.css
+++ b/src/style.css
@@ -22,6 +22,7 @@ a { text-decoration: none; color: crimson; cursor: pointer; }
.hide { display: none!important; }
.flex { display: flex; }
.flex-grow { flex-grow: 1; }
+.flex-h-center { justify-content: center; }
.flex-v-center { align-items: center; }
.fr { float: right; }
.relative { position: relative; }
@@ -501,6 +502,10 @@ transition: 0.25s ease;
/* margin-left: -300px; */
}
}
+.pledge-modal .modal__content {
+ max-width: 800px;
+}
+
.saved-items-pane {
position: fixed;
right: 0;