diff options
Diffstat (limited to 'ext/bg/js/search-frontend.js')
-rw-r--r-- | ext/bg/js/search-frontend.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/bg/js/search-frontend.js b/ext/bg/js/search-frontend.js index 6ba8467e..2fe50a13 100644 --- a/ext/bg/js/search-frontend.js +++ b/ext/bg/js/search-frontend.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Alex Yatskov <alex@foosoft.net> + * Copyright (C) 2019-2020 Alex Yatskov <alex@foosoft.net> * Author: Alex Yatskov <alex@foosoft.net> * * This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <https://www.gnu.org/licenses/>. */ @@ -33,6 +33,7 @@ async function searchFrontendSetup() { window.frontendInitializationData = {depth: 1, ignoreNodes, proxy: false}; const scriptSrcs = [ + '/mixed/js/text-scanner.js', '/fg/js/frontend-api-receiver.js', '/fg/js/popup.js', '/fg/js/popup-proxy-host.js', @@ -40,6 +41,9 @@ async function searchFrontendSetup() { '/fg/js/frontend-initialize.js' ]; for (const src of scriptSrcs) { + const node = document.querySelector(`script[src='${src}']`); + if (node !== null) { continue; } + const script = document.createElement('script'); script.async = false; script.src = src; |