Learn > Browser plugins (plugin.js) WHOLE CHAPTER IN ONE FILE INTRODUCTION > INTRODUCTION plugin.js is ordinary JavaScript. The reader's web server sends it to your browser, and it runs there. It does not run on the e-reader. It can only run while a browser has a CrossPoint page open and the reader is in File Transfer mode. It can do anything a web page can do, plus a few things a web page normally can't, through device endpoints: - make HTTP(S) requests to any host without CORS problems (the reader makes them for you), - stream large downloads straight to the SD card, - write files to the SD card, - use device crypto. THE REGISTRATION CONTRACT > THE REGISTRATION CONTRACT CrossPoint.registerPlugin(async (container, api) => { // build your UI inside `container` }); Rules, all enforced by /js/plugin-host.js: 1. Call registerPlugin synchronously, at the top level of the script. Calling it after an await, in a setTimeout, or in a callback is ignored. The host stores your function on the