Skip to content

Commit

Permalink
Merge pull request #97 from menhera-org/feature-ua-overrides
Browse files Browse the repository at this point in the history
Feature ua overrides
  • Loading branch information
metastable-void authored Dec 29, 2022
2 parents 2fe657d + 1714242 commit 1067f99
Show file tree
Hide file tree
Showing 44 changed files with 1,835 additions and 157 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ ts-dist

# Webpack output
dist/**/*.js
dist/**/*.js.map

# web-ext output
*.xpi
Expand Down Expand Up @@ -179,4 +180,4 @@ $RECYCLE.BIN/
*.msi
*.msm
*.msp
*.lnk
*.lnk
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ clean:

typedoc:
npm run typedoc

icons:
cd script && ./update-contextual-identities-icons.sh
20 changes: 20 additions & 0 deletions dist/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,5 +506,25 @@
"optionsHeadingContainerOverrides": {
"message": "Per-container Overrides",
"description": "Heading text of options page for container overrides."
},
"optionsLabelUserAgent": {
"message": "User Agent",
"description": "Label text for user agent of a container."
},
"userAgentDefault": {
"message": "Default",
"description": "Default user agent"
},
"userAgentChrome": {
"message": "Chrome",
"description": "Chrome user agent"
},
"userAgentGooglebot": {
"message": "Googlebot",
"description": "Googlebot user agent"
},
"userAgentCustom": {
"message": "Custom",
"description": "Custom user agent"
}
}
112 changes: 112 additions & 0 deletions dist/components/container-overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/* -*- indent-tabs-mode: nil; tab-width: 2; -*- */
/* vim: set ts=2 sw=2 et ai : */

/*
Container Tab Groups
Copyright (C) 2022 Menhera.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

@import '/theme.css';

@namespace url(http://www.w3.org/1999/xhtml);

#containers-wrapper {
inline-size: max-content;
max-inline-size: 100%;
display: block grid;
grid-template-columns: .5em 2em 1fr 8em auto auto .5em;
border-radius: .5em;
border: 1px solid var(--border-color);
margin-block: .5em;
box-sizing: border-box;
}

#containers {
display: grid;
grid-column: 1 / -1;
grid-template-columns: subgrid;
}

#containers-wrapper > .header {
display: block grid;
grid-column: 1 / -1;
grid-template-columns: subgrid;
align-items: end;
background-color: var(--hover-color);
}

#containers-wrapper > .header > * {
text-align: center;
padding: .5em;
}

#containers-wrapper > .header > :not(:first-child) {
border-inline-start: 1px solid var(--border-color);
}

#containers-wrapper > .header > .header-container {
grid-column: 2 / 4;
}

#containers-wrapper > .header > .header-user-agent {
grid-column: 5 / 7;
}

.container {
display: block grid;
grid-column: 1 / -1;
grid-template-columns: subgrid;
border-block-start: 1px solid var(--border-color);
}

.container::before, .container::after {
content: '';
display: block;
}

.container > .name {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: .5em;
}

.container :is(.languages, .user-agent-custom) {
inline-size: 100%;
min-inline-size: 0;
box-sizing: border-box;
margin: 0;
font: inherit;
border: none;
border-radius: 0;
padding: .5em;
color: inherit;
background-color: transparent;
align-self: stretch;
}

.container > .user-agent {
display: block grid;
grid-template-columns: subgrid;
grid-column: 5 / 7;
}

.container > .user-agent > .user-agent-select {
margin-inline: .5rem;
align-self: center;
margin-block: 0 !important;
}
2 changes: 1 addition & 1 deletion dist/components/container-sorter.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
inline-size: max-content;
max-inline-size: 100%;
display: block grid;
grid-template-columns: .5em 2em 1fr 2em 2em min-content auto .5em;
grid-template-columns: .5em 2em 1fr 2em 2em min-content .5em;
border-radius: .5em;
border: 1px solid var(--border-color);
margin-block: .5em;
Expand Down
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/briefcase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/cart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/chill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/dollar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/fence.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/fingerprint.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/food.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions dist/img/contextual-identities/fruit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1067f99

Please sign in to comment.