Userscript open a client side generated page

103 views Asked by At

I'm writing a userscript which will generate a web page client side and open to view it.

What I want:

  • Open a page with specified content generated by the userscript
  • It should work on recently Firefox with Violentmonkey

What I'm trying:

convert generated page to data: or blob: url and then open it by window.open / GM_openInTab.

What is wrong:

  • window.open(myUrl):
    • Adblock Plus with EasyList dislike this. It will close pages with data: or blob: url automatically.
  • GM_openInTab(myUrl) aka chrome.tabs.create({ url: myUrl }):
    • Firefox disallow it at all. Trying to open a tab with data: or blob: url will simply do nothing.

Notes: Userscript is a page script (injected script) from extension. Userscript host (like Violentmonkey) will post message to backend script and call web extension api with backend script.

I don't want use a server for this issue, since I don't want anyone collect user info from the network request.

So, What should I do now?

0

There are 0 answers