Commit Graph

11 Commits

Author SHA1 Message Date
toasted-nutbread
31e20c889e
ESlint JSdoc (#2148)
* Install eslint-plugin-jsdoc

* Initial rules setup

* Update lists

* Use @returns rather than @return

* Remove error throwing code which is never executed

* Fix issues relating to @throws

* General error fixes

* Update Display type documentation

* Various doc fixes

* Fix invalid tuple syntax

* Doc updates

* Remove unused

* Doc updates

* Enable jsdoc/require-returns

* Update rules

* Update remaining rules
2022-05-20 10:28:38 -04:00
toasted-nutbread
63d37c872b
Popup positioning improvements (#2135)
* Rename elementRect to sourceRect

* Add getRects function to TextSourceElement and TextSourceRange

* Add jsdocs

* Remove unnecessary valid parameter

* Remove default parameter

* Make optionsContext optional

* Remove unnecessary checks

* Update sourceRect to use left/right rather than x/y

* Update the return type of Popup*.getFrameRect

* Rename some unrelated rect vars for disambiguation

* Disambiguate between Popup.Rect and Popup.ValidRect

* Move sourceRect destructuring

* Pass multiple source rects

* Simplify

* Change Rect to use right/bottom rather than width/height

* Update how popup offset is applied

* Simplify frame offset

* Remove _applyFrameOffset

* Use right/bottom rather than width/height

* Simplify some positioning settings

* Update parameter names for clarity

* Fix typos

* Refactor data type for _getPosition* functions

* Support using multiple source rects

* Combine _getPosition functions

* Refactor

* Expose after dataset value

* Consistently use this's property

* Add jsdoc
2022-05-16 21:45:22 -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
005f9658d9
Action handler name disambiguation (#2018)
* Disambiguate PopupFactory action handlers

* Update HotkeyHandler action names

* Disambiguate Frontend action handlers

* Disambiguate Display action handlers

* Disambiguate PopupPreviewFrame action handlers

* Disambiguate Yomichan action handlers

* Disambiguate Frontend action handlers

* Disambiguate Display action handlers

* Disambiguate SearchDisplayController action handlers
2021-11-21 15:54:58 -05:00
toasted-nutbread
06e70c1cd8
FrameOffsetForwarder fixes (#2017)
* Fix handling of null iframe rect

* Handle errors inside of getOffset
2021-11-21 15:08:39 -05:00
toasted-nutbread
36967b1839
General refactoring (#2016)
* Remove // Public comments

* Fix errors

* Remove source parameter from Popup*.setOptionsContext
2021-11-21 12:34:57 -05:00
toasted-nutbread
2dc8394c72
JSDoc update (#1996)
* Update core.js docs to include types.

* Update docs
2021-10-31 21:45:57 -04:00
toasted-nutbread
19eb990aeb
DOMRect update (#1973)
* Compare using left/top rather than x/y

* Simplify

* Update Popup*.getFrameRect to return a custom structure

* Don't use x/y on DOMRect
2021-09-30 21:05:34 -04:00
toasted-nutbread
9279ced686
Log refactoring (#1393)
* Create Logger class and log instance

* Replace yomichan.logWarning with log.warn

* Replace yomichan.logError with log.error

* Replace yomichan.log with log.log

* Update the Yomichan class to use the global log object

* Update lint rules
2021-02-14 17:52:01 -05:00
toasted-nutbread
286534e648
Move api to yomichan object (#1392)
* Move cross frame API from API to Yomichan

* Add API instance to Yomichan

* Move api global to yomichan.api

* Pass yomichan to API

* Remove IIFE
2021-02-14 15:53:35 -05:00
toasted-nutbread
7a74c3c31e
Move fg/js (#1384)
* Move fg/js/frame-ancestry-handler.js to js/comm/frame-ancestry-handler.js

* Move fg/js/frame-offset-forwarder.js to js/comm/frame-offset-forwarder.js

* Move fg/js/dom-text-scanner.js to js/dom/dom-text-scanner.js

* Move fg/js/text-source-element.js to js/dom/text-source-element.js

* Move fg/js/text-source-range.js to js/dom/text-source-range.js

* Move fg/js/float-main.js to js/display/popup-main.js

* Move fg/js/content-script-main.js to js/app/content-script-main.js

* Move fg/js/frontend.js to js/app/frontend.js

* Move fg/js/popup-factory.js to js/app/popup-factory.js

* Move fg/js/popup-proxy.js to js/app/popup-proxy.js

* Move fg/js/popup-window.js to js/app/popup-window.js

* Move fg/js/popup.js to js/app/popup.js
2021-02-13 23:13:53 -05:00