Add status bar extension plugins

This commit is contained in:
Jaco Greeff
2017-09-04 12:24:46 +02:00
parent fb7b11553a
commit 7818ed98c7
3 changed files with 134 additions and 139 deletions

View File

@@ -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;

View File

@@ -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);