mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
added option to disable auto totp copying
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
function TotpService() {
|
||||
function TotpService(constantsService) {
|
||||
this.constantsService = constantsService;
|
||||
initTotpService();
|
||||
}
|
||||
|
||||
@@ -105,4 +106,20 @@ function initTotpService() {
|
||||
return otp;
|
||||
});
|
||||
};
|
||||
|
||||
TotpService.prototype.isAutoCopyEnabled = function () {
|
||||
var deferred = Q.defer();
|
||||
var self = this;
|
||||
|
||||
chrome.storage.local.get(self.constantsService.disableAutoTotpCopyKey, function (obj) {
|
||||
if (obj && !!obj[self.constantsService.disableAutoTotpCopyKey]) {
|
||||
deferred.resolve(false);
|
||||
}
|
||||
else {
|
||||
deferred.resolve(true);
|
||||
}
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user