1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-29 17:50:09 +02:00

Remove default replacing of new tab..finally. Fixes #37

This commit is contained in:
Kushagra Gour
2017-02-15 23:51:24 +05:30
parent 314f584538
commit 1669ddd6c7
3 changed files with 22 additions and 14 deletions

View File

@@ -12,10 +12,10 @@ chrome.browserAction.onClicked.addListener(function(){
// Listen for tabs getting created.
chrome.tabs.onCreated.addListener(function (tab) {
// If a new tab is opened (without any URL), check user's
// replace Tab setting and act accordingly.
// replace Tab setting and act accordingly. Default is false.
if (tab.url === 'chrome://newtab/') {
chrome.storage.sync.get({
replaceNewTab: true
replaceNewTab: false
}, function(items) {
if (items.replaceNewTab) {
chrome.tabs.update(tab.id, {

View File

@@ -233,13 +233,8 @@
<div class="modal__content">
<div class="tac">
<svg width="130px" height="60px" viewBox="-145 -2 372 175" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="logo-w/o-text" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-145.000000, -1.000000)">
<polygon id="Path-1" fill="#FF4600" points="31 0 232 0 132 173.310547"></polygon>
<polygon id="Path-1" fill="#FF6C00" points="0 0 201 0 101 173.310547"></polygon>
<polygon id="Path-1" fill="#FF6C00" transform="translate(271.500000, 86.500000) scale(1, -1) translate(-271.500000, -86.500000) " points="171 0 372 0 272 173.310547"></polygon>
<polygon id="Path-1" fill="#FF4600" transform="translate(241.500000, 86.500000) scale(1, -1) translate(-241.500000, -86.500000) " points="141 0 342 0 242 173.310547"></polygon>
</g>
<svg width="130px" height="50px">
<use xlink:href="#logo" />
</svg>
<h1 style="margin-top:20px">Welcome to Web Maker</h1>
</div>
@@ -247,11 +242,12 @@
<!-- <p>Web Maker lets you do web experiments quickly and even when you are offline.</p> -->
<p>
By default, Web Maker shows up in every new tab you open. But you can change that below:
By default, Web Maker can be started by clicking the <svg class="relative" style="top:5px;" width="40" height="30"><use xlink:href="#logo" /></svg> button in top-right side of your browser. But you can choose to make Web Maker show in every new tab that you open:
</p>
<h2 style="text-decoration: underline;">Choose one:</h2>
<div class="onboard-selection-wrap flex">
<div class="onboard-selection selected" id="onboardShowInTabOptionBtn" d-click="onShowInTabClicked">
<div class="onboard-selection" id="onboardShowInTabOptionBtn" d-click="onShowInTabClicked">
<!-- Awesome free vector from freepik.com -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200" viewBox="180 200 340 320" xml:space="preserve">
<path style="fill:#A5A5A5;stroke: #555;stroke-width: 11px;" d="M503.916,256v43.116H191.326V256c0-11.906,9.651-21.558,21.558-21.558h269.474
@@ -266,8 +262,9 @@
</svg>
<div class="onboard-selection-text">Show in new tab</div>
</div>
<div style="opacity:0.7;">OR</div>
<div class="onboard-selection" id="onboardDontShowInTabOptionBtn" d-click="onDontShowInTabClicked">
<div class="onboard-selection selected" id="onboardDontShowInTabOptionBtn" d-click="onDontShowInTabClicked">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200" viewBox="180 200 340 320" xml:space="preserve">
<path style="fill:#A5A5A5;stroke: #555;stroke-width: 11px;" d="M503.916,256v43.116H191.326V256c0-11.906,9.651-21.558,21.558-21.558h269.474
C494.264,234.442,503.916,244.094,503.916,256z"></path>
@@ -281,7 +278,7 @@
</div>
<p>
You can change this later from Settings (<svg style="width:18px;height:18px;position:relative;top:3px;fill:#888" viewBox="0 0 24 24"><use xlink:href="#settings-icon"></use></svg>) in bottom right. Also you can open the app by clicking the Web Maker icon in the top-right side of your browser.
You can change this later from Settings (<svg style="width:18px;height:18px;position:relative;top:3px;fill:#888" viewBox="0 0 24 24"><use xlink:href="#settings-icon"></use></svg>) in bottom right of the app.
</p>
<p class="tac">
@@ -394,8 +391,18 @@
<input type="hidden" name="data" value='{"title": "New Pen!", "html": "<div>Hello, World!</div>"}'>
</form>
<script src="lib/codemirror/lib/codemirror.js"></script>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="display:none">
<symbol id="logo" viewBox="-145 -2 372 175">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-145.000000, -1.000000)">
<polygon id="Path-1" fill="#FF4600" points="31 0 232 0 132 173.310547"></polygon>
<polygon id="Path-1" fill="#FF6C00" points="0 0 201 0 101 173.310547"></polygon>
<polygon id="Path-1" fill="#FF6C00" transform="translate(271.500000, 86.500000) scale(1, -1) translate(-271.500000, -86.500000) " points="171 0 372 0 272 173.310547"></polygon>
<polygon id="Path-1" fill="#FF4600" transform="translate(241.500000, 86.500000) scale(1, -1) translate(-241.500000, -86.500000) " points="141 0 342 0 242 173.310547"></polygon>
</g>
</symbol>
</svg>
<script src="lib/codemirror/lib/codemirror.js"></script>
<script src="lib/codemirror/addon/edit/matchbrackets.js"></script>
<script src="lib/codemirror/addon/edit/closebrackets.js"></script>
<script src="lib/codemirror/addon/edit/closetag.js"></script>

View File

@@ -684,6 +684,7 @@ li.CodeMirror-hint-active {
}
.onboard-selection-wrap {
justify-content: center;
align-items: center;
}
.onboard-selection {
padding: 10px;