diff --git a/app/extensions.js b/app/extensions.js index ec6199cb71f..dbd7e9ce67b 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -136,6 +136,9 @@ let generateBraveManifest = () => { ] } ], + web_accessible_resources: [ + 'img/favicon.ico' + ], permissions: [ 'externally_connectable.all_urls', 'tabs', '', 'contentSettings', 'idle' ], diff --git a/app/extensions/brave/about-about.html b/app/extensions/brave/about-about.html index e033972fdbc..904ad344a53 100644 --- a/app/extensions/brave/about-about.html +++ b/app/extensions/brave/about-about.html @@ -8,7 +8,7 @@ - + diff --git a/app/extensions/brave/about-adblock.html b/app/extensions/brave/about-adblock.html index 3eb3637d32d..8d4f5429012 100644 --- a/app/extensions/brave/about-adblock.html +++ b/app/extensions/brave/about-adblock.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-autofill.html b/app/extensions/brave/about-autofill.html index a9e10aaee99..b82e72374b9 100644 --- a/app/extensions/brave/about-autofill.html +++ b/app/extensions/brave/about-autofill.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-bookmarks.html b/app/extensions/brave/about-bookmarks.html index 5798d5812a7..b3d4c0751f7 100644 --- a/app/extensions/brave/about-bookmarks.html +++ b/app/extensions/brave/about-bookmarks.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-brave.html b/app/extensions/brave/about-brave.html index 98d05df3080..be63b10f5e5 100644 --- a/app/extensions/brave/about-brave.html +++ b/app/extensions/brave/about-brave.html @@ -8,7 +8,7 @@ - + diff --git a/app/extensions/brave/about-contributions.html b/app/extensions/brave/about-contributions.html index ea2dfa50eab..4f2513cb2ab 100644 --- a/app/extensions/brave/about-contributions.html +++ b/app/extensions/brave/about-contributions.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-downloads.html b/app/extensions/brave/about-downloads.html index 2b1d59f7a7f..f45ed35e439 100644 --- a/app/extensions/brave/about-downloads.html +++ b/app/extensions/brave/about-downloads.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-error.html b/app/extensions/brave/about-error.html index 2db9e38aa6a..eea514687d4 100644 --- a/app/extensions/brave/about-error.html +++ b/app/extensions/brave/about-error.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-extensions.html b/app/extensions/brave/about-extensions.html index 988dde3e5dd..3cf0a0ff732 100644 --- a/app/extensions/brave/about-extensions.html +++ b/app/extensions/brave/about-extensions.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-history.html b/app/extensions/brave/about-history.html index 163f99378f9..8a05746549d 100644 --- a/app/extensions/brave/about-history.html +++ b/app/extensions/brave/about-history.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-passwords.html b/app/extensions/brave/about-passwords.html index 2fb3a2cbdd2..45871189a9b 100644 --- a/app/extensions/brave/about-passwords.html +++ b/app/extensions/brave/about-passwords.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-preferences.html b/app/extensions/brave/about-preferences.html index c34920faba3..992e4841495 100644 --- a/app/extensions/brave/about-preferences.html +++ b/app/extensions/brave/about-preferences.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-styles.html b/app/extensions/brave/about-styles.html index 958c3f7d57e..ba3b070ffbd 100644 --- a/app/extensions/brave/about-styles.html +++ b/app/extensions/brave/about-styles.html @@ -9,7 +9,7 @@ - + diff --git a/app/extensions/brave/about-welcome.html b/app/extensions/brave/about-welcome.html index 7235684f064..e9cca2d4c85 100644 --- a/app/extensions/brave/about-welcome.html +++ b/app/extensions/brave/about-welcome.html @@ -8,7 +8,7 @@ - + diff --git a/app/extensions/brave/index-dev.html b/app/extensions/brave/index-dev.html index 722297770d2..578522e00a5 100644 --- a/app/extensions/brave/index-dev.html +++ b/app/extensions/brave/index-dev.html @@ -7,7 +7,7 @@ - + Brave diff --git a/app/extensions/brave/index.html b/app/extensions/brave/index.html index 4aa4acbd22d..3f3be387ee2 100644 --- a/app/extensions/brave/index.html +++ b/app/extensions/brave/index.html @@ -7,7 +7,7 @@ - + Brave diff --git a/js/about/entry.js b/js/about/entry.js index 02092fa7d2b..aa9f323d43b 100644 --- a/js/about/entry.js +++ b/js/about/entry.js @@ -1,34 +1,3 @@ -var getFavicon = function () { - let favicon - const nodeList = document.getElementsByTagName('link') - for (var i = 0; i < nodeList.length; i++) { - if ((nodeList[i].getAttribute('rel') === 'icon') || (nodeList[i].getAttribute('rel') === 'shortcut icon')) { - favicon = nodeList[i].getAttribute('href') - } - } - return favicon -} - -// set favicon as a data url because chrome-extension urls don't work correctly -if (getFavicon()) { - let img = new window.Image() - img.onload = function () { - let canvas = document.createElement('CANVAS') - const ctx = canvas.getContext('2d') - canvas.height = this.height - canvas.width = this.width - ctx.drawImage(this, 0, 0) - const dataURL = canvas.toDataURL() - const docHead = document.getElementsByTagName('head')[0] - const newLink = document.createElement('link') - newLink.rel = 'shortcut icon' - newLink.href = dataURL - docHead.appendChild(newLink) - canvas = null - } - img.src = 'img/favicon.ico' -} - const ReactDOM = require('react-dom') const {getSourceAboutUrl, getBaseUrl} = require('../lib/appUrlUtil') const {ABOUT_COMPONENT_INITIALIZED} = require('../constants/messages')