1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

updates to icon component and state init

This commit is contained in:
Kyle Spearrin
2017-10-17 13:16:05 -04:00
parent 09c340bbe5
commit cebf913999
4 changed files with 35 additions and 33 deletions

View File

@@ -2,7 +2,8 @@
.module('bit')
.config(function ($stateProvider, $urlRouterProvider, $compileProvider, $sceDelegateProvider, toastrConfig) {
$compileProvider.imgSrcSanitizationWhitelist(/^\s*((https?|ftp|file|blob):|data:image\/|(moz|chrome|ms-browser)-extension)/);
$compileProvider.imgSrcSanitizationWhitelist(
/^\s*((https?|ftp|file|blob):|data:image\/|(moz|chrome|ms-browser)-extension)/);
angular.extend(toastrConfig, {
closeButton: true,
@@ -258,9 +259,7 @@
});
})
.run(function ($rootScope, userService, $state, constantsService, stateService) {
chrome.storage.local.get(constantsService.disableFaviconKey, function(obj) {
stateService.saveState('faviconEnabled', !obj[constantsService.disableFaviconKey]);
});
stateService.init();
$rootScope.$on('$stateChangeStart', function (event, toState, toParams) {
if ($state.current.name.indexOf('tabs.') > -1 && toState.name.indexOf('tabs.') > -1) {