-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7caa14d
commit 58b2af1
Showing
15 changed files
with
3,327 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"env": { "es6": true }, | ||
"parserOptions": { | ||
"ecmaVersion": 8, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"semi": ["error", "always"], | ||
"quotes": ["error"] | ||
} | ||
} |
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,3 @@ | ||
node_modules | ||
tests/js | ||
.DS_Store |
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 +1,3 @@ | ||
# chrome-extension | ||
# chrome-extension | ||
|
||
Chrome extention for leveraging text predictions based on machine learning models trained via typelike.me |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,5 @@ | ||
chrome.runtime.onInstalled.addListener(function() { | ||
chrome.storage.local.set({active: 1}, function() { | ||
console.log('Now Active'); | ||
}); | ||
}); |
Large diffs are not rendered by default.
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,30 @@ | ||
function refresh() { | ||
chrome.storage.local.get(['active', 'attachInput', 'attachTextarea', 'key'], function (result) { | ||
document.getElementById('active').checked = result.active; | ||
document.getElementById('attach-to-input').checked = result.attachInput; | ||
document.getElementById('attach-to-textarea').checked = result.attachTextarea; | ||
document.getElementById('key').value = result.key; | ||
}); | ||
} | ||
refresh(); | ||
|
||
document.getElementById('active').addEventListener('change', function(){ | ||
chrome.storage.local.set({active: document.getElementById('active').checked}, function() { | ||
refresh(); | ||
}); | ||
}); | ||
document.getElementById('attach-to-input').addEventListener('change', function(){ | ||
chrome.storage.local.set({attachInput: document.getElementById('attach-to-input').checked}, function() { | ||
refresh(); | ||
}); | ||
}); | ||
document.getElementById('attach-to-textarea').addEventListener('change', function(){ | ||
chrome.storage.local.set({attachTextarea: document.getElementById('attach-to-textarea').checked}, function() { | ||
refresh(); | ||
}); | ||
}); | ||
document.getElementById('key').addEventListener('blur', function(){ | ||
chrome.storage.local.set({key: document.getElementById('key').value}, function() { | ||
refresh(); | ||
}); | ||
}); |
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,50 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link | ||
rel="stylesheet" | ||
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" | ||
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" | ||
crossorigin="anonymous" | ||
/> | ||
</head> | ||
<body> | ||
<div id="buttonDiv"></div> | ||
<div> | ||
<form> | ||
<div class="form-check"> | ||
<input | ||
type="checkbox" | ||
id="active" | ||
name="active" | ||
class="form-check-input" | ||
/> | ||
<label for="active" class="form-check-label">Active</label> | ||
</div> | ||
<div class="form-check"> | ||
<input | ||
type="checkbox" | ||
id="attach-to-input" | ||
name="attach-to-input" | ||
class="form-check-input" | ||
/> | ||
<label for="attach-to-input" class="form-check-label">Attach to input elements</label> | ||
</div> | ||
<div class="form-check"> | ||
<input | ||
type="checkbox" | ||
id="attach-to-textarea" | ||
name="attach-to-textarea" | ||
class="form-check-input" | ||
/> | ||
<label for="attach-to-textarea" class="form-check-label">Attach to textarea elements</label> | ||
</div> | ||
<div class="form-group"> | ||
<label for="key">Model Key</label> | ||
<input type="text" id="key" name="key" class="form-control" /> | ||
</div> | ||
</form> | ||
</div> | ||
<script src="/dist/js/options.js"></script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,27 @@ | ||
{ | ||
"name": "TypeLikeMe Typing Assistant", | ||
"version": "0.1.0", | ||
"description": "Chrome extention for leveraging text predictions based on machine learning models trained via typelike.me.", | ||
"manifest_version": 2, | ||
"permissions": ["storage", "activeTab"], | ||
"background": { | ||
"scripts": ["dist/js/background.js"], | ||
"persistent": false | ||
}, | ||
"options_page": "dist/options.html", | ||
"page_action": { | ||
"default_icon": { | ||
"32": "favicon.png" | ||
} | ||
}, | ||
"content_scripts": [ | ||
{ | ||
"matches": ["<all_urls>"], | ||
"js": ["dist/js/content.js"], | ||
"css": ["dist/css/dropdown.min.css"] | ||
} | ||
], | ||
"icons": { | ||
"32": "favicon.png" | ||
} | ||
} |
Oops, something went wrong.