Commit Graph

20 Commits

Author SHA1 Message Date
toasted-nutbread
d3807d88ec
ArrayBufferUtil (#2215)
* Rename StringUtil to ArrayBufferUtil

* Update docs

* Rename file string-util.js to array-buffer-util.js
2022-08-20 12:53:22 -04:00
toasted-nutbread
0b5d54e7c6
Rename anki.js to anki-connect.js to more accurately reflect class name (#2167) 2022-05-29 21:42:26 -04:00
toasted-nutbread
0d82c52a76
HTML page script refactoring (#2162)
* Move some common functionality

* Move setupEnvironmentInfo into ExtensionContentController

* Move background/environment.js to extension/environment.js
2022-05-28 21:57:25 -04:00
toasted-nutbread
89ac85afd0
Update copyright date (#2062)
* Update eslint settings

* Update 2021 files

* Update other files
2022-02-02 20:43:10 -05:00
toasted-nutbread
f2102ade4c
Add AccessibilityController class, which dynamically registers (#2024)
and unregisters the google-docs.js content script
2021-11-23 22:23:14 -05:00
toasted-nutbread
cedf6b25c4
ScriptManager (#2021)
* Create ScriptManager class

* Use ScriptManager in Backend
2021-11-22 19:29:20 -05:00
toasted-nutbread
454ffaad96
StringUtil (#1861)
* Add StringUtil class

* Use StringUtil
2021-07-31 13:04:16 -04:00
toasted-nutbread
fafa746a63
Sandbox script folders (#1837)
* Move scripts

* Update paths

* Fix ordering

* Simplify eslint rules
2021-07-17 17:10:25 -04:00
toasted-nutbread
c6f4144fda
Clean up translator (#1505)
* Remove unused: _removeUsedDefinitions

* Remove unused: _scoreToTermFrequency

* Remove unused: _getTermTagsScoreSum

* Add RegexUtil

* Update Translator to use RegexUtil

* Update sw.js

* Update tests
2021-03-08 21:01:55 -05:00
toasted-nutbread
ae92e0b378
AnkiUtil (#1439)
* Add AnkiUtil

* Update AnkiConnect to use AnkiUtil

* Use AnkiUtil in AnkiNoteBuilder

* Replace containsAnyMarker with AnkiUtil.stringContainsAnyFieldMarker

* Add AnkiUtil.getFieldMarkers

* Add fieldsObjectContainsMarker to AnkiUtil

* Remove unused global

* Remove unused parameter: enabled

* Add cloneFieldMarkerPattern
2021-02-24 21:54:58 -05:00
toasted-nutbread
d6332d2bc7
Test html script ordering (#1396)
* Simplify getAllFiles

* Add test to validate script order

* Update script include order

* Update content script order

* Update sw.js and corresponding lint

* Update manifest
2021-02-14 20:25:41 -05:00
toasted-nutbread
5268c5d1bc
Util rename (#1389)
* Rename MediaUtility to MediaUtil for consistency

* Update variable names

* Rename media-utility.js to media-util.js

* Rename ProfileConditions to ProfileConditionsUtil

* Rename variables

* Move profile-conditions.js to profile-conditions-util.js

* Rename test-profile-conditions.js to test-profile-conditions-util.js
2021-02-14 11:32:30 -05:00
toasted-nutbread
e419a418f6
Move bg/js (#1387)
* Move bg/js/anki.js to js/comm/anki.js

* Move bg/js/mecab.js to js/comm/mecab.js

* Move bg/js/search-main.js to js/display/search-main.js

* Move bg/js/template-patcher.js to js/templates/template-patcher.js

* Move bg/js/template-renderer-frame-api.js to js/templates/template-renderer-frame-api.js

* Move bg/js/template-renderer-frame-main.js to js/templates/template-renderer-frame-main.js

* Move bg/js/template-renderer-proxy.js to js/templates/template-renderer-proxy.js

* Move bg/js/template-renderer.js to js/templates/template-renderer.js

* Move bg/js/media-utility.js to js/media/media-utility.js

* Move bg/js/native-simple-dom-parser.js to js/dom/native-simple-dom-parser.js

* Move bg/js/simple-dom-parser.js to js/dom/simple-dom-parser.js

* Move bg/js/audio-downloader.js to js/media/audio-downloader.js

* Move bg/js/deinflector.js to js/language/deinflector.js

* Move bg/js/backend.js to js/background/backend.js

* Move bg/js/translator.js to js/language/translator.js

* Move bg/js/search-display-controller.js to js/display/search-display-controller.js

* Move bg/js/request-builder.js to js/background/request-builder.js

* Move bg/js/text-source-map.js to js/general/text-source-map.js

* Move bg/js/clipboard-reader.js to js/comm/clipboard-reader.js

* Move bg/js/clipboard-monitor.js to js/comm/clipboard-monitor.js

* Move bg/js/query-parser.js to js/display/query-parser.js

* Move bg/js/profile-conditions.js to js/background/profile-conditions.js

* Move bg/js/dictionary-database.js to js/language/dictionary-database.js

* Move bg/js/dictionary-importer.js to js/language/dictionary-importer.js

* Move bg/js/anki-note-builder.js to js/data/anki-note-builder.js

* Move bg/js/anki-note-data.js to js/data/anki-note-data.js

* Move bg/js/database.js to js/data/database.js

* Move bg/js/json-schema.js to js/data/json-schema.js

* Move bg/js/options.js to js/data/options-util.js

* Move bg/js/background-main.js to js/background/background-main.js

* Move bg/js/permissions-util.js to js/data/permissions-util.js

* Move bg/js/context-main.js to js/pages/action-popup-main.js

* Move bg/js/generic-page-main.js to js/pages/generic-page-main.js

* Move bg/js/info-main.js to js/pages/info-main.js

* Move bg/js/permissions-main.js to js/pages/permissions-main.js

* Move bg/js/welcome-main.js to js/pages/welcome-main.js
2021-02-14 11:19:54 -05:00
toasted-nutbread
6a271e067f
Move mixed/js (#1383)
* Move mixed/js/core.js to js/core.js

* Move mixed/js/yomichan.js to js/yomichan.js

* Move mixed/js/timer.js to js/debug/timer.js

* Move mixed/js/hotkey-handler.js to js/input/hotkey-handler.js

* Move mixed/js/hotkey-help-controller.js to js/input/hotkey-help-controller.js

* Move mixed/js/hotkey-util.js to js/input/hotkey-util.js

* Move mixed/js/audio-system.js to js/input/audio-system.js

* Move mixed/js/media-loader.js to js/input/media-loader.js

* Move mixed/js/text-to-speech-audio.js to js/input/text-to-speech-audio.js

* Move mixed/js/comm.js to js/comm/cross-frame-api.js

* Move mixed/js/api.js to js/comm/api.js

* Move mixed/js/frame-client.js to js/comm/frame-client.js

* Move mixed/js/frame-endpoint.js to js/comm/frame-endpoint.js

* Move mixed/js/display.js to js/display/display.js

* Move mixed/js/display-audio.js to js/display/display-audio.js

* Move mixed/js/display-generator.js to js/display/display-generator.js

* Move mixed/js/display-history.js to js/display/display-history.js

* Move mixed/js/display-notification.js to js/display/display-notification.js

* Move mixed/js/display-profile-selection.js to js/display/display-profile-selection.js

* Move mixed/js/japanese.js to js/language/japanese-util.js

* Move mixed/js/dictionary-data-util.js to js/language/dictionary-data-util.js

* Move mixed/js/document-focus-controller.js to js/dom/document-focus-controller.js

* Move mixed/js/document-util.js to js/dom/document-util.js

* Move mixed/js/dom-data-binder.js to js/dom/dom-data-binder.js

* Move mixed/js/html-template-collection.js to js/dom/html-template-collection.js

* Move mixed/js/panel-element.js to js/dom/panel-element.js

* Move mixed/js/popup-menu.js to js/dom/popup-menu.js

* Move mixed/js/selector-observer.js to js/dom/selector-observer.js

* Move mixed/js/scroll.js to js/dom/window-scroll.js

* Move mixed/js/text-scanner.js to js/language/text-scanner.js

* Move mixed/js/cache-map.js to js/general/cache-map.js

* Move mixed/js/object-property-accessor.js to js/general/object-property-accessor.js

* Move mixed/js/task-accumulator.js to js/general/task-accumulator.js

* Move mixed/js/environment.js to js/background/environment.js

* Move mixed/js/dynamic-loader.js to js/scripting/dynamic-loader.js

* Move mixed/js/dynamic-loader-sentinel.js to js/scripting/dynamic-loader-sentinel.js
2021-02-13 22:52:28 -05:00
toasted-nutbread
deed5027cd
Move mixed/lib/ to lib/ (#1382) 2021-02-13 21:28:47 -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
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
a02891e52c
Update copyright year (#1194)
* Update copyright year

* Remove redundant Author info
2021-01-01 14:50:41 -05:00
toasted-nutbread
05d4049f16
DOMParser replacement (#561)
* Add script to build library files

* Add built parse5 library

* Add new SimpleDOMParser which uses parse5

* Update license info

* Update MV3 build to use the new SimpleDOMParser

* Update file exclusions

* Hide/clarify license info for MV2 builds
2020-12-18 17:06:30 -05:00
toasted-nutbread
51223abfa6
Set up initial manifest v3 support (#605) 2020-12-18 15:54:05 -05:00