diff --git a/src/index.html b/src/index.html index 49525b0..f0e8b68 100644 --- a/src/index.html +++ b/src/index.html @@ -218,7 +218,7 @@
Web Maker lets you do web experiments quickly and even when you are offline.
+- By default, Web Maker shows up in every new tab you open. But you can change that setting: - Click here to change setting. + By default, Web Maker shows up in every new tab you open. But you can change that below:
+- You can always open this app by clicking the Web Maker icon in the top-right side of your browser. + You can change this later from Settings in bottom right. Also you can open the app by clicking the Web Maker icon in the top-right side of your browser.
diff --git a/src/script.js b/src/script.js
index aec2a5f..44645f3 100644
--- a/src/script.js
+++ b/src/script.js
@@ -711,6 +711,15 @@ settingsBtn, onboardModal, notificationsBtn */
trackEvent('ui', 'onboardSettingsBtnClick');
}
+ scope.onShowInTabClicked = function () {
+ onboardDontShowInTabOption.classList.remove('selected');
+ onboardShowInTabOption.classList.add('selected');
+ }
+ scope.onDontShowInTabClicked = function () {
+ onboardDontShowInTabOption.classList.add('selected');
+ onboardShowInTabOption.classList.remove('selected');
+ }
+
function compileNodes() {
var nodes = [].slice.call($all('[d-click]'));
nodes.forEach(function (el) {
@@ -966,6 +975,10 @@ settingsBtn, onboardModal, notificationsBtn */
chrome.storage.sync.set({
lastSeenVersion: version
}, function () {});
+
+ chrome.storage.sync.set({
+ replaceNewTab: onboardShowInTabOption.classList.contains('selected')
+ }, function () {});
});
}
// console.utils.log(result, hasSeenNotifications, version);
diff --git a/src/style.css b/src/style.css
index 0fde040..43501c1 100644
--- a/src/style.css
+++ b/src/style.css
@@ -613,4 +613,32 @@ select, input[type="text"], textarea {
border-radius: 5px;
padding: 1px 6px;
font-weight: bold;
-}
\ No newline at end of file
+}
+.onboard-selection-wrap {
+ justify-content: center;
+}
+.onboard-selection {
+ padding: 10px;
+ margin: 0 40px;
+ border-radius: 5px;
+ transition: 0.25s ease;
+ position: relative;
+ border: 1px solid transparent;
+}
+.onboard-selection:hover {
+ cursor: pointer;
+ /*background-color: rgba(0,0,0,0.3);*/
+ transform: scale(1.15);
+ /*border-color: rgba(0,0,0,0.4);*/
+}
+.onboard-selection.selected:after {
+ content: '';
+ position: absolute;
+ right: -20px;
+ bottom: 40px;
+ width: 80px;
+ height: 80px;
+ border-radius: 50%;
+ background: white url('data:image/svg+xml;charset=UTF-8,