Documentation
¶
Overview ¶
Package browserext is Magpie Browser, the browser extension through which the agents magpie serves use the user's own browser: their tabs, signed in to the sites they use (gateway/browser.go relays the calls). magpie writes it to a folder of its own, pointed at its gateway, for the user to load in chrome://extensions.
Index ¶
Constants ¶
const Folder = "Magpie Browser Extension"
Folder is the name of the extension's folder.
const ID = "dmlhojidlfnkgamkekjhacgkpanbkeko"
ID is the extension's ID in every Chromium browser, fixed by the public key in its manifest; the gateway takes a connection from this origin only.
const Origin = "chrome-extension://" + ID
Origin is what the extension's requests carry as Origin.
Variables ¶
This section is empty.
Functions ¶
func Dir ¶ added in v0.1.2864
func Dir() string
Dir is where the extension is written: in the home folder, where Finder and Explorer show it, to drag from or choose.
func OldDir ¶ added in v0.1.2864
func OldDir() string
OldDir is where v0.1.2442 wrote it, a hidden folder no one could find; a browser that loaded it from there keeps it.
func Older ¶ added in v0.1.2864
Older says whether version a (0.1.3) is before b: a newer extension's folder is never written over with an older magpie's.
func Refresh ¶ added in v0.1.2864
Refresh writes this magpie's extension over every folder an older one was written to, so a browser that reloads it gets this version. A folder never written stays unwritten. It says whether any folder has it.
func Write ¶
Write puts the extension in dir, pointed at the gateway at gatewayURL (http://127.0.0.1:3425), replacing what an older magpie wrote there. A file is written only when it changed, so a browser that has the folder loaded sees no change it has to reload for.
Types ¶
This section is empty.