What am I building is simple chrome extension which adds my script to all pages user visit like this
in contentscript.js:
var s = document.createElement('script');
s.src = 'https://localhost:3000/js/hack.js';
s.onload = function() {
this.parentNode.removeChild(this);
};
(document.head||document.documentElement).appendChild(s);
on rails-backend there is simple login-password and omniauth(oauth) authorization via devise
gem.
If I authorize on rails pages and later in hack.js
I try to make some ajax calls to my local server via XMLHttpRequest
- it tries its best to assure me that user is not authorized.
I bet it can be solved via opening invisible iframe somewhere, but that's hellova pain, may be there are some more handy methods?