Add status bar extension plugins
This commit is contained in:
@@ -23,12 +23,10 @@ function injectInterceptorPlugin (middleware) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function injectSignerPlugin (func) {
|
||||
function injectSignerPlugin (component) {
|
||||
}
|
||||
|
||||
function injectStatusPlugin (component) {
|
||||
console.log('component', component);
|
||||
|
||||
StatusPluginStore.get().addComponent(component);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -14,14 +14,12 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
export function injectExternalScript (src) {
|
||||
export function injectExternalScript (src, onload) {
|
||||
const script = document.createElement('script');
|
||||
|
||||
script.type = 'text/javascript';
|
||||
script.async = true;
|
||||
script.onload = function () {
|
||||
// remote script has loaded
|
||||
};
|
||||
script.onload = onload || function () {};
|
||||
script.src = src;
|
||||
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
|
||||
Reference in New Issue
Block a user