Commit Graph

52 Commits

Author SHA1 Message Date
toasted-nutbread
2f4adbab2c
Handlebars sandbox (#612)
* Set up template renderer proxy

* Use proxy

* Remove unused handlebars script tags

* Update manifest
2020-09-18 21:16:39 -04:00
toasted-nutbread
a531618c48
Use Anki classes directly in Display (#804)
* Add _getTemplates function

* Add template renderer to display pages

* Add AnkiNoteBuilder to Display

* Update AnkiTemplatesController to directly use TemplateRenderer

* Remove old APIs
2020-09-10 18:03:46 -04:00
toasted-nutbread
52b0feb255
Move TextToSpeechAudio to a separate file (#800) 2020-09-10 12:06:56 -04:00
toasted-nutbread
2a86d66092
DOM + DocumentUtil merge (#727)
* Add DOM functions to DocumentUtil

* Use DocumentUtil instead of DOM

* Remove DOM

* Move document-util.js into mixed
2020-08-09 21:07:11 -04:00
toasted-nutbread
6da02c6eee
document.js refactor (#719)
* Refactor document.js into a class

* Move public functions first

* Rename private functions

* Rename

* Rename argument

* Use instance of DocumentUtil

* Update tests

* Refactor

* Rename (test-)document.js to (test-)document-util.js
2020-08-09 13:27:21 -04:00
toasted-nutbread
1e839cd230
More display refactoring (#697)
* Remove some unnecessary _setQuery calls

* Add support for forcing the query parser to be visible or hidden

* Move _setEventListenersActive calls

* Remove URL for kanji links

* Refactor _setContentTermsOrKanji

* Move search query text assignment into Display

* Move title updates into Display

* Move popup close calls

* Prevent infinite loop of extension unload events
2020-08-01 16:22:00 -04:00
toasted-nutbread
736d3c892e
Dictionary data utility class (#698)
* Create utility class for helping format dictionary data

* Change format
2020-07-30 20:45:52 -04:00
toasted-nutbread
313476aa92
Query parser fix (#695)
* Standardize setContent calls

* Rename _queryText to _fullQuery

* Move query parser into Display and update float.html

* Generalize params

* Add "full" parameter to maintain the original full query
2020-07-26 19:29:12 -04:00
toasted-nutbread
208217198e
Display history refactor (#691)
* Create DisplayHistory

* Change arguments for _setContentTermsOrKanji

* Set up history-driven content updates

* Use new history only

* Load definitions if missing

* Refactor definitions getting

* Add support for wildcards

* Move definitions setup

* Add events

* Allow state change even if there is no history state

* Update search page to use history

* Fix history overwriting

* Fix search page not seeing state chang events during prepare

* Update state if necessary

* Don't reassign query text if the same

* Remove DisplayContext

* Initialize with real history state

* Track URL

* Update DisplayHistory to support pseudo-history

* Configure history settings on search page

* Fix state

* Use full URL

* Change data format of setContent

* Rename details to content

* Update event arguments

* Fix animation

* Remove old state changes

* Clear content properly

* Remove set/clear content overrides

* Fix setting up event listeners for content clear

* Make clearContent private

* Make focus opt-in

* Validate source

* Add unloaded type

* Generalize content params

* Update how extension unload content is assigned

* Restore query blurring
2020-07-26 16:51:54 -04:00
toasted-nutbread
6f49f426b5
Generalized frame connections (#654)
* Create FrameClient and FrameEndpoint

* Use new Frame* classes for Popup=>frame connection

* Update api.sendMessageToFrame and api.broadcastTab to include the sender's frameId

* Update FrameClient to store the frame's frameId
2020-07-08 19:58:06 -04:00
toasted-nutbread
a07a8dfff6
Extension unload detection (#647)
* Update how extension unload is detected

* Remove event handlers and use yomichan.isExtensionUnloaded instead

* Update terminology
2020-07-03 12:20:22 -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
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
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
4d2e5b93f4
Style adjustments (#537)
* Remove newlines for term-definition-item-template

* Update how action button icons are styled

* Fix spacing

* Group text colors together

* Correct image styles

* Fix missing </span>
2020-05-24 13:37:23 -04:00
toasted-nutbread
9742d5662b
Use CSS variables for themes (#528)
* Update formatting

* Merge default tag color with category-less tags

* Use CSS variables for colors

* Add dark theme colors

* Move color variables into display.css

* Remove old stylesheets

* Update headings

* Bump minimum Firefox version to support CSS var()

* Revert popular kanji text color
2020-05-10 14:07:25 -04:00
toasted-nutbread
887d769786
Use dynamicLoader for main (#481)
* Update style of search-main and float-main to have better parity

* Use dynamicLoader to inject scripts and CSS
2020-04-26 16:56:34 -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
d106c638ed Move popup-nested content into float-main 2020-04-21 18:38:55 -04:00
toasted-nutbread
9ca906ef90 Create float-main.js 2020-04-19 14:29:43 -04:00
toasted-nutbread
ac603d54a3 Add support for displaying images 2020-04-18 21:32:35 -04:00
toasted-nutbread
70284c62ee Replace DisplayGenerator._isCharacterKanji with jp.isCodePointKanji 2020-03-21 13:22:14 -04:00
toasted-nutbread
dceaa85309 Rename audio.js to audio-system.js 2020-03-07 21:43:51 -05:00
toasted-nutbread
a0b2e11c10 Use TemplateHandler for DisplayGenerator 2020-02-23 16:18:13 -05:00
toasted-nutbread
6194f9f585 Comma 2020-02-13 20:50:31 -05:00
toasted-nutbread
7686e56c00 Move display templates into a single file 2020-01-16 22:39:26 -05:00
toasted-nutbread
d512c111f6 Update how content display is changed 2020-01-16 22:39:26 -05:00
toasted-nutbread
24832be636 Update how spinner visibility is controlled 2020-01-16 22:39:26 -05:00
toasted-nutbread
56ee7f8df4 Update display content generation to use HTML templates 2020-01-16 22:39:26 -05:00
toasted-nutbread
ce51fe7eca Use a single api.js 2019-12-13 23:11:56 -05:00
siikamiika
248b0f15eb remove references to /fg/js/util.js
It doesn't exist
2019-12-04 23:20:03 +02:00
siikamiika
5929018fac move Display context to a new class 2019-12-01 05:38:23 +02: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
toasted-nutbread
9dc03f6d47 Remove wanakana reference from float.html 2019-11-25 13:34:56 -05:00
toasted-nutbread
7de24dd355 Add favicons 2019-11-02 10:10:03 -04:00
toasted-nutbread
b34ff7ebe9 Change #yomichan-float to .yomichan-float
Since there can be more than one popup, using a class makes more sense than an ID.
2019-10-13 12:12:52 -04:00
toasted-nutbread
57db18c31b Leave default stylesheet enabled by default 2019-10-12 19:00:24 -04:00
toasted-nutbread
c90bc75eb8 Create themes 2019-10-12 19:00:24 -04:00
toasted-nutbread
ceaeeb32dd Remove bootstrap styles from float.html 2019-10-12 19:00:21 -04:00
toasted-nutbread
1d516b3b24 Implement audio fallbacks 2019-10-10 21:30:38 -04:00
toasted-nutbread
1a7ad30111 Remove jQuery dependency from float.html and search.html 2019-09-27 21:41:00 -04:00
toasted-nutbread
946e577e42 Implement custom window scroll 2019-09-27 21:41:00 -04:00
toasted-nutbread
1a9348ec27 Add option for maximum nested popup depth 2019-09-02 19:32:08 -04:00
toasted-nutbread
5c4614f585 Add support for showing recursive popups 2019-09-02 19:31:42 -04:00
toasted-nutbread
a39a1fa9e4 Add support for Edge browser 2019-08-26 21:58:03 -04:00
siikamiika
0ee6d05cb1 Revert "use ES6 import and export"
This reverts commit 04f4607922.
2019-08-03 14:57:17 +03:00
siikamiika
04f4607922 use ES6 import and export 2019-08-02 00:04:39 +03:00
siikamiika
b8df9896e6 allow looking up terms from within terms
resolves #167, resolves #139, resolves #75, resolves #151
2019-08-01 02:20:09 +03:00
toasted-nutbread
c7fd17183d Add meta viewport tag to all html pages 2019-05-04 13:02:56 -04:00