tridactyl/src/content.ts

41 lines
1.2 KiB
TypeScript
Raw Normal View History

/** Content script entry point */
// Be careful: typescript elides imports that appear not to be used if they're
// assigned to a name. If you want an import just for its side effects, make
// sure you import it like this:
2017-11-19 07:58:46 +00:00
/* import "./keydown_content" */
/* import "./commandline_content" */
/* import "./excmds_content" */
/* import "./hinting" */
console.log("Tridactyl content script loaded, boss!")
2017-11-18 01:51:13 +00:00
// Add various useful modules to the window for debugging
2017-11-19 07:58:46 +00:00
import * as commandline_content from './commandline_content'
import * as convert from './convert'
import * as dom from './dom'
import * as excmds from './excmds_content'
import * as hinting_content from './hinting'
import * as itertools from './itertools'
import * as keydown_content from "./keydown_content"
2017-11-18 01:51:13 +00:00
import * as messaging from './messaging'
2017-11-19 07:58:46 +00:00
import * as msgsafe from './msgsafe'
import state from './state'
import * as webext from './lib/webext'
2017-11-18 01:51:13 +00:00
(window as any).tri = Object.assign(Object.create(null), {
browserBg: webext.browserBg,
2017-11-19 07:58:46 +00:00
commandline_content,
convert,
dom,
excmds,
hinting_content,
itertools,
keydown_content,
2017-11-18 01:51:13 +00:00
messaging,
2017-11-19 07:58:46 +00:00
msgsafe,
state,
webext,
l: prom => prom.then(console.log).catch(console.error),
2017-11-18 01:51:13 +00:00
})