Add read mode shortcuts loigc.

This commit is contained in:
Kenshin 2017-01-10 12:29:17 +08:00
parent d851089b0d
commit c1099dbabc
2 changed files with 11 additions and 0 deletions

View File

@ -48,6 +48,7 @@ chrome.runtime.onMessage.addListener( function( request, sender, sendResponse )
*/
function bindShortcuts() {
Mousetrap.bind( [ storage.focus.shortcuts.toLowerCase() ], focuseMode );
Mousetrap.bind( [ storage.read.shortcuts.toLowerCase() ], readMode );
}
/**

View File

@ -32,6 +32,7 @@ const name = "simpread",
},
read = {
version : "2017-01-07",
shortcuts : "A A",
theme : "",
fontfamily: "",
fontsize : 14,
@ -58,6 +59,15 @@ class Storage {
return simpread[ mode.focus ];
}
/**
* Get simpread.read data structure
*
* @return {object} simpread["read"]
*/
get read() {
return simpread[ mode.read ];
}
/**
* Get current data structure
*