Skip to content

Commit

Permalink
Merge branch 'release/0.15.0'
Browse files Browse the repository at this point in the history
# Conflicts:
#	dist/js/options.js
  • Loading branch information
sylouuu committed Aug 5, 2016
2 parents 7fe72e5 + 92e02eb commit bcb7bb7
Show file tree
Hide file tree
Showing 28 changed files with 612 additions and 462 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,42 +76,56 @@ You have infinite possibilities, here are some configurations:

Pin all tabs:

* **Detection**: Contains
* **URL fragment**: http
* **Pinned**: ON

Say hello to all Google websites:

* **Detection**: Contains
* **URL fragment**: google.com
* **Title**: Hello Google: {title}

Disguise GitHub as Google

* **Detection**: Contains
* **URL fragment**: github.com
* **Title**: Google
* **Icon**: https://www.google.com/favicon.ico

Prevent accidental tab closure:

* **Detection**: Contains
* **URL fragment**: important-website.com
* **Protected**: ON

Mute all Youtube videos by default:

* **Detection**: Contains
* **URL fragment**: youtube.com
* **Mute**: ON

Set blank icon on Pinterest:

* **Detection**: Contains
* **URL fragment**: pinterest.com
* **Icon**: select "Chrome > Default"

Get only one GMail tab opened at once:

* **URL fragment**: mail.google.com
* **Detection**: Starts with
* **URL fragment**: https://mail.google.com
* **Unique**: ON

Pin all PNG images (useless):

* **Detection**: Ends with
* **URL fragment**: .png
* **Pinned**: ON

Customize title with HTML selector and Regexp:

* **Detection**: Contains
* **URL fragment**: github.com
* **Title**: {title} | $2 by $1
* **URL matcher**: github[.]com/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)
Expand Down
100 changes: 100 additions & 0 deletions dist/css/options.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
md-backdrop.md-edit-dialog-backdrop{z-index:80}md-edit-dialog{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:fixed;z-index:81;background-color:#f9f9f9;border-radius:2px;cursor:default}md-edit-dialog>.md-content{padding:16px 24px 0}md-edit-dialog>.md-content .md-title{color:rgba(0,0,0,.87);margin-bottom:8px}md-edit-dialog>.md-content md-input-container{margin:0;font-size:13px}md-edit-dialog>.md-content md-input-container input{float:none}md-edit-dialog>.md-content md-input-container .md-errors-spacer{min-height:auto;min-width:auto;color:rgba(0,0,0,.54)}md-edit-dialog>.md-content md-input-container .md-errors-spacer .md-char-counter{padding:5px 2px 5px 0}md-edit-dialog>.md-content md-input-container [ng-message]{padding:5px 0 5px 2px}md-edit-dialog>.md-actions{margin:0 16px 8px}md-edit-dialog>.md-actions .md-button{margin:0;min-width:initial}md-edit-dialog>.md-actions .md-button+.md-button{margin-left:8px}.md-table-pagination{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-flex-wrap:wrap-reverse;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;box-sizing:border-box;padding:0 24px;font-size:12px;color:rgba(0,0,0,.54);border-top:1px rgba(0,0,0,.12) solid}.md-table-pagination md-select{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;min-width:64px}.md-table-pagination md-select:not([disabled]):focus .md-select-value{color:rgba(0,0,0,.54)}.md-table-pagination md-select .md-select-value{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.md-table-pagination md-select .md-select-value span.md-select-icon{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;margin-right:-6px!important}.md-table-pagination md-select .md-select-value span.md-select-icon:after{top:initial;-webkit-transform:scaleY(0.5) scaleX(1);transform:scaleY(0.5) scaleX(1)}.md-table-pagination>*{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:56px}.md-table-pagination>.buttons:not(:first-child),.md-table-pagination>.limit-select:not(:first-child){margin-left:32px}.md-table-pagination>.buttons{margin-right:-16px}.md-table-pagination>.buttons>.md-button.md-icon-button{margin:0}.md-table-pagination>.buttons>.label+.md-button.md-icon-button{margin-left:20px}md-select.md-table-select{margin:0}md-select.md-table-select>.md-select-value{padding:0;min-width:0;min-height:24px;border-bottom:0!important}md-select.md-table-select>.md-select-value>span{display:block;height:auto;-webkit-transform:none!important;transform:none!important}md-select.md-table-select>.md-select-value>span>.md-text{display:inherit;height:inherit;-webkit-transform:inherit;transform:inherit}md-select.md-table-select>.md-select-value>span.md-select-icon{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:24px;margin:0}md-select.md-table-select>.md-select-value>span.md-select-icon:after{top:initial}.md-select-menu-container.md-pagination-select,.md-select-menu-container.md-table-select{margin-left:-2px;border-radius:2px}.md-select-menu-container.md-pagination-select md-content,.md-select-menu-container.md-pagination-select md-select-menu,.md-select-menu-container.md-table-select md-content,.md-select-menu-container.md-table-select md-select-menu{border-radius:inherit}.md-select-menu-container.md-pagination-select md-content,.md-select-menu-container.md-table-select md-content{padding:0}.md-select-menu-container.md-table-select .md-text{font-size:13px}.md-select-menu-container.md-pagination-select .md-text{font-size:12px}md-toolbar.md-table-toolbar{box-shadow:none}md-toolbar.md-table-toolbar.md-default-theme:not(.md-menu-toolbar).md-default,md-toolbar.md-table-toolbar:not(.md-menu-toolbar).md-default{background-color:#fff;color:rgba(0,0,0,.87)}md-toolbar.md-table-toolbar.md-default-theme:not(.md-menu-toolbar).md-default .md-button,md-toolbar.md-table-toolbar:not(.md-menu-toolbar).md-default .md-button{color:rgba(0,0,0,.87)}@media only screen and (max-width:959px) and (min-width:0) and (orientation:landscape){md-toolbar.md-table-toolbar .md-toolbar-tools{height:64px;max-height:initial}}md-toolbar.md-table-toolbar .md-toolbar-tools{padding:0 24px}md-toolbar.md-table-toolbar .md-toolbar-tools md-icon{color:rgba(0,0,0,.54)}md-toolbar.md-table-toolbar .md-toolbar-tools>.md-button.md-icon-button{margin:0}md-toolbar.md-table-toolbar .md-toolbar-tools>.md-button.md-icon-button:first-child{margin-left:-12px}md-toolbar.md-table-toolbar .md-toolbar-tools>.md-button.md-icon-button:last-child{margin-right:-12px}md-card>md-table-container:first-child,md-card>md-toolbar.md-table-toolbar:first-child{border-top-left-radius:2px;border-top-right-radius:2px}md-card>md-table-container:last-child,md-card>md-toolbar.md-table-toolbar:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}md-table-container{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}table.md-table{width:100%;border-spacing:0;overflow:hidden}table.md-table thead.md-head>tr.md-row{height:56px}table.md-table tbody.md-body>tr.md-row,table.md-table tfoot.md-foot>tr.md-row{height:48px}table.md-table thead.md-head+.md-table-progress md-progress-linear{top:-3px}table.md-table .md-table-progress th{padding:0}table.md-table .md-table-progress th md-progress-linear{height:0;transition:opacity 1s}table.md-table .md-table-progress th md-progress-linear.ng-hide{opacity:0}table.md-table .md-table-progress th md-progress-linear>.md-container{height:3px;top:0;transition:none}table.md-table .md-table-progress th md-progress-linear>.md-container>.md-bar{height:3px}table.md-table th.md-column{color:rgba(0,0,0,.54);font-size:12px;font-weight:700;white-space:nowrap}table.md-table th.md-column.md-sort{cursor:pointer}table.md-table th.md-column md-icon{height:16px;width:16px;font-size:16px!important;line-height:16px!important}table.md-table th.md-column md-icon.md-sort-icon{color:rgba(0,0,0,.26);opacity:0;transition:-webkit-transform .25s,opacity .25s;transition:transform .25s,opacity .25s}table.md-table th.md-column md-icon.md-sort-icon.md-asc{-webkit-transform:rotate(0deg);transform:rotate(0deg)}table.md-table th.md-column md-icon.md-sort-icon.md-desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}table.md-table th.md-column md-icon:not(:first-child){margin-left:8px}table.md-table th.md-column md-icon:not(:last-child){margin-right:8px}table.md-table th.md-column.md-active,table.md-table th.md-column.md-active md-icon{color:rgba(0,0,0,.87)}table.md-table th.md-column.md-active md-icon.md-sort-icon,table.md-table th.md-column:hover md-icon.md-sort-icon{opacity:1}table.md-table tr.md-row[data-ng-repeat].ng-leave,table.md-table tr.md-row[ng-repeat].ng-leave,table.md-table tr.md-row[ng\:repeat].ng-leave,table.md-table tr.md-row[x-ng-repeat].ng-leave{display:none}table.md-table.md-row-select tbody.md-body>tr.md-row{transition:background-color .2s}table.md-table.md-row-select tbody.md-body>tr.md-row:not([disabled]):hover{background-color:#eee!important}table.md-table.md-row-select tbody.md-body>tr.md-row.md-selected{background-color:#f5f5f5}table.md-table.md-row-select td.md-cell:first-child,table.md-table.md-row-select th.md-column:first-child{width:20px;padding:0 0 0 24px}table.md-table.md-row-select td.md-cell:nth-child(2),table.md-table.md-row-select th.md-column:nth-child(2){padding:0 24px}table.md-table.md-row-select td.md-cell:nth-child(n+3):nth-last-child(n+2),table.md-table.md-row-select th.md-column:nth-child(n+3):nth-last-child(n+2){padding:0 56px 0 0}table.md-table:not(.md-row-select) td.md-cell:first-child,table.md-table:not(.md-row-select) th.md-column:first-child{padding:0 24px}table.md-table:not(.md-row-select) td.md-cell:nth-child(n+2):nth-last-child(n+2),table.md-table:not(.md-row-select) th.md-column:nth-child(n+2):nth-last-child(n+2){padding:0 56px 0 0}table.md-table td.md-cell,table.md-table th.md-column{vertical-align:middle;text-align:left}table.md-table td.md-cell>*,table.md-table th.md-column>*{vertical-align:middle}table.md-table td.md-cell:last-child,table.md-table th.md-column:last-child{padding:0 24px 0 0}table.md-table td.md-cell.md-clickable,table.md-table th.md-column.md-clickable{cursor:pointer}table.md-table td.md-cell.md-clickable:focus,table.md-table th.md-column.md-clickable:focus{outline:0}table.md-table td.md-cell.md-numeric,table.md-table th.md-column.md-numeric{text-align:right}table.md-table td.md-cell md-checkbox,table.md-table th.md-column md-checkbox{margin:0;width:20px}table.md-table td.md-cell{color:rgba(0,0,0,.87);font-size:13px;border-top:1px rgba(0,0,0,.12) solid}table.md-table td.md-cell.md-numeric md-select{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}table.md-table td.md-cell.md-numeric md-select .md-select-value{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}table.md-table td.md-cell.md-placeholder{color:rgba(0,0,0,.26)}table.md-table td.md-cell md-select>.md-select-value>span.md-select-icon{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;color:rgba(0,0,0,.54);width:18px;text-align:right}table.md-table td.md-cell md-select>.md-select-value>span.md-select-icon:after{-webkit-transform:scaleY(0.4) scaleX(0.8);transform:scaleY(0.4) scaleX(0.8)}
html,
body {
font-size: 14px;
}

strong,
b,
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 500;
}

md-content {
overflow-x: hidden;
}

.md-icon-16x {
width: 16px;
height: 16px;
}

.md-select-value:first-child .md-icon-title {
transform: none;
}

.md-subheader .md-button.md-fab.md-fab-bottom-right {
bottom: -50px;
}

.md-img-select {
margin-bottom: -2px;
}

.md-title-only .md-title {
font-size: 16px;
}

.md-2-line p {
margin: 0;
line-height: 1.6em;
font-weight: 500;
letter-spacing: .01em;
}

.md-margin-0 {
margin: 0;
}

.md-padding-0 {
padding: 0 !important;
}

.md-margin-bottom-0 {
margin-bottom: 0;
}

.text-nowrap {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

p.md-primary,
span.md-primary {
color: #1E88E5;
}

md-card-header.md-primary {
color: rgb(255, 255, 255);
background-color: #1E88E5;
}

md-card-header.md-warn {
color: rgb(255, 255, 255);
background-color: #D50000;
}

md-input-container .md-caption {
display: inline-block;
padding: 6px 0;
}

.my-icon-button {
padding: 7px !important;
min-width: 0;
min-height: 0;
line-height: normal;
}

.my-icon-button img {
width: 20px;
padding-top: 7px;
padding-left: 11px;
padding-right: 18px;
}
25 changes: 21 additions & 4 deletions dist/html/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,38 @@ <h3 ng-if="rule.name !== null">Edit rule "{{ rule.name }}"</h3>

<div layout="row">
<!-- Name -->
<md-input-container flex>
<md-input-container flex="35">
<label for="rule_name" class="md-body-1">Name</label>
<input id="rule_name" type="text" ng-model="rule.name" placeholder="e.g. Pinned GMail" required>
<span class="md-caption">Give an explicit name, just for you</span>
</md-input-container>

<!-- Select icon -->
<md-input-container flex="15">
<label>Detection</label>
<md-select ng-model="rule.detection" required>
<md-option value="STARTS">Starts with</md-option>
<md-option value="CONTAINS">Contains</md-option>
<md-option value="ENDS">Ends with</md-option>
</md-select>
</md-input-container>

<!-- URL fragment -->
<md-input-container flex>
<md-input-container flex="50">
<label for="rule_url_fragment" class="md-body-1">URL fragment</label>
<input id="rule_url_fragment" type="text" ng-model="rule.url_fragment" placeholder="e.g. mail.google.com to catch GMail" required>
<span class="md-caption">URL fragment to find</span>
</md-input-container>
</div>

<p class="md-primary md-margin-0" ng-if="rule.url_fragment === null">The URL fragment is required by the extension to detect when to apply your actions</p>
<p class="md-primary md-margin-0" ng-if="rule.url_fragment !== null">The following actions will be applied when the URL contains <strong><code ng-bind="rule.url_fragment"></code></strong>:</p>
<p class="md-primary md-margin-0" ng-if="rule.url_fragment !== null">
The following actions will be applied when the URL
<u ng-if="rule.detection === 'STARTS'">starts with</u>
<u ng-if="rule.detection === 'CONTAINS'">contains</u>
<u ng-if="rule.detection === 'ENDS'">ends with</u>
<strong><code ng-bind="rule.url_fragment"></code></strong>:
</p>

<div ng-if="rule.url_fragment !== null" layout="column">

Expand Down Expand Up @@ -118,7 +134,8 @@ <h3 ng-if="rule.name !== null">Edit rule "{{ rule.name }}"</h3>
Remember to refresh your tabs after saving
</p>
<md-button class="md-raised md-accent" type="submit" ga-track-event="['tab-rules', 'save-rule']">
<md-icon md-svg-icon="save"></md-icon>&nbsp;Save
<md-icon md-svg-icon="save"></md-icon>
&nbsp;Save
</md-button>
</md-dialog-actions>
</form>
Expand Down
109 changes: 5 additions & 104 deletions dist/html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,108 +7,7 @@
<title>Tab Modifier</title>

<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc.5/angular-material.min.css">

<style>
html,
body {
font-size: 14px;
}

strong,
b,
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 500;
}

md-content {
overflow-x: hidden;
}

.md-icon-16x {
width: 16px;
height: 16px;
}

.md-select-value:first-child .md-icon-title {
transform: none;
}

.md-subheader .md-button.md-fab.md-fab-bottom-right {
bottom: -50px;
}

.md-img-select {
margin-bottom: -2px;
}

.md-title-only .md-title {
font-size: 16px;
}

.md-2-line p {
margin: 0;
line-height: 1.6em;
font-weight: 500;
letter-spacing: .01em;
}

.md-margin-0 {
margin: 0;
}

.md-padding-0 {
padding: 0 !important;
}

.md-margin-bottom-0 {
margin-bottom: 0;
}

.text-nowrap {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

p.md-primary,
span.md-primary {
color: #1E88E5;
}

md-card-header.md-primary {
color: rgb(255, 255, 255);
background-color: #1E88E5;
}

md-card-header.md-warn {
color: rgb(255, 255, 255);
background-color: #D50000;
}

md-input-container .md-caption {
display: inline-block;
padding: 6px 0;
}

.my-icon-button {
padding: 7px !important;
min-width: 0;
min-height: 0;
line-height: normal;
}

.my-icon-button img {
width: 20px;
padding-top: 7px;
padding-left: 11px;
padding-right: 18px;
}
</style>
<link rel="stylesheet" href="/css/options.css">

<!-- Angular Material Dependencies -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
Expand All @@ -119,8 +18,10 @@
<!-- Angular Material Javascript -->
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc.5/angular-material.min.js"></script>

<script src="../js/libs/angular-google-analytics.min.js"></script>
<script src="../js/options.js"></script>
<!-- Libs -->
<script src="/js/libs/libs.min.js"></script>

<script src="/js/options.js"></script>
</head>
<body layout="row" ng-controller="MainController">

Expand Down
17 changes: 9 additions & 8 deletions dist/html/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ <h3>Import tab rules</h3>
<p>Restore your tab rules settings from an external JSON file.</p>
</div>

<div class="md-secondary">
<input-file-button>
<md-button class="md-primary md-raised" aria-label="Upload a file" ga-track-event="['tab-rules', 'import']">
<md-icon md-svg-icon="file-import"></md-icon> Import tab rules
</md-button>
<input id="settings" type="file" on-read-file="import($fileContent)" accept="application/json">
</input-file-button>
</div>
<div class="md-secondary">
<input-file-button>
<md-button class="md-primary md-raised" aria-label="Upload a file" ga-track-event="['tab-rules', 'import']">
<md-icon md-svg-icon="file-import"></md-icon>
Import tab rules
</md-button>
<input id="settings" type="file" on-read-file="import($fileContent)" accept="application/json">
</input-file-button>
</div>
</md-list-item>

<md-divider></md-divider>
Expand Down
Loading

0 comments on commit bcb7bb7

Please sign in to comment.