mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-08 19:18:02 +01:00
dont allow shorthand property assignments
This commit is contained in:
parent
5319568d81
commit
a4127f2571
@ -420,18 +420,19 @@ export default class MainBackground {
|
||||
return;
|
||||
}
|
||||
|
||||
const self = this;
|
||||
const tab = await this.tabsQueryFirst({ active: true, windowId: chrome.windows.WINDOW_ID_CURRENT });
|
||||
if (!tab) {
|
||||
return;
|
||||
}
|
||||
|
||||
const disabled = await this.utilsService.getObjFromStorage<boolean>(ConstantsService.disableContextMenuItemKey);
|
||||
const disabled = await self.utilsService.getObjFromStorage<boolean>(ConstantsService.disableContextMenuItemKey);
|
||||
if (!disabled) {
|
||||
await this.buildContextMenu();
|
||||
this.contextMenuReady(tab, true);
|
||||
} else {
|
||||
await this.contextMenusRemoveAll();
|
||||
this.contextMenuReady(tab, false);
|
||||
self.contextMenuReady(tab, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,5 +47,5 @@ export const ActionButtonsComponent = {
|
||||
onView: '&',
|
||||
},
|
||||
controller: ActionButtonsController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -11,11 +11,11 @@ export class CipherItemsController implements ng.IController {
|
||||
}
|
||||
|
||||
view(cipher: any) {
|
||||
return this.onView({cipher});
|
||||
return this.onView({ cipher: cipher });
|
||||
}
|
||||
|
||||
select(cipher: any) {
|
||||
return this.onSelected({cipher});
|
||||
return this.onSelected({ cipher: cipher });
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,5 +27,5 @@ export const CipherItemsComponent = {
|
||||
onView: '&',
|
||||
},
|
||||
controller: CipherItemsController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -78,5 +78,5 @@ export const IconComponent = {
|
||||
cipher: '<',
|
||||
},
|
||||
controller: IconController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -56,5 +56,5 @@ export class PopOutController implements ng.IController {
|
||||
export const PopOutComponent = {
|
||||
bindings: {},
|
||||
controller: PopOutController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ export class CurrentController {
|
||||
}
|
||||
|
||||
this.autofillService.doAutoFill({
|
||||
cipher,
|
||||
cipher: cipher,
|
||||
pageDetails: this.pageDetails,
|
||||
fromBackground: false,
|
||||
}).then((totpCode: string) => {
|
||||
@ -165,5 +165,5 @@ export class CurrentController {
|
||||
export const CurrentComponent = {
|
||||
bindings: {},
|
||||
controller: CurrentController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -59,5 +59,5 @@ export class LockController {
|
||||
export const LockComponent = {
|
||||
bindings: {},
|
||||
controller: LockController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -15,5 +15,5 @@ export class AboutController {
|
||||
export const AboutComponent = {
|
||||
bindings: {},
|
||||
controller: AboutController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -19,5 +19,5 @@ export class CreditsController {
|
||||
export const CreditsComponent = {
|
||||
bindings: {},
|
||||
controller: CreditsController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -51,5 +51,5 @@ export class EnvironmentController {
|
||||
export const EnvironmentComponent = {
|
||||
bindings: {},
|
||||
controller: EnvironmentController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -40,5 +40,5 @@ export class AddFolderController {
|
||||
export const AddFolderComponent = {
|
||||
bindings: {},
|
||||
controller: AddFolderController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -74,5 +74,5 @@ export const EditFolderComponent = {
|
||||
$transition$: '<',
|
||||
},
|
||||
controller: EditFolderController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -35,5 +35,5 @@ export class FoldersController {
|
||||
export const FoldersComponent = {
|
||||
bindings: {},
|
||||
controller: FoldersController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -31,5 +31,5 @@ export class HelpController {
|
||||
export const HelpComponent = {
|
||||
bindings: {},
|
||||
controller: HelpController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -91,5 +91,5 @@ export class OptionsController {
|
||||
export const OptionsComponent = {
|
||||
bindings: {},
|
||||
controller: OptionsController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -56,5 +56,5 @@ export class PremiumController {
|
||||
export const PremiumComponent = {
|
||||
bindings: {},
|
||||
controller: PremiumController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -148,5 +148,5 @@ export class SettingsController {
|
||||
export const SettingsComponent = {
|
||||
bindings: {},
|
||||
controller: SettingsController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -38,5 +38,5 @@ export class SyncController {
|
||||
export const SyncComponent = {
|
||||
bindings: {},
|
||||
controller: SyncController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -166,5 +166,5 @@ export class ExportController {
|
||||
export const ExportComponent = {
|
||||
bindings: {},
|
||||
controller: ExportController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -50,5 +50,5 @@ export const PasswordGeneratorHistoryComponent = {
|
||||
$transition$: '<',
|
||||
},
|
||||
controller: PasswordGeneratorHistoryController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -140,5 +140,5 @@ export const PasswordGeneratorComponent = {
|
||||
$transition$: '<',
|
||||
},
|
||||
controller: PasswordGeneratorController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -56,5 +56,5 @@ export class ToolsController {
|
||||
export const ToolsComponent = {
|
||||
bindings: {},
|
||||
controller: ToolsController,
|
||||
template,
|
||||
template: template,
|
||||
};
|
||||
|
@ -18,10 +18,10 @@ export default function i18nService(utilsService: UtilsService) {
|
||||
}
|
||||
|
||||
return new Proxy({}, {
|
||||
get(target, name) {
|
||||
get: (target, name) => {
|
||||
return chrome.i18n.getMessage(name);
|
||||
},
|
||||
set(target, name, value) {
|
||||
set: (target, name, value) => {
|
||||
return false;
|
||||
},
|
||||
});
|
||||
|
@ -36,6 +36,7 @@
|
||||
],
|
||||
"no-empty": [ true, "allow-empty-catch" ],
|
||||
"object-literal-sort-keys": false,
|
||||
"object-literal-shorthand": [ true, "never" ],
|
||||
"prefer-for-of": false,
|
||||
"quotemark": [ true, "single" ],
|
||||
"whitespace": [
|
||||
|
Loading…
Reference in New Issue
Block a user