Commit Graph

71 Commits

Author SHA1 Message Date
toasted-nutbread
443d6d1956
Popup action bar options (#1140)
* Add options for action bar visibility and location

* Add settings

* Update styles

* Expose properties

* Update styles

* Update tests
2020-12-19 20:07:55 -05:00
toasted-nutbread
bf34905012
Improve display tags (#1117)
* Update tag style

* Add styles/HTML for notifications

* Add DisplayNotification class

* Add support for tag notifications

* Simplify notification content
2020-12-18 09:43:54 -05:00
toasted-nutbread
125c296eed
Support frame resize on firefox (#1088)
* Add popup functions for getting/setting the frame size

* Add frontend functions for getting/setting popup frame size

* Expose display mode attribute on display HTML

* Disable resizer on iframe

* Add custom frame resizer handle

* Add support for custom frame resizer
2020-12-08 20:31:02 -05:00
toasted-nutbread
92e9f69c80
Popup style updates (#1066)
* Replace compactGlossaries option with new glossaryLayoutMode option

* Update attributes

* Update attributes

* Update color definitions

* Fix default theme scrollbar
2020-11-25 23:22:05 -05:00
toasted-nutbread
2971f262f9
Merge float into display (#1053)
* Update audio play delay

* Move frame endpoint to Display

* Move _invokeOwner and close implementation

* Move browser info assignment

* Move window message handler setup

* Move copy implementation

* Move document title function

* Move extension unload handler

* Move close handler

* Move history event handlers

* Remove DisplayFloat

* Remove unused

* Organize

* Move event listeners into prepare
2020-11-22 15:29:51 -05:00
toasted-nutbread
73cb2c763c
Update indentation (#1047) 2020-11-20 22:57:14 -05:00
toasted-nutbread
181ade93d6
Display scroll fixes (#1046)
* Update focus when internal focus is changed

* Update scroll layout
2020-11-20 22:42:49 -05:00
toasted-nutbread
e9075e24e1
Update progress indicator styles (#1042) 2020-11-18 20:06:02 -05:00
toasted-nutbread
ea7b8621c3
Update layout to have better sizing properties (#1040) 2020-11-16 20:41:12 -05:00
toasted-nutbread
37ea7e2c9a
Add support for dark theme scrollbar colors (#1038) 2020-11-15 14:39:37 -05:00
toasted-nutbread
2e3169f68c
Popup navigation style updates (#1035)
* Add close function to Display

* Add new sidebar with navigation and close buttons

* Set up new navigation functionality

* Remove old navigation
2020-11-15 14:12:48 -05:00
toasted-nutbread
4b1c7b1e26
Display layout updates (#1032)
* Fix display scroll not always using the right position

* Update display layout and scroll method

* Fix border size
2020-11-14 18:12:06 -05:00
toasted-nutbread
50a1fbfb9f
Display updates (#1029)
* Simplify expression creation

* Add attribute indicating whether the reading is the same or not

* Update kanji debug info

* Remove some unnecessary null checks

* Simplify iterable check

* Update float and search HTML to be more consistent
2020-11-14 13:42:50 -05:00
toasted-nutbread
6081e3bef0
Make query parser mode select in the base HTML (#1009) 2020-11-08 13:25:07 -05:00
toasted-nutbread
8dc961a61f
Merge QueryPaserGenerator into QueryParser (#1008) 2020-11-08 12:50:16 -05:00
toasted-nutbread
8cf10d685d
Search and display style updates (#1005)
* Use same selectors

* Use consistent stylesheet declaration

* Fix query parser not being cleared

* Set property upon load

* Don't focus for Enter key press

* Update search page styles

* Update indent and nodes

* Support dark style

* Add missing var
2020-11-08 12:34:23 -05:00
toasted-nutbread
cb1902eadd
Template handler update (#896)
* Rename TemplateHandler to HtmlTemplateCollection

* Rename _templateHandler to _templates

* Allow creation from both string and element

* Simplify setup of templates, don't throw errors on invalid ID
2020-10-07 20:47:44 -04:00
toasted-nutbread
bbb534eff5
Split source.js into two files (#894) 2020-10-07 18:31:28 -04:00
toasted-nutbread
0b51488f1f
Audio system refactor (#858)
* Refactor AudioUriBuilder

* Add downloadAudio function

* Refactor AudioSystem

* Update API usage

* Rename file

* Update scripts

* Add prepare calls
2020-09-26 13:41:26 -04:00
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