Dirty stuff, this still wont allow you to load modules that use unsafe-eval, on pages with strict CORS policies.
Biggest road-block was a communication channel between the `content_script`, and the actual scope of the page (this was initially made to not have a GUI, and just have a console API.)
Maybe someone can shed some light on alternative way of doing this. At the moment I append an element to the page, grab a reference in the `content_script` and listen for a change event on it. Then in the actual scope of the page i trigger change events, and update the elements value with the message. FAR FROM IDEAL.
Also not officially supported yet, but it does allow you to also load modules temporarily via the console:
R42.load({ // or loadAlways
jquery: '$',
underscore: '_',
bluebird: 'Promise'
},
function () {
// $, _, and Promise are now globals
console.log('loaded');
}
);
This was initially intended to add modules to pages that you don't control so that you can run external code on them.
3 comments
[ 2.8 ms ] story [ 20.2 ms ] threadBiggest road-block was a communication channel between the `content_script`, and the actual scope of the page (this was initially made to not have a GUI, and just have a console API.)
Maybe someone can shed some light on alternative way of doing this. At the moment I append an element to the page, grab a reference in the `content_script` and listen for a change event on it. Then in the actual scope of the page i trigger change events, and update the elements value with the message. FAR FROM IDEAL.