Commit Graph

216 Commits

Author SHA1 Message Date
toasted-nutbread
c13160d784
Page exit prevention refactor (#637)
* Add page exit prevention functionality to SettingsController

* Update dictionary controller to use new page exit prevention system

* Remove page-exit-prevention.js
2020-07-03 11:56:26 -04:00
toasted-nutbread
5bf805755a
Yomichan object separation (#627)
* Move "yomichan" object setup to a separate file

* Update script imports

* Align message handlers

* Rename Yomichan.prepare to Yomichan.ready

* Add new prepare function

* Improve isExtensionUrl
2020-06-28 11:26:43 -04:00
toasted-nutbread
3e68af8666
Shadow DOM container for popup iframes (#623)
* Add support for injecting stylesheets into a custom parent node

* Add api.getStylesheetContent

* Add support for injecting a CSS file's content

* Add usePopupShadowDom option

* Use a per-parentNode cache

* Add support for using a shadow DOM wrapper around popup iframes

* Ignore the popup container instead of the frame
2020-06-24 21:46:13 -04:00
toasted-nutbread
65c41975a6
Secure popup frame url changes (#622)
* Throw error if options is not ready

* Remove id

* Change unsecurePopupFrameUrl to useSecurePopupFrameUrl
2020-06-22 19:26:59 -04:00
toasted-nutbread
e23504613f
Use DOMTextScanner (#536)
* Use DOMTextScanner instead of TextSourceRange.seek*

* Move getNodesInRange to dom.js

* Move anyNodeMatchesSelector to dom.js

* Remove unused functions

* Update tests

* Add layoutAwareScan option

* Use layoutAwareScan for source and sentence scanning

* Remove unused IGNORE_TEXT_PATTERN
2020-06-21 16:07:51 -04:00
toasted-nutbread
3db7b3a925
Add option to use the unsecure frame URL (#618) 2020-06-21 15:52:43 -04:00
toasted-nutbread
9767b76553
Use cross frame API (#553)
* Use new CrossFrameAPI for popup proxy communication

* Remove use of old cross-frame communication classes

* Remove use of old cross-frame communication files

* Make the crossFrame object a member of the api object
2020-06-07 21:40:11 -04:00
toasted-nutbread
db209c9116
Generic settings controller merge (#584)
* Update how optionsContext is assigned to targets

* Add getSettings and modifySettings

* Merge DOMSettingsBinder into GenericSettingController

* Remove old DOMSettingsBinder
2020-05-30 21:53:36 -04:00
toasted-nutbread
c8810bc929
Update AnkiController (#581)
* Update how fields are populated

* Update how fields are modified after a model change

* Update how _onFieldsChanged assigns fields

* Update how spinner is hidden

* Remove jQuery usage

* Use non-jQuery events
2020-05-30 16:22:51 -04:00
toasted-nutbread
395a0f4096
Update GenericSettingController to use DOMSettingsBinder (#578) 2020-05-30 16:20:31 -04:00
toasted-nutbread
18f376358c
Generic settings controller + clipboard popups controller (#573)
* Create GenericSettingController

* Create ClipboardPopupsController
2020-05-29 20:33:40 -04:00
toasted-nutbread
418e8a57bf
Convert dictionaries.js and storage.js to classes (#570)
* Convert dictionaries.js to a class

* Remove storage spinner

* Convert storage.js to a class

* Move dataset assignments into main.js
2020-05-29 20:25:22 -04:00
toasted-nutbread
c62f980f37
Audio controller (#569)
* Convert audio.js into a class

* Move audio-ui.js classes into audio.js

* Rename fields

* Merge classes

* Remove audio-ui.js
2020-05-29 19:56:38 -04:00
toasted-nutbread
8537c8f386
Create class to abstract access, mutation, and events for settings (#565) 2020-05-29 19:45:54 -04:00
toasted-nutbread
3089bb7908
Settings refactor (#541)
* Remove debug info

* Trigger onOptionsUpdated instead of formWrite when profile changes

* Update how Anki field changes are observed

* Update how general.enableClipboardPopups setting is changed

* Change where ankiTemplatesUpdateValue occurs

* Change where onDictionaryOptionsChanged occurs

* Remove unused global declarations

* Remove stray data attribute
2020-05-24 13:38:48 -04:00
siikamiika
d6a3825a38
Modifier key platform names (#519)
* wip

* add environment class

* use Environment class

* use Environment for scanning modifier options

* remove Environment in favor of API

* await promise

* use modifier symbols on macOS

* fix key separator issues

* if else to switch

* simplify variable names
2020-05-09 18:36:00 +03:00
toasted-nutbread
f361139d74
Japanese util refactor (#510)
* Convert mixed japanese.js to utility class

* Copy functions from bg/js/japanese.js into mixed/js/japanese.js

* Remove bg/js/japanese.js

* Make wanakana dependency optional

* Update tests
2020-05-06 19:37:36 -04:00
siikamiika
a1f8f0d1de
support meta as scanning modifier (#502) 2020-05-05 00:14:21 +03:00
siikamiika
77b744e675
Modifier key profile condition (#487)
* update Frontend options on modifier change

* add modifier key profile condition

* use select element for modifier condition value

* support "is" and "is not" modifier key conditions

* use plural

* remove dead null check

it's never null in that function

* pass element on rather than assigning to this

* rename event

* remove Firefox OS key to Meta detection

* hide Meta from dropdown on Firefox

* move input type
2020-05-03 04:39:24 +03:00
Allan Wirth
ce861ce079
Add helpful link for markers in settings.html (#489) 2020-05-01 16:59:19 -04:00
toasted-nutbread
0956634d61
Add duplicateScope: 'deck' option (#476)
* Add duplicateScope: 'deck' option

* Add option to control duplicate scope

* Use duplicateScope for findNoteIds

* Update location of quotes
2020-04-27 18:10:59 -04:00
toasted-nutbread
4e0fc76fe1
Add Yomichan icon SVG (#478)
* Create Yomichan icon SVG and 32x32 PNG

* Update icons

* Add 32x32 icon definition to HTML pages
2020-04-26 16:56:14 -04:00
toasted-nutbread
c2bf474d1f Update example 2020-04-11 19:00:01 -04:00
toasted-nutbread
42a2917bf7 Add support for collapsing emphatic character sequences 2020-04-10 11:56:18 -04:00
toasted-nutbread
dd9d50bfc1 Update settings page to display additional information 2020-04-05 14:46:45 -04:00
siikamiika
31a326fe63 add option for iframe popups 2020-04-05 20:03:42 +03:00
toasted-nutbread
cbc7e2646d Add options 2020-03-28 10:25:57 -04:00
toasted-nutbread
77a2cc60e9 Move basic string/character testing functions into a mixed/js/japanese.js 2020-03-21 13:18:34 -04:00
toasted-nutbread
69cce49b0d Move Anki note generation functionality into a new class 2020-03-07 21:46:59 -05:00
toasted-nutbread
dceaa85309 Rename audio.js to audio-system.js 2020-03-07 21:43:51 -05:00
siikamiika
6c63a17d66 query parser html templates 2020-02-10 21:19:18 +02:00
siikamiika
4e59c2d556 hide native popup option for firefox mobile 2020-02-09 21:51:33 +02:00
siikamiika
939ad42dac add global clipboard monitor that spawns popups
TODO: refactor the search page clipboard monitor and popup clipboard
monitor to use a common ClipboardMonitor class
2020-02-09 21:51:33 +02:00
toasted-nutbread
165959ef06 Move japanese.js into bg 2020-02-08 20:45:30 -05:00
siikamiika
b8326138a3 add scannable tags for expression and reading 2020-02-02 13:57:30 +02:00
toasted-nutbread
2dbb24ea04 Improve error messages when Interface server is invalid 2020-01-26 21:01:19 -05:00
siikamiika
7357eaf07a
Merge pull request #330 from siikamiika/query-parser-helper-disabling
Query parser helper disabling
2020-01-25 03:29:55 +02:00
toasted-nutbread
0c3b7d0fbc Add description of translation options 2020-01-24 20:15:25 -05:00
toasted-nutbread
67759b7aa3 Add convertHiraganaToKatakana option 2020-01-24 20:15:25 -05:00
toasted-nutbread
538d83c5a6 Reorganized variants to better reflect usage order 2020-01-24 20:15:25 -05:00
toasted-nutbread
4415a71ae2 Add translation options 2020-01-24 20:15:25 -05:00
siikamiika
fa4004437d query parser: add toggle for term spacing 2020-01-25 02:57:57 +02:00
siikamiika
aa5a044dad query parser: add reading mode 'none' 2020-01-25 02:56:14 +02:00
toasted-nutbread
5d366b722f Add option for changing poup scale relative to visual viewport 2020-01-22 20:38:21 -05:00
toasted-nutbread
351598a182 Add settings to control popup content scale 2020-01-22 20:38:21 -05:00
toasted-nutbread
e2a4a46e60 Implement settings reset 2019-12-29 12:33:28 -05:00
toasted-nutbread
f17b55239e Implement settings import 2019-12-29 12:33:28 -05:00
toasted-nutbread
5045a9a3a0 Implement settings export 2019-12-29 12:33:28 -05:00
toasted-nutbread
d2ae7364bb Update anki-templates.js to control the value of fieldTemplates
Also assigns a value of null when using the default value
2019-12-29 12:33:03 -05:00
toasted-nutbread
8c9416d70d Move conditions-ui into settings folder 2019-12-14 12:08:07 -05:00
toasted-nutbread
ce51fe7eca Use a single api.js 2019-12-13 23:11:56 -05:00
toasted-nutbread
b862035fbc Show info about whether a dictionary supports wildcard searches 2019-12-07 14:34:35 -05:00
toasted-nutbread
1a0a345ae7 Make reverse reading/expressions optional during database import 2019-12-07 14:34:35 -05:00
toasted-nutbread
7401408c39 Update input number attributes 2019-12-07 14:01:55 -05:00
toasted-nutbread
b418760a52 Simplify audio settings UI 2019-12-05 22:36:59 -05:00
toasted-nutbread
5339381c30 Update how anki data is updated 2019-12-02 22:17:45 -05:00
toasted-nutbread
f89806e05d Simplify how anki errors are shown 2019-12-01 22:26:23 -05:00
toasted-nutbread
a4de2d425a Move popup preview settings into new script 2019-12-01 17:02:01 -05:00
toasted-nutbread
65e9d47743 Move storage settings into new script 2019-12-01 17:02:01 -05:00
toasted-nutbread
69ba665a4f Move anki template settings into new script 2019-12-01 17:02:01 -05:00
toasted-nutbread
67990f4cb9 Move anki settings into new script 2019-12-01 16:19:15 -05:00
toasted-nutbread
3a517f0574 Move audio settings into new script 2019-12-01 16:19:15 -05:00
toasted-nutbread
ae94f84ffd Move settings scripts 2019-12-01 16:19:12 -05:00
toasted-nutbread
a7e4901f72 Move PageExitPrevention to its own file 2019-12-01 15:19:21 -05:00
toasted-nutbread
96aad50340 Create DOM utility file 2019-11-26 18:59:52 -05:00
toasted-nutbread
7e94fca7c7 Rename extension.js to core.js to better reflect its use 2019-11-26 17:29:52 -05:00
siikamiika
3423ed7d67
Merge pull request #279 from siikamiika/query-parser-1
Search page query parser
2019-11-26 18:31:35 +02:00
toasted-nutbread
eef05f6a64 Add accept type for dictionary import 2019-11-24 10:47:07 -05:00
siikamiika
cc8221c6ea add reading modes 2019-11-23 17:50:46 +02:00
siikamiika
c1d24208d3 start mecab only after enabling the setting 2019-11-23 17:45:44 +02:00
siikamiika
955e131f96 add parser selection options 2019-11-23 17:45:44 +02:00
toasted-nutbread
184cc4cf28 Allow templates to be tested on the settings page 2019-11-09 16:34:39 -05:00
toasted-nutbread
085881d342 Use HTML templates for anki fields 2019-11-09 14:31:13 -05:00
siikamiika
25af532ab7 enable expression scan toggling on search page 2019-11-09 12:27:09 +02:00
toasted-nutbread
b059609670 Add outdated warning 2019-11-07 20:30:55 -05:00
toasted-nutbread
e5dcb41824 Add support for importing multiple dictionaries at once 2019-11-07 20:30:55 -05:00
toasted-nutbread
e091c7ebe2 Add support for deleting individual dictionaries 2019-11-07 20:30:55 -05:00
toasted-nutbread
e355b83914 Update how nodes are hidden 2019-11-07 20:30:55 -05:00
toasted-nutbread
3d78d5400d Add button and confirmation dialog for database purge 2019-11-07 20:30:55 -05:00
toasted-nutbread
2ab871e7ee Update how dictionaries are displayed on the settings page 2019-11-07 20:30:55 -05:00
toasted-nutbread
44638b7ceb Simplify how option visibility is changed 2019-11-07 20:30:55 -05:00
toasted-nutbread
7de24dd355 Add favicons 2019-11-02 10:10:03 -04:00
toasted-nutbread
173a474d5b Add unlimited storage permission 2019-10-15 19:41:39 -04:00
toasted-nutbread
099909287f Show warning messages if persistant storage fails
Only Firefox seems to support persistent storage properly.
2019-10-15 19:22:30 -04:00
toasted-nutbread
437fe4e62e Move anki warnings under anki-general 2019-10-13 18:30:44 -04:00
toasted-nutbread
17e2f825f4 Add warning message for Mac users about App Nap 2019-10-13 17:32:28 -04:00
toasted-nutbread
7bae3824e7 Add support for text-to-speech playback 2019-10-13 12:21:19 -04:00
toasted-nutbread
21a2730cde Add option for text-to-speech 2019-10-13 12:20:56 -04:00
toasted-nutbread
1b96e69ea2 Placeholder and improve consistency of stylesheet rule priorities 2019-10-13 12:12:52 -04:00
toasted-nutbread
3272948284 Adds setting for controlling the outer style of the popup 2019-10-13 12:12:51 -04:00
toasted-nutbread
b086fca69f Add separate theme option for outer popup style 2019-10-12 19:00:24 -04:00
toasted-nutbread
696ea80e06 Add option for popup theme 2019-10-12 15:44:35 -04:00
toasted-nutbread
be7fa57d5c Add support for a popup preview 2019-10-12 15:44:32 -04:00
toasted-nutbread
70bceb5b56 Improve display of storage stats 2019-10-11 19:48:43 -04:00
toasted-nutbread
6014fe5344 Add support for persistent storage 2019-10-11 19:44:13 -04:00
toasted-nutbread
6208d6c93b Add UI for editing audio playback sources 2019-10-10 21:36:09 -04:00
toasted-nutbread
1dc8bf77ca Add input setting for custom audio source 2019-10-10 21:30:38 -04:00
toasted-nutbread
8ae1da4277 Update audio options format 2019-10-10 21:30:35 -04:00
toasted-nutbread
8be0ddeb26 Create region for audio options 2019-10-09 22:02:25 -04:00
toasted-nutbread
e18b8438ae Updated button styles 2019-09-29 12:33:16 -04:00