Commit Graph

1768 Commits

Author SHA1 Message Date
toasted-nutbread
edc22b98e3
Improve search page popup detection (#1378)
* Add _getAllTabs function

* Add _findTabs

* Use _findTabs instead of _findTab

* Remove _findTab

* Refactor tab check

* Add ability to search for a popup native window

* Fix dangling comma
2021-02-13 12:13:01 -05:00
toasted-nutbread
daea80942c
Fix old settings page not being used properly (#1376) 2021-02-12 23:07:19 -05:00
toasted-nutbread
4053d9b2fa
Move html files (#1375)
* Move background.html to /

* Move context.html to /

* Move info.html to /

* Move legal.html to /

* Move permissions.html to /

* Move pitch-accents-preview.html to /

* Move popup-preview.html to /

* Move search.html to /

* Move settings.html to /

* Move settings2.html to /

* Move template-renderer.html to /

* Move welcome.html to /

* Move float.html to /

* Move display-templates.html to /
2021-02-12 23:03:15 -05:00
toasted-nutbread
8454f52378
Move more data files (#1373)
* Move deinflect.json

* Move button.mp3

* Move fonts
2021-02-12 20:37:43 -05:00
toasted-nutbread
2b4af57bd7
Move data folder (#1371)
* Move handlebars template files

* Move schema files
2021-02-12 19:56:24 -05:00
toasted-nutbread
1c5e3e6d39
Search decouple (#1369)
* Update how query post-processing is implemented

* Update DisplaySearch to not subclass Display

* Update display construction

* Make display initialization consistent

* Remove unused

* Fix wanakana binding

* Use own frame/tab ID

* DisplaySearch => SearchDisplayController

* Fix globals
2021-02-11 22:57:38 -05:00
toasted-nutbread
94db6c69fa
Permissions button in browser action popup (#1368)
* Add key icon

* Update context icon styles

* Add permissions links

* Show warning badge if permissions are insufficient for certain settings

* Create PermissionsUtil

* Use PermissionsUtil in Backend

* Update SettingsController to use PermissionsUtil

* Update AnkiController to use getRequiredPermissionsForAnkiFieldValue

* Show the permissions buttons/links on the context page when necessary

* Update MV3 compatibility
2021-02-11 18:55:09 -05:00
toasted-nutbread
07cd006127
Add support for multiple types of audio (#1366) 2021-02-10 19:18:28 -05:00
toasted-nutbread
673952e825
Fix window popup screenshot (#1365)
* Pass tabId to the screenshot functionality

* Make setVisibleOverride async

* Fix argument order

* Fix incorrect windowId

* Remove unused argument
2021-02-09 23:14:29 -05:00
toasted-nutbread
166451b8f7
Improve popup window ownership (#1364)
* Update frameInformationGet to also return the tab ID

* Add tabId to Frontend

* Pass tabId/frameId to Display

* Pass ownership information using setContent

* Remove ownerFrameId for Popup classes

* Use frameId instead of ownerFrameId for screenshotting

* Use contentOrigin instead of owner

* Update _invokeContentOrigin implementation
2021-02-09 22:56:04 -05:00
toasted-nutbread
0f5fb804d0
Mecab test (#1361)
* Update Mecab API

* Add testMecab API function

* Add a test button for the Mecab component
2021-02-08 19:40:49 -05:00
toasted-nutbread
0ed24347ee
Fix settings permissions issues (#1360)
* Add missing warning indicator for the MeCab option

* Fix error handling of permissions requests
2021-02-08 19:37:36 -05:00
toasted-nutbread
0d031ab785
Improve context page display on mobile (#1359) 2021-02-08 17:53:22 -05:00
toasted-nutbread
e386599872
Fix changing the parser not immediately updating (#1358) 2021-02-08 17:53:17 -05:00
toasted-nutbread
69e8addb47
Mecab refactor (#1357)
* Use private variables

* Use local variables

* Remove onError

* Use private functions

* Move results parsing

* Set up disconnect observation

* Add _clearPort

* Update API

* Rename

* Fix iterator

* Update parseText invocation

* Update parseText format

* Reorganize

* Update implementation and docs

* Fix some port setup issues
2021-02-08 17:53:12 -05:00
toasted-nutbread
7b28c2c532
Auto-fill Anki card fields when possible (#1355) 2021-02-08 17:53:07 -05:00
toasted-nutbread
bb8a521dff
Remove unused api functions (#1354)
* Remove screenshotGet

* Remove downloadDefinitionAudio

* Remove clipboardGetImage
2021-02-08 17:53:02 -05:00
toasted-nutbread
4b6703114c
Improve dictionaries not enabled badges (#1349)
* Improve badges on the settings page

* Add badges on the context page
2021-02-08 17:52:46 -05:00
toasted-nutbread
849e4fabe1
Native messaging optional permission (#1348)
* Refactor PermissionsToggleController to not require a setting

* Update nativeMessaging to be optional on Chrome

* Update parsing.enableMecabParser setting to request permissions

* Update permissions page to use PermissionsToggleController

* Update permissions documentation

* Disable toggle for permissions which are not optional
2021-02-08 17:52:41 -05:00
toasted-nutbread
ace6e92d55
Update chrome://extensions/shortcuts URLs to be clickable (#1342) 2021-02-08 17:52:25 -05:00
toasted-nutbread
8f97ca0aac
Permissions toggle controller (#1347)
* Move file, rename class

* Expose required permissions in an attribute

* Update selector

* Update attribute

* Fix global declaration order
2021-02-04 22:17:42 -05:00
toasted-nutbread
47f16862d0
Fix incorrect clipboard setting target (#1346) 2021-02-04 21:12:32 -05:00
toasted-nutbread
6218b0d8f7
Fix the settings page trying to create a popup window (#1341) 2021-01-31 16:18:17 -05:00
toasted-nutbread
08a87bd007
Settings permissions info display (#1338)
* Add getAllPermissions function

* Add permissionsChanged event

* Update ClipboardPopupsController to show permissions validation info

* Add invalid indicator

* Display invalid indicator when permissions are not valid

* Fix border color transition not being necessary on input-suffix-button
2021-01-31 11:55:11 -05:00
toasted-nutbread
9e83faa02c
Html lint (#1336)
* Move style rules

* Fix non-unique IDs

* Remove erroneous ids

* Add title

* Fix invalid closing tag

* Install html-validate

* Add .htmlvalidate.json

* Update HTML and styles

* Add test-lint-html

* Update test files

* Update test-lint-html/css commands to have more explicit targets
2021-01-30 20:44:54 -05:00
toasted-nutbread
60c38ab83c
Modal refactor (#1335)
* Rename modal-container to modal

* Update how modal IDs are handled

* Fix invalid modal check

* Update modal IDs
2021-01-30 19:47:16 -05:00
toasted-nutbread
828c4b11c1
Permissions requesting fixes (#1334)
* Fix permissions requests not occurring during user interaction

* Update toggle after changing permissions

* Update functions

* Update clipboard requests
2021-01-30 15:05:08 -05:00
toasted-nutbread
a802666d8d
Update error handling for navigator.clipboard (#1333) 2021-01-30 15:03:19 -05:00
toasted-nutbread
7177694419
Fix the alt key opening the menu in KBM input fields on Firefox (#1332) 2021-01-30 14:15:27 -05:00
toasted-nutbread
0ba1427775
Fix null not being handled properly in _findTab result (#1331) 2021-01-30 14:06:43 -05:00
toasted-nutbread
d0b8b605db
Add note errors (#1329)
* Update _addAnkiNote to track errors

* Change comparison

* Update anki note adding to show errors

* Fix template

* Show errors when Anki card creation behaves unexpectedly

* Update some errors related to anki media injection

* Update addAnkiNote error handling

* Improve Anki errors

* Simplify error messages related to template rendering
2021-01-30 12:33:29 -05:00
toasted-nutbread
af6e9a8153
Fix CSP error when reading images from the clipboard using the paste command (#1328) 2021-01-30 11:15:11 -05:00
toasted-nutbread
a81787c55b
Remove the dictionary tag from the definitionTags (#1324)
* Remove dictionary tag from term definitionTags and kanji tags

* Update test data

* Update templates

* Update tests

* Update information
2021-01-28 21:33:30 -05:00
toasted-nutbread
e610a62ceb
Refactor anki field templates (#1323)
* Update glossary and glossary-single

* Define patch

* Create TemplatePatcher

* Add test
2021-01-28 21:17:10 -05:00
toasted-nutbread
ed0c0c20c0
Native keyboard shortcuts settings (#1322)
* Fix style issue

* Add ExtensionKeyboardShortcutController

* Move descriptions

* Add separator line
2021-01-27 19:34:14 -05:00
toasted-nutbread
97bb05147e
Don't trigger a change event for the initial content of the clipboard (#1321) 2021-01-26 20:12:04 -05:00
toasted-nutbread
898498c8a3
Clipboard settings organization (#1319)
* Create clipboard icon

* Move clipboard options

* Update clipboard options

* Update labels

* Add info

* Update all clipboard settings to request permissions
2021-01-26 19:58:58 -05:00
toasted-nutbread
8d292363d4
Update clipboard options organization (#1318)
* Update options organization

* Update general.enableClipboardPopups to clipboard.enableBackgroundMonitor

* Update general.enableClipboardMonitor to clipboard.enableSearchPageMonitor

* Update general.maximumClipboardSearchLength to clipboard.maximumSearchLength

* Update general.autoSearchClipboardContent to clipboard.autoSearchContent
2021-01-26 18:30:01 -05:00
toasted-nutbread
d11cd7b28f
Fix missing options for _onDisplayOptionsUpdated invocation (#1317) 2021-01-26 18:24:56 -05:00
toasted-nutbread
43c9a5eb6a
Fix search box resizing (#1316)
* Don't resize the search box unless it's necessary

* Allow search box to shrink under certain circumstances
2021-01-25 22:19:44 -05:00
toasted-nutbread
34fed22ccb
Fix clipboard monitor not persisting (#1315)
* Add optionsUpdated event to Display

* Update this._clipboardMonitorEnabled

* Update settings to ensure no unexpected behaviour
2021-01-25 22:18:31 -05:00
toasted-nutbread
981f73b562
Clipboard lookup skip option (#1314)
* Add autoSearchClipboardContent option

* Hide header if there is any search text

* Add setting for autoSearchClipboardContent

* Add support for autoSearchClipboardContent
2021-01-25 22:05:06 -05:00
toasted-nutbread
ea1d40f94b
Defer load of iframe on the settings page (#1313) 2021-01-25 19:21:02 -05:00
toasted-nutbread
bab6c6fba9
Update badges (#1309)
* Update badge indications to be based off current profile

* Update warning badge to display when no dictionaries are enabled

* Show how many dictionaries are enabled
2021-01-24 22:32:29 -05:00
toasted-nutbread
ebfef0c748
Multiple custom audio sources (#1303)
* Fix label

* Fix icon size being flexible

* Add schema

* Add customSourceType option

* Update settings

* Pass customSourceType to the audio downloader

* Implement custom audio JSON mode
2021-01-23 22:46:00 -05:00
toasted-nutbread
9fbdb9757b
Update popup menu structure (#1301)
* Wrap menu items in popup-menu-body

* Use bodyNode instead of node

* Update selector

* Update _setPosition to not use items
2021-01-23 21:07:45 -05:00
toasted-nutbread
7fbfef513d
Display audio update (#1291)
* Move createExpressionAudio to DisplayAudio

* Move createAudioFromInfo to DisplayAudio

* Update TextToSpeechAudio
2021-01-22 22:10:27 -05:00
toasted-nutbread
a51a591c40
Update audio validity checks to be based on the source (#1290) 2021-01-22 21:09:43 -05:00
toasted-nutbread
55df9dc7cd
Fix numpad enter functioning differently than enter on the search page (#1289) 2021-01-22 20:46:48 -05:00
toasted-nutbread
cf57c4e38d
Simplify CacheMap (#1287)
* Simplify CacheMap, removing support for array path keys

* Update keys

* Update JsonSchemaValidator

* Update AudioSystem
2021-01-21 22:49:54 -05:00