Install WebExtensions on Firefox from the command line

Please see: Installing extensions Customizing Firefox: Including extensions with your distribution of Firefox The question you link on askubuntu: How to install Firefox addon from command line in scripts? is several years out of date, but does have some good information. At this point, most Mozilla add-ons, including all Firefox WebExtension add-ons, are installed manually … Read more

How to download image to desktop with OS.File

You stole half that from my solution here: https://stackoverflow.com/a/25112976/3791822 And the other half from @nmaier’s solution here: https://stackoverflow.com/a/25148685/3791822 Very nice 😉 Haha anyways you are real close. You got the ArrayBuffer but pass it as Uint8Array so: var promised = OS.File.writeAtomic(file, new Uint8Array(data)); I don’t know if this is the best way to download it. … Read more

.setAttribute(“disabled”, false); changes editable attribute to false

A disabled element is, (self-explaining) disabled and thereby logically not editable, so: set the disabled attribute […] changes the editable attribute too Is an intended and well-defined behaviour. The real problem here seems to be you’re trying to set disabled to false via setAttribute() which doesn’t do what you’re expecting. an element is disabled if … Read more

Inspecting WebSocket frames in an undetectable way

Intercepting the WebSocket data is easy. Simply execute the following script before the page constructs the WebSocket. This snippet monkey-patches the WebSocket constructor: When a new WebSocket constructor is created, the snippet subscribes to the message event, from where you can do whatever you want with the data. This snippet is designed to be indistinguishable … Read more

Convert URL to File or Blob for FileReader.readAsDataURL

To convert a URL to a Blob for FileReader.readAsDataURL() do this: var request = new XMLHttpRequest(); request.open(‘GET’, MY_URL, true); request.responseType=”blob”; request.onload = function() { var reader = new FileReader(); reader.readAsDataURL(request.response); reader.onload = function(e){ console.log(‘DataURL:’, e.target.result); }; }; request.send();

Open a new tab/window and write something to it?

Top-level navigation to data URLs has been blocked in Chrome, Firefox (with some exceptions), IE, and Edge (and likely other browsers to boot). They are apparently commonly used for phishing attacks, and major browser vendors decided that the danger outweighed the value provided by legitimate use cases. This Mozilla security blog post explains that Firefox … Read more