aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2019-06-10Add license (GNU GPLv3+)Teddy Wing
2019-05-08Attempt to add next/previous page shortcuts to index view (WIP)Teddy Wing
The shortcuts don't work yet unfortunately. Just committing this as a progress commit.
2019-05-02Try to add 'j/k' shortcuts in the pager viewTeddy Wing
Very messy at the moment. Doesn't currently work because it needs to be executed when the pager view becomes visible. Pager divs are created and removed each time a message is opened. Going to put this aside for now and try to focus on the index view. From there, I should be able to figure out how to load in pager commands when a message is selected.
2019-05-01gmail_selectors.ts: Add new selectors for index and pager viewsTeddy Wing
2019-05-01Rename 'gmail_css_class' to 'gmail_selectors'Teddy Wing
Since I'd like to put non-class selectors in this module now.
2019-05-01index.ts: Better Gmail loading initialisation logicTeddy Wing
Instead of using a timeout, which may get executed prematurely, check for the visibility of Gmail's `loading` screen. When it disappears from view, we know we can safely initialise all our plugin features. This allows us to, for example, try to ensure our `<style>` element gets appended last. Now the sidebar actually gets hidden with our CSS rule from 496ac03b0d6afb28db09998eb9944db2102ad49e since it can take precedence over Gmail's asynchronously-loaded styles.
2019-05-01style.ts: Hide the left sidebar by defaultTeddy Wing
2019-05-01sidebar.ts: Add comment showing command keysTeddy Wing
2019-05-01sidebar.ts: Extract multi-key shortcut command codeTeddy Wing
Make the multi-key command generic so that it works with other commands, not just `\m`. Use the array equality method from Abhi (https://stackoverflow.com/users/2968762/abhi) on Stack Overflow: https://stackoverflow.com/questions/7837456/how-to-compare-arrays-in-javascript/19746771#19746771
2019-05-01sidebar.ts: Extract `key_codes` to moduleTeddy Wing
Move this to a separate module as we'll probably want to use the same dictionary of key codes to make other shortcuts. Also fix some syntax while we're at it.
2019-05-01Add shortcut to toggle the left sidebarTeddy Wing
Map sidebar toggle to `\m`. Initialise the code after a timeout to account for Gmail's initial loading screen. Needed to use an `as HTMLElement` cast in order to get the code to compile: https://github.com/Microsoft/TypeScript/issues/16920 src/sidebar.ts:10:5 - error TS2740: Type 'Element' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 110 more.
2019-05-01Use CommonJS modules, fix importsTeddy Wing
* Use single quotes * Add 'sidebar.ts' to main * Fix `SIDEBAR` import from 'gmail_css_class.ts' * Remove ".ts" extensions from imports * Build to 'build/' directory instead of a file. This creates one JS file per module by the Typescript compiler.
2019-05-01Move Gmail CSS class definitions to a new moduleTeddy Wing
Allow them to be used for a new Sidebar module that will enable sidebar toggling. Had to switch the compiled module system to `amd` because of this error message: tsconfig.json:3:3 - error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile. Thinking I'm going to switch to Typescript namespaces to save myself the trouble of using a 'require' library for the AMD modules.
2019-05-01Move code to "style.ts"Teddy Wing
* Create a separate module for the CSS style-related code. * Use `commonjs` module format instead of `amd` so that the resulting output file can be used (hopefully) without modification directly in the browser.