Greasemonkey: (cross site) Load another page using javascript

I am writing Greasemonkey for http://foo.com/index.html

 // ==UserScript== // @name foo helper // @description Append data fetched from bar.com // @include http://*foo.com/index.html var bar = cross_site_get_page("http://bar.com"); document.body.appendChild(var); 

However, at bar.com , everything is created by javascript.

bar.com/index.html :

 <!DOCTYPE html> <html lang="en"> <head> <script src="/load.js"></script> </head> <body> trivial information </body> </html> 

How can I get bar.com/index.html after executing js code?

PS previous solution:
1. createElement("iframe") cannot process cross-site site policy
2. GM_xmlhttpRequest js code will not execute

+5
source share

Source: https://habr.com/ru/post/1257777/


All Articles