Skip to content

Commit

Permalink
Initial svelte migration
Browse files Browse the repository at this point in the history
  • Loading branch information
hao1300 committed Jan 23, 2020
1 parent 406fe16 commit 3fbe108
Show file tree
Hide file tree
Showing 84 changed files with 11,977 additions and 156 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ typings/

# next.js build output
.next

build
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
70 changes: 70 additions & 0 deletions legacy/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"name": "Chrome Voice Assistant",
"version": "1.1.2",
"manifest_version": 2,
"description": "Use voice commands to control your browser",
"browser_action": {
"default_icon": "icon_128.png",
"default_title": "Chrome Voice",
"default_popup": "popup.html"
},
"background": {
"scripts": [
"scripts/common.js",
"scripts/annyang.min.js",
"scripts/plugins/plugin.js",
"scripts/plugins/tab.js",
"scripts/plugins/media.js",
"scripts/plugins/bookmark.js",
"scripts/plugins/navigation.js",
"scripts/plugins/page.js",
"scripts/plugins/extension.js",
"scripts/plugins/query.js",
"scripts/notification.js",
"scripts/text_input.js",
"scripts/background.js"
]
},
"icons": {
"16": "icon_16.png",
"48": "icon_48.png",
"128": "icon_128.png"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["scripts/mic_detection_contents.js"],
"run_at": "document_idle"
},
{
"matches": ["<all_urls>"],
"all_frames": true,
"css": ["styles/contents.css"],
"js": ["scripts/contents.js"],
"run_at": "document_end"
}
],
"options_ui": {
"open_in_tab": true,
"page": "options.html"
},
"commands": {
"_execute_browser_action": {
"suggested_key": {
"windows": "Ctrl+Shift+H",
"mac": "Command+Shift+H",
"chromeos": "Ctrl+Shift+H",
"linux": "Ctrl+Shift+H"
}
}
},
"incognito": "spanning",
"permissions": [
"<all_urls>",
"activeTab",
"contextMenus",
"notifications",
"storage"
],
"optional_permissions": ["bookmarks"]
}
61 changes: 61 additions & 0 deletions legacy/options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!doctype html>

<head>
<link href="styles/angular-material.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="styles/options.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="initial-scale=1" />
<script src="scripts/common.js"></script>
<script src="scripts/angular.min.js"></script>
<script src="scripts/angular-animate.min.js"></script>
<script src="scripts/angular-aria.min.js"></script>
<script src="scripts/angular-messages.min.js"></script>
<script src="scripts/angular-material.min.js"></script>
<script src="scripts/plugins/plugin.js"></script>
<script src="scripts/plugins/tab.js"></script>
<script src="scripts/plugins/media.js"></script>
<script src="scripts/plugins/bookmark.js"></script>
<script src="scripts/plugins/navigation.js"></script>
<script src="scripts/plugins/page.js"></script>
<script src="scripts/plugins/extension.js"></script>
<script src="scripts/plugins/query.js"></script>
<script src="scripts/options.js"></script>
</head>

<body ng-csp ng-app="options" ng-controller="AppController">
<md-content class="md-padding main-content">
<h1 class="md-headline">
Chrome Voice Assistant
</h1>
<div layout="column">
<option-card option="voiceOption" ng-hide="voiceOption.enabled"></option-card>
<option-card option="hotword" ng-show="voiceOption.enabled"></option-card>
<option-card option="notifications" ng-show="voiceOption.enabled"></option-card>
<option-card option="voiceDictation"></option-card>
<option-card option="shortcut"></option-card>
<h2>
Hotwords
</h2>
<md-input-container class="hotword-input">
<input value="Hey Buddy (default)" readonly aria-readonly>
</md-input-container>
<md-input-container class="hotword-input">
<label>Custom hotword</label>
<input name="customHotword" ng-model="customHotword" ng-change="onCustomHotwordChanged()" minlength="5">
</md-input-container>
</div>
<h2 class="md-headline">
Supported commands
</h2>
<div layout="row" layout-align="center center" layout-wrap>
<option-plugin flex="50" ng-repeat="plugin in plugins" plugin="plugin"></option-plugin>
</div>

<md-divider></md-divider>

<md-button class="md-primary" href="https://chrome.google.com/webstore/detail/chrome-voice-assistant/aollofiafbblhopkofbfmlmbhbdcblem" layout="column" target="_blank">
<span>
<i class="material-icons md-24 primary-icon align-middle">feedback</i> Review / Send feedbacks</span>
</md-button>
</md-content>
</body>
25 changes: 25 additions & 0 deletions legacy/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!doctype html>

<head>
<link href="styles/popup.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="initial-scale=1" />
<title>Listening</title>
</head>

<body>
<div class="main">
<img src="images/baseline-mic-24px.svg">
<a class="reviews" href="https://chrome.google.com/webstore/detail/chrome-voice-assistant/aollofiafbblhopkofbfmlmbhbdcblem"
target="_blank">Review / Send feedbacks</a>
<form id="query-form" class="query-form">
<input id="results" class="results" autofocus="true" autocomplete="off" placeholder="Hi, how can I help you?">
</form>
<div class="hint">
<input type="checkbox" id="personalized-search">
<label for="personalized-search">Show personalized search suggestions</label>
&middot;
<a href="/options.html" target="_blank">See all supported commands</a>.
</div>
</div>
<script src="scripts/popup.js"></script>
</body>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3fbe108

Please sign in to comment.