Made the code look cleaner

This commit is contained in:
mauro-balades
2024-10-04 18:21:41 +02:00
parent 57bf881779
commit e2792eecb5
22 changed files with 183 additions and 187 deletions

View File

@@ -416,8 +416,8 @@ jobs:
zen.installer-generic.exe
zen.macos-x64.dmg
zen.macos-aarch64.dmg
tag_name: "twilight"
name: "Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})"
tag_name: 'twilight'
name: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})'
body: |
# Zen Twilight Build

View File

@@ -80,6 +80,7 @@ bash <(curl https://updates.zen-browser.app/appimage.sh)
```
#### Flatpak
```
flatpak install flathub io.github.zen_browser.zen
```
@@ -132,6 +133,7 @@ pnpm start
### Development
To view changes you've made, run
```bash
pnpm build:ui && pnpm start
```

View File

@@ -1,28 +1,21 @@
export var ZenCustomizableUI = new class {
export var ZenCustomizableUI = new (class {
constructor() {}
TYPE_TOOLBAR = 'toolbar';
defaultSidebarIcons = [
'zen-sidepanel-button',
'zen-workspaces-button',
'new-tab-button'
];
defaultSidebarIcons = ['zen-sidepanel-button', 'zen-workspaces-button', 'new-tab-button'];
startup(CustomizableUIInternal) {
CustomizableUIInternal.registerArea(
"zen-sidebar-top-buttons",
'zen-sidebar-top-buttons',
{
type: this.TYPE_TOOLBAR,
defaultPlacements: [
"preferences-button", "zen-expand-sidebar-button", "zen-profile-button"
],
defaultPlacements: ['preferences-button', 'zen-expand-sidebar-button', 'zen-profile-button'],
defaultCollapsed: null,
},
true
);
CustomizableUIInternal.registerArea(
"zen-sidebar-icons-wrapper",
'zen-sidebar-icons-wrapper',
{
type: this.TYPE_TOOLBAR,
defaultPlacements: this.defaultSidebarIcons,
@@ -92,7 +85,7 @@ export var ZenCustomizableUI = new class {
_moveWindowButtons(window) {
const windowControls = window.document.getElementsByClassName('titlebar-buttonbox-container');
const toolboxIcons = window.document.getElementById('zen-sidebar-top-buttons-customization-target');
if (window.AppConstants.platform === "macosx") {
if (window.AppConstants.platform === 'macosx') {
for (let i = 0; i < windowControls.length; i++) {
if (i === 0) {
toolboxIcons.prepend(windowControls[i]);
@@ -104,9 +97,7 @@ export var ZenCustomizableUI = new class {
}
_hideToolbarButtons(window) {
const elementsToHide = [
'alltabs-button',
];
const elementsToHide = ['alltabs-button'];
for (let id of elementsToHide) {
const elem = window.document.getElementById(id);
if (elem) {
@@ -116,11 +107,7 @@ export var ZenCustomizableUI = new class {
}
registerToolbarNodes(window) {
window.CustomizableUI.registerToolbarNode(
window.document.getElementById('zen-sidebar-top-buttons')
);
window.CustomizableUI.registerToolbarNode(
window.document.getElementById('zen-sidebar-icons-wrapper')
);
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-top-buttons'));
window.CustomizableUI.registerToolbarNode(window.document.getElementById('zen-sidebar-icons-wrapper'));
}
};
})();

View File

@@ -147,7 +147,7 @@
Note: This developer console is not the same as the browser console, it has access to Zen's internal functions and variables, including your passwords and other sensitive information. Please do not paste any code here unless you know what you are doing.
`);
}
},
};
ZenStartup.init();

View File

@@ -2,7 +2,6 @@ var gZenUIManager = {
_popupTrackingElements: [],
init() {
document.addEventListener('popupshowing', this.onPopupShowing.bind(this));
document.addEventListener('popuphidden', this.onPopupHidden.bind(this));
},
@@ -85,23 +84,18 @@ var gZenVerticalTabsManager = {
this._updateEvent();
this.initRightSideOrderContextMenu();
let tabs = document.getElementById("tabbrowser-tabs");
let tabs = document.getElementById('tabbrowser-tabs');
XPCOMUtils.defineLazyPreferenceGetter(
this,
"canOpenTabOnMiddleClick",
"zen.tabs.newtab-on-middle-click",
true
);
XPCOMUtils.defineLazyPreferenceGetter(this, 'canOpenTabOnMiddleClick', 'zen.tabs.newtab-on-middle-click', true);
if (tabs) {
tabs.addEventListener("mouseup", this.openNewTabOnTabsMiddleClick.bind(this));
tabs.addEventListener('mouseup', this.openNewTabOnTabsMiddleClick.bind(this));
}
},
openNewTabOnTabsMiddleClick(event) {
if (event.button === 1 && event.target.id === "tabbrowser-tabs" && this.canOpenTabOnMiddleClick) {
document.getElementById("cmd_newNavigatorTabNoEvent").doCommand();
if (event.button === 1 && event.target.id === 'tabbrowser-tabs' && this.canOpenTabOnMiddleClick) {
document.getElementById('cmd_newNavigatorTabNoEvent').doCommand();
event.stopPropagation();
event.preventDefault();
}
@@ -157,8 +151,12 @@ var gZenVerticalTabsManager = {
this.navigatorToolbox.removeAttribute('zen-expanded');
}
if (this.navigatorToolbox.hasAttribute('zen-expanded') && !this.navigatorToolbox.hasAttribute('zen-right-side')
&& !Services.prefs.getBoolPref('zen.view.compact') && !Services.prefs.getBoolPref('zen.view.sidebar-expanded.on-hover')) {
if (
this.navigatorToolbox.hasAttribute('zen-expanded') &&
!this.navigatorToolbox.hasAttribute('zen-right-side') &&
!Services.prefs.getBoolPref('zen.view.compact') &&
!Services.prefs.getBoolPref('zen.view.sidebar-expanded.on-hover')
) {
this.navigatorToolbox.prepend(topButtons);
browser.prepend(this.navigatorToolbox);
} else {

View File

@@ -23,20 +23,15 @@
</linkset>
<!-- Scripts used all over the browser -->
<script type="text/javascript">
window.addEventListener("DOMContentLoaded", async () => {
// Theme importer always needs to be loaded first
await Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCommonUtils.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesCommon.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenThemesImporter.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenCompactMode.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/ZenUIManager.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenSidebarManager.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenTabUnloader.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspaces.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenViewSplitter.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenProfileDialogUI.mjs");
Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs");
}, { once: true });
</script>
<script src="chrome://browser/content/zen-components/ZenCommonUtils.mjs" async="true"/>
<script src="chrome://browser/content/zen-components/ZenThemesCommon.mjs" />
<script src="chrome://browser/content/zen-components/ZenThemesImporter.mjs" />
<script src="chrome://browser/content/zen-components/ZenCompactMode.mjs" />
<script src="chrome://browser/content/ZenUIManager.mjs" />
<script src="chrome://browser/content/zen-components/ZenSidebarManager.mjs"/>
<script src="chrome://browser/content/zen-components/ZenTabUnloader.mjs" />
<script src="chrome://browser/content/zen-components/ZenWorkspaces.mjs" />
<script src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs" />
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"/>
<script src="chrome://browser/content/zen-components/ZenProfileDialogUI.mjs" />
<script src="chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs" />

View File

@@ -7,15 +7,14 @@
--uc-tweak-rounded-corners-shadow-color: var(--zen-colors-border);
--uc-tweak-rounded-corners-shadow:
0 0 0 1px var(--uc-tweak-rounded-corners-shadow-color);
--uc-tweak-rounded-corners-shadow: 0 0 0 1px var(--uc-tweak-rounded-corners-shadow-color);
box-shadow: var(--uc-tweak-rounded-corners-shadow) !important;
/* Use pseudo element overlay to simulate rounded corners, similar to the
* tab corners, fixes bug with backdrop-filter. */
&::after {
content: "";
content: '';
position: absolute;
inset: 0;
border-radius: inherit;

View File

@@ -15,7 +15,7 @@
padding-right: var(--zen-element-separation);
padding-bottom: var(--zen-element-separation);
#browser:has(#navigator-toolbox[zen-right-side="true"]) & {
#browser:has(#navigator-toolbox[zen-right-side='true']) & {
padding-right: 0;
padding-left: var(--zen-element-separation);
}

View File

@@ -38,7 +38,7 @@
height: calc(98% - var(--zen-element-separation));
z-index: 9;
background: var(--zen-themed-toolbar-bg) !important;
box-shadow: 0 0 2px 2px rgba(0,0,0,.1);
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1);
border-top-right-radius: var(--zen-border-radius);
border-bottom-right-radius: var(--zen-border-radius);
border: 1px solid var(--zen-colors-border);
@@ -84,7 +84,6 @@
}
@media (-moz-bool-pref: 'zen.view.compact.hide-toolbar') {
#navigator-toolbox {
--zen-toolbox-top-align: var(--zen-element-separation);
}
@@ -100,7 +99,7 @@
left: 0;
z-index: 10;
background: var(--zen-themed-toolbar-bg);
box-shadow: 0 0 2px 2px rgba(0,0,0,.1) !important;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.1) !important;
border-bottom-left-radius: var(--zen-border-radius);
border-bottom-right-radius: var(--zen-border-radius);
border: 1px solid var(--zen-colors-border);
@@ -109,7 +108,7 @@
width: 100%;
opacity: 0;
:root[tabsintitlebar][sizemode="normal"]:not([gtktiledwindow="true"]) & {
:root[tabsintitlebar][sizemode='normal']:not([gtktiledwindow='true']) & {
border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
border-left-width: 0;

View File

@@ -1,10 +1,8 @@
toolbar {
min-height: 46px;
}
#zen-profile-button {
& stack {
padding: 0;
}
@@ -69,7 +67,7 @@ toolbar {
overflow: hidden;
border: 1px solid var(--zen-colors-border);
:root:has(#navigator-toolbox:not([zen-right-side='true'])) &[positionend="true"] {
:root:has(#navigator-toolbox:not([zen-right-side='true'])) &[positionend='true'] {
margin-right: var(--zen-element-separation);
}

View File

@@ -1,5 +1,4 @@
@media (-moz-bool-pref: 'zen.tabs.vertical') {
#tabbrowser-tabs,
#TabsToolbar,
#titlebar,
@@ -10,7 +9,6 @@
#TabsToolbar > * {
justify-content: center;
}
#private-browsing-indicator-with-label {
@@ -39,8 +37,8 @@
display: flex;
}
.titlebar-spacer[type="pre-tabs"],
.titlebar-spacer[type="post-tabs"] {
.titlebar-spacer[type='pre-tabs'],
.titlebar-spacer[type='post-tabs'] {
display: none;
}
@@ -66,7 +64,8 @@
}
#vertical-tabs-newtab-button {
&:hover, &:not(:is(:hover, :active)) .toolbarbutton-icon {
&:hover,
&:not(:is(:hover, :active)) .toolbarbutton-icon {
background: transparent !important;
}
}
@@ -164,7 +163,8 @@
#navigator-toolbox[zen-user-hover='true'][flash-popup],
#navigator-toolbox[zen-user-hover='true'][has-popup-menu],
#navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)),
#navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true'])) {
#navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true'])
) {
--zen-toolbox-min-width: fit-content;
padding: var(--zen-toolbox-padding);
padding-top: 0;
@@ -232,7 +232,8 @@
&:is([open], [checked]) {
background: var(--toolbarbutton-active-background) !important;
& image, label {
& image,
label {
background: transparent !important;
}
}
@@ -240,7 +241,8 @@
&:hover {
background: var(--toolbarbutton-hover-background) !important;
& image, label {
& image,
label {
background: transparent !important;
}
}
@@ -274,14 +276,17 @@
}
/* Mark: toolbox as collapsed */
#navigator-toolbox:not(#navigator-toolbox:is(
#navigator-toolbox:not(
#navigator-toolbox:is(
#navigator-toolbox[zen-user-hover='true'][zen-has-hover],
#navigator-toolbox[zen-user-hover='true']:focus-within,
#navigator-toolbox[zen-user-hover='true'][movingtab],
#navigator-toolbox[zen-user-hover='true'][flash-popup],
#navigator-toolbox[zen-user-hover='true'][has-popup-menu],
#navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)),
#navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true']))) {
#navigator-toolbox[zen-expanded='true']:not([zen-user-hover='true'])
)
) {
/* Important: When changin this value, make sure expand on hover doesn't break! */
--zen-toolbox-max-width: 49px; /* 1px more because the browser view has one pixel of padding to avoid the border being cut off */
--zen-toolbox-padding: 8px;
@@ -368,7 +373,7 @@
& .tab-background:is([selected], [multiselected]) {
@media not (prefers-color-scheme: dark) {
box-shadow: 0 0 1px 1px rgba(0,0,0,.05) !important;
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.05) !important;
}
}
@@ -399,17 +404,26 @@
display: none !important;
:is(
:root[uidensity=compact],
:root[uidensity='compact'],
#tabbrowser-tabs[secondarytext-unsupported],
:root:not([uidensity=compact]) #tabbrowser-tabs:not([secondarytext-unsupported]) .tabbrowser-tab:hover
) .tab-icon-stack[indicator-replaces-favicon] > :not(&),
:root:not([uidensity=compact]) #tabbrowser-tabs:not([secondarytext-unsupported]) .tabbrowser-tab:not(:hover) &[indicator-replaces-favicon] {
:root:not([uidensity='compact']) #tabbrowser-tabs:not([secondarytext-unsupported]) .tabbrowser-tab:hover
)
.tab-icon-stack[indicator-replaces-favicon]
> :not(&),
:root:not([uidensity='compact'])
#tabbrowser-tabs:not([secondarytext-unsupported])
.tabbrowser-tab:not(:hover)
&[indicator-replaces-favicon] {
opacity: 1 !important;
}
}
}
& .tab-throbber, & .tab-icon-pending, & .tab-icon-image, & .tab-sharing-icon-overlay, & .tab-icon-overlay {
& .tab-throbber,
& .tab-icon-pending,
& .tab-icon-image,
& .tab-sharing-icon-overlay,
& .tab-icon-overlay {
margin-inline-end: 0 !important;
}
}
@@ -418,7 +432,6 @@
flex-direction: column;
&:not([as-button='true']) {
& toolbarbutton {
&[active='true']::after {
bottom: 50% !important;
@@ -501,7 +514,7 @@
/*animation: zen-vtabs-animation 0.3s ease-in-out;*/
-moz-window-dragging: no-drag;
overflow: hidden;
transition: width .2s !important;
transition: width 0.2s !important;
& .tab-throbber,
& .tab-icon-pending,
@@ -510,7 +523,6 @@
& .tab-icon-overlay {
transition: 0.1s !important;
}
}
/* Make pinned tabs stay in a single line */

View File

@@ -174,7 +174,7 @@
@media not (-moz-bool-pref: 'zen.theme.toolbar-themed') {
:root {
--toolbar-bgcolor: light-dark(#E6E6E6, #1b1b1b) !important;
--toolbar-bgcolor: light-dark(#e6e6e6, #1b1b1b) !important;
--zen-themed-toolbar-bg: var(--toolbar-bgcolor);
}
}

View File

@@ -207,12 +207,15 @@ button.popup-notification-dropmarker {
}
/* Border radius on hover */
#urlbar .urlbar-page-action, #urlbar #tracking-protection-icon-container, #urlbar:not([breakout-extend="true"]) #identity-box:is(:not(.chromeUI), [pageproxystate="invalid"]) #identity-icon-box {
border-radius: 6px !important;;
#urlbar .urlbar-page-action,
#urlbar #tracking-protection-icon-container,
#urlbar:not([breakout-extend='true']) #identity-box:is(:not(.chromeUI), [pageproxystate='invalid']) #identity-icon-box {
border-radius: 6px !important;
}
/* Border radius of boxes on the left */
#identity-box:has(#identity-permission-box:is([hasPermissions], [hasSharingIcon])):not([pageproxystate="invalid"]) #identity-icon-box {
#identity-box:has(#identity-permission-box:is([hasPermissions], [hasSharingIcon])):not([pageproxystate='invalid'])
#identity-icon-box {
border-top-left-radius: 6px !important;
border-bottom-left-radius: 6px !important;
border-top-right-radius: 0 !important;
@@ -220,17 +223,16 @@ button.popup-notification-dropmarker {
}
/* Extensions or similar */
#urlbar:not([breakout-extend="true"]) #identity-box.chromeUI:not([pageproxystate="invalid"]) #identity-icon-box {
#urlbar:not([breakout-extend='true']) #identity-box.chromeUI:not([pageproxystate='invalid']) #identity-icon-box {
border-radius: 6px 6px 6px 6px !important;
}
/* Notification Stack */
.notificationbox-stack {
background: transparent;
&[notificationside="top"] {
&[notificationside='top'] {
position: absolute;
bottom: calc(var(--zen-element-separation) * 1.5);
right: calc(var(--zen-element-separation) * 1.5);
@@ -258,7 +260,6 @@ button.popup-notification-dropmarker {
align-items: center;
}
/* Other small tweaks */
#nav-bar-customization-target {
/* Don't grow if potentially-user-sized elements (like the searchbar or the
@@ -280,7 +281,7 @@ button.popup-notification-dropmarker {
padding-right: var(--zen-element-separation) !important;
}*/
#PersonalToolbar:not([collapsed="true"]) {
#PersonalToolbar:not([collapsed='true']) {
padding-bottom: 6px;
padding-left: 0 !important;
}

View File

@@ -25,7 +25,7 @@
position: relative;
& > * {
opacity: .6;
opacity: 0.6;
}
&[active='true']::after {
@@ -92,7 +92,6 @@
#navigator-toolbox[zen-user-hover='true']:has(*[open='true']:not(tab):not(#zen-sidepanel-button)),
:not([zen-user-hover='true'])
) {
& #zen-workspaces-button[as-button='true'] {
width: 100% !important;
margin: 2px;

View File

@@ -506,8 +506,10 @@ var gZenLooksAndFeel = {
const radios = [...chooser.querySelectorAll('input')];
let value = '';
if (Services.prefs.getBoolPref('zen.view.compact.hide-tabbar')
&& Services.prefs.getBoolPref('zen.view.compact.hide-toolbar')) {
if (
Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') &&
Services.prefs.getBoolPref('zen.view.compact.hide-toolbar')
) {
value = 'both';
} else {
value = Services.prefs.getBoolPref('zen.view.compact.hide-tabbar') ? 'left' : 'top';
@@ -517,7 +519,7 @@ var gZenLooksAndFeel = {
if (Services.prefs.getBoolPref('zen.view.sidebar-expanded.on-hover')) {
document.querySelector(`#zen-expand-tabbar-strat input[value='expand']`).click();
}
}
};
for (let radio of radios) {
radio.addEventListener('change', (e) => {
let value = e.target.value;
@@ -560,7 +562,7 @@ var gZenLooksAndFeel = {
} else if (Services.prefs.getBoolPref('zen.view.compact')) {
document.getElementById('zenLooksAndFeelShowCompactView').click();
}
}
};
for (let radio of radios) {
radio.addEventListener('change', (e) => {
switch (e.target.value) {
@@ -643,35 +645,35 @@ const ZEN_CKS_GROUP_PREFIX = `${ZEN_CKS_CLASS_BASE}-group`;
const KEYBIND_ATTRIBUTE_KEY = 'key';
var zenMissingKeyboardShortcutL10n = {
key_quickRestart: "zen-key-quick-restart",
key_delete: "zen-key-delete",
goBackKb: "zen-key-go-back",
goForwardKb: "zen-key-go-forward",
key_enterFullScreen: "zen-key-enter-full-screen",
key_exitFullScreen: "zen-key-exit-full-screen",
key_aboutProcesses: "zen-key-about-processes",
key_stop: "zen-key-stop",
key_sanitize: "zen-key-sanitize",
key_wrCaptureCmd: "zen-key-wr-capture-cmd",
key_wrToggleCaptureSequenceCmd: "zen-key-wr-toggle-capture-sequence-cmd",
key_undoCloseWindow: "zen-key-undo-close-window",
key_quickRestart: 'zen-key-quick-restart',
key_delete: 'zen-key-delete',
goBackKb: 'zen-key-go-back',
goForwardKb: 'zen-key-go-forward',
key_enterFullScreen: 'zen-key-enter-full-screen',
key_exitFullScreen: 'zen-key-exit-full-screen',
key_aboutProcesses: 'zen-key-about-processes',
key_stop: 'zen-key-stop',
key_sanitize: 'zen-key-sanitize',
key_wrCaptureCmd: 'zen-key-wr-capture-cmd',
key_wrToggleCaptureSequenceCmd: 'zen-key-wr-toggle-capture-sequence-cmd',
key_undoCloseWindow: 'zen-key-undo-close-window',
key_selectTab1: "zen-key-select-tab-1",
key_selectTab2: "zen-key-select-tab-2",
key_selectTab3: "zen-key-select-tab-3",
key_selectTab4: "zen-key-select-tab-4",
key_selectTab5: "zen-key-select-tab-5",
key_selectTab6: "zen-key-select-tab-6",
key_selectTab7: "zen-key-select-tab-7",
key_selectTab8: "zen-key-select-tab-8",
key_selectLastTab: "zen-key-select-tab-last",
key_selectTab1: 'zen-key-select-tab-1',
key_selectTab2: 'zen-key-select-tab-2',
key_selectTab3: 'zen-key-select-tab-3',
key_selectTab4: 'zen-key-select-tab-4',
key_selectTab5: 'zen-key-select-tab-5',
key_selectTab6: 'zen-key-select-tab-6',
key_selectTab7: 'zen-key-select-tab-7',
key_selectTab8: 'zen-key-select-tab-8',
key_selectLastTab: 'zen-key-select-tab-last',
key_showAllTabs: "zen-key-show-all-tabs",
key_gotoHistory: "zen-key-goto-history",
key_showAllTabs: 'zen-key-show-all-tabs',
key_gotoHistory: 'zen-key-goto-history',
goHome: "zen-key-go-home",
key_redo: "zen-key-redo",
}
goHome: 'zen-key-go-home',
key_redo: 'zen-key-redo',
};
var gZenCKSSettings = {
async init() {
@@ -777,9 +779,11 @@ var gZenCKSSettings = {
if (!this._hasSafed) {
target.classList.add(`${ZEN_CKS_INPUT_FIELD_CLASS}-unsafed`);
if (!target.nextElementSibling) {
target.after(window.MozXULElement.parseXULToFragment(`
target.after(
window.MozXULElement.parseXULToFragment(`
<label class="${ZEN_CKS_CLASS_BASE}-unsafed" data-l10n-id="zen-key-unsafed"></label>
`));
`)
);
target.value = 'Not set';
}
} else {
@@ -842,7 +846,9 @@ var gZenCKSSettings = {
} else if (shortcut == 'Escape' && !modifiersActive) {
const hasConflicts = gZenKeyboardShortcutsManager.checkForConflicts(
this._latestValidKey ? this._latestValidKey : shortcut,
this._latestModifier ? this._latestModifier : modifiers, this._currentActionID);
this._latestModifier ? this._latestModifier : modifiers,
this._currentActionID
);
if (!this._latestValidKey && !this._latestModifier) {
} else if (!this._latestValidKey || hasConflicts) {
@@ -851,9 +857,11 @@ var gZenCKSSettings = {
}
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-unsafed`);
if (hasConflicts && !input.nextElementSibling) {
input.after(window.MozXULElement.parseXULToFragment(`
input.after(
window.MozXULElement.parseXULToFragment(`
<label class="${ZEN_CKS_CLASS_BASE}-conflict" data-l10n-id="zen-key-conflict"></label>
`));
`)
);
}
} else {
input.classList.remove(`${ZEN_CKS_INPUT_FIELD_CLASS}-editing`);
@@ -972,5 +980,5 @@ Preferences.addAll([
id: 'zen.tab-unloader.timeout-minutes',
type: 'int',
default: 10,
}
},
]);

View File

@@ -54,9 +54,7 @@
}
},
"license": {
"ignoredFiles": [
".*\\.json"
],
"ignoredFiles": [".*\\.json"],
"licenseType": "MPL-2.0"
},
"updateHostname": "updates.zen-browser.app"