File tree Expand file tree Collapse file tree 5 files changed +31
-6
lines changed
Expand file tree Collapse file tree 5 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 1+ import { APP_PAGE_URL } from "../util/constant/url"
2+ import { t2Chrome } from "../util/i18n/chrome/t"
3+
4+ const properties : chrome . contextMenus . CreateProperties = {
5+ id : '_timer_menu_item_app_link_' ,
6+ contexts : [ 'browser_action' ] ,
7+ title : '🏷️ ' + t2Chrome ( msg => msg . contextMenus . allFunctions ) ,
8+ visible : true ,
9+ onclick : ( ) => chrome . tabs . create ( { url : APP_PAGE_URL } )
10+ }
11+
12+ function init ( ) {
13+ chrome . contextMenus . create ( properties )
14+ }
15+
16+ export default init
Original file line number Diff line number Diff line change 11import { openLog } from '../common/logger'
2- import ContextMenusManager from './context-menus-manager'
2+ import WhitelistMenuManager from './whitelist-menu-manager'
3+ import BrowserActionMenuManager from './browser-action-menu-manager'
34import IconUrlCollector from './icon-url-collector'
45import MessageListener from './message-listener'
56import Timer from './timer'
@@ -21,4 +22,7 @@ new MessageListener().listen()
2122new VersionManager ( ) . init ( )
2223
2324// Mange the context menus
24- ContextMenusManager ( )
25+ WhitelistMenuManager ( )
26+
27+ // Browser action menu
28+ BrowserActionMenuManager ( )
File renamed without changes.
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ const placeholder: ChromeMessage = {
4747 } ,
4848 contextMenus : {
4949 add2Whitelist : '' ,
50- removeFromWhitelist : ''
50+ removeFromWhitelist : '' ,
51+ allFunctions : ''
5152 }
5253}
5354
Original file line number Diff line number Diff line change @@ -6,20 +6,24 @@ import { Messages } from ".."
66export type ContextMenusMessage = {
77 add2Whitelist : string
88 removeFromWhitelist : string
9+ allFunctions : string
910}
1011
1112const _default : Messages < ContextMenusMessage > = {
1213 zh_CN : {
1314 add2Whitelist : '将{host}加入白名单' ,
14- removeFromWhitelist : '将{host}从白名单移出'
15+ removeFromWhitelist : '将{host}从白名单移出' ,
16+ allFunctions : '所有功能'
1517 } ,
1618 en : {
1719 add2Whitelist : 'Add {host} to the whitelist' ,
18- removeFromWhitelist : 'Remove {host} from the whitelist'
20+ removeFromWhitelist : 'Remove {host} from the whitelist' ,
21+ allFunctions : 'All Functions'
1922 } ,
2023 ja : {
2124 add2Whitelist : 'ホワイトリスト' ,
22- removeFromWhitelist : 'ホワイトリストから削除する'
25+ removeFromWhitelist : 'ホワイトリストから削除する' ,
26+ allFunctions : 'すべての機能'
2327 }
2428}
2529
You can’t perform that action at this time.
0 commit comments