-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from NekitCorp/issue3
Issue3
- Loading branch information
Showing
16 changed files
with
240 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import setHotkey from "hotkeys-js"; | ||
import { defaultStorage, IStorage } from "./common/storage"; | ||
import { startFiltersOnHotkey, startSwaps } from "./content_scripts/hotkey"; | ||
import { createObserver, highlight, renderTotalTime } from "./content_scripts/time"; | ||
|
||
// By default hotkeys are not enabled for INPUT, SELECT, TEXTAREA elements. | ||
setHotkey.filter = function (event) { | ||
return true; | ||
}; | ||
|
||
chrome.storage.sync.get(defaultStorage, ({ filters, calcTotalTime, swaps }: IStorage) => { | ||
// Start calculate total time | ||
if (calcTotalTime) { | ||
highlight(); | ||
renderTotalTime(); | ||
createObserver(); | ||
} | ||
|
||
startFiltersOnHotkey(filters); | ||
startSwaps(swaps); | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import Options from "./components/Options.svelte"; | ||
import Options from "./options/components/Options.svelte"; | ||
|
||
new Options({ target: document.body }); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script lang="ts"> | ||
import { keys, specialKeys } from "../../common/keyboard-keys"; | ||
export let key = ""; | ||
export let specialKey = ""; | ||
</script> | ||
|
||
<style> | ||
</style> | ||
|
||
<td> | ||
<select bind:value={specialKey}> | ||
{#each specialKeys as specialKey} | ||
<option value={specialKey}>{specialKey}</option> | ||
{/each} | ||
</select> | ||
</td> | ||
<td> | ||
<select bind:value={key}> | ||
{#each keys as key} | ||
<option value={key}>{key}</option> | ||
{/each} | ||
</select> | ||
</td> |
Oops, something went wrong.