Remove deprecated inject scripts (#947)

This commit is contained in:
Nathan Bierema 2021-11-06 00:23:00 -04:00 committed by GitHub
parent 16cad91ede
commit a9ef668d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 44 deletions

View File

@ -1,7 +0,0 @@
// Deprecated warning for inject.bundle.js
/* eslint-disable no-console */
console.warn(
"Using Redux DevTools inside extensions is deprecated and won't be supported in the next major version. " +
'Please use https://github.com/zalmoxisus/remote-redux-devtools instead.'
);
/* eslint-enable no-console */

View File

@ -1,22 +0,0 @@
// Include this script in Chrome apps and extensions for remote debugging
// <script src="chrome-extension://lmhkpmbekcpmknklioeibfkpmmfibljd/js/redux-devtools-extension.bundle.js"></script>
import { Options } from '../options/syncOptions';
window.devToolsExtensionID = 'lmhkpmbekcpmknklioeibfkpmmfibljd';
require('./contentScript');
require('./pageScript');
chrome.runtime.sendMessage(
window.devToolsExtensionID,
{ type: 'GET_OPTIONS' },
function (response: { readonly options: Options }) {
if (!response.options.inject) {
const urls = response.options.urls.split('\n').filter(Boolean).join('|');
if (!location.href.match(new RegExp(urls))) return;
}
window.devToolsOptions = response.options;
window.__REDUX_DEVTOOLS_EXTENSION__.notifyErrors();
}
);

View File

@ -52,11 +52,7 @@
}
],
"devtools_page": "devtools.html",
"web_accessible_resources": [
"page.bundle.js",
"inject.bundle.js",
"redux-devtools-extension.bundle.js"
],
"web_accessible_resources": ["page.bundle.js"],
"externally_connectable": {
"ids": ["*"]
},

View File

@ -49,11 +49,7 @@
}
],
"devtools_page": "devtools.html",
"web_accessible_resources": [
"page.bundle.js",
"inject.bundle.js",
"redux-devtools-extension.bundle.js"
],
"web_accessible_resources": ["page.bundle.js"],
"permissions": [
"notifications",
"contextMenus",

View File

@ -18,11 +18,6 @@ const baseConfig = (params) => ({
devtools: [`${extpath}devtools/index`],
content: [mock, `${extpath}inject/contentScript`],
pagewrap: [`${extpath}inject/pageScriptWrap`],
'redux-devtools-extension': [
`${extpath}inject/index`,
`${extpath}inject/deprecatedWarn`,
],
inject: [`${extpath}inject/index`, `${extpath}inject/deprecatedWarn`],
...params.inputExtra,
},
output: {