aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
Commit message (Collapse)AuthorAge
* Dynamic loader load style (#521)toasted-nutbread2020-05-19
| | | | | | | | | * Remove unnecessary load of /fg/css/client.css * Replace dynamicLoader.loadStyles with dynamicLoader.loadStyle * Replace Popup._injectStylesheet with dynamicLoader.loadStyle * Remove unused global
* Use both shadowRoot and openOrClosedShadowRoot (#534)toasted-nutbread2020-05-10
|
* Load frame content using contentDocument.location.href instead of src ↵toasted-nutbread2020-05-10
| | | | attribute (#529)
* Use CSS variables for themes (#528)toasted-nutbread2020-05-10
| | | | | | | | | | | | | | | | | | | * 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
* Text source refactor (#527)toasted-nutbread2020-05-10
| | | | | | | | | * Update TextSourceElement API to have parity with TextSourceRange * Make fields private * Update equality check * Fix "this.element" being used instead of just "element"
* Fix setStartOffset not appending (#526)toasted-nutbread2020-05-09
|
* Frontend/popup proxy message refactoring (#520)toasted-nutbread2020-05-09
| | | | | | | | | | | | | * Use direct message handler functions * Remove unused targetPopupId * Make target a member of FrontendApiSender * Rename frameId to parentFrameId for clarity * Remove _parentFrameId * Rename _parentId to _parentPopupId for clarity
* Popup refactor (#518)toasted-nutbread2020-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | * Add default * Convert function to non-static * Remove static for private functions * Replace .call * Move functions with side effects into a synchronous prepare function * Rename variables with "container" to "frame" in _initializeFrame * Rename variables with "container" to "frame" * Rename getContainer to getFrame * Rename getContainerRect to getFrameRect * Organize and simplify * Fix incorrect change of "popup" => "this" * Move initial _updateVisibility into prepare()
* Text scanner refactor (#517)toasted-nutbread2020-05-08
| | | | | | | | | | | | | | | * Fix return type * Pass search function as a constructor argument * Pass constructor as a details object For consistency with other complex constructors and improved semantics. * Convert _ignorePoints to a single optional function * Organize functions * Rename ignorePoints to ignorePoint
* Popup proxy host refactor (#516)toasted-nutbread2020-05-08
| | | | | | | | | | | | | | | | | | | | | | | * Rename PopupProxyHost to PopupFactory * Update FrontendApiReceiver to support non-async handlers * Make some functions non-async * Make setCustomCss non-async * Make setContentScale non-async * Remove static * Rename variables * Pass frameId into PopupFactory's constructor * Change FrontendApiReceiver source from popup-proxy-host to popup-factor * Rename _invokeHostApi to _invoke * Rename PopupProxy.getHostUrl to getUrl
* Organize frontend functions (#513)toasted-nutbread2020-05-07
|
* Frontend refactor (#508)toasted-nutbread2020-05-06
| | | | | | | | | * Use this.popup instead of this.frontend.popup * Rename Frontend.popup to _popup * Make Frontend functions private * Clean up Frontend constructor
* Text scanning update (#507)toasted-nutbread2020-05-06
| | | | | * Fix unity test missing a parameter * Update docSentenceExtract to not rescan content
* Dom text scanner fixes (#505)toasted-nutbread2020-05-06
| | | | | | | | | * Fix test case * Add test-dom-text-scanner * Ensure that DOMTextScanner._node never becomes null * Add remainder
* Popup init update (#497)toasted-nutbread2020-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API function to send a message to a specific frameId in a tab * Update _windowMessageHandlers to support additional info per handler * Remove message token * Add new authorization check * Set up new initialization handler * Update initialization * Remove message token * Replace 'prepare' with 'configure' * Create new prepare function * Change configure guard * Log errors in onMessage * Improve popup initialize function * Clear secret/token in _resetFrame * Remove backend message token * Clear src and srcdoc attributes before loading * Don't treat about:blank unloads as load events
* Text selection fixes (#511)siikamiika2020-05-07
| | | | | * select matched text in Frontend.findKanji * blur search query input when setting content
* Extract textSource text inside TextScanner (#500)siikamiika2020-05-05
| | | | | * extract text inside TextScanner * clone textSource before text extraction
* Modifier key profile condition (#487)siikamiika2020-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* DOMTextScanner (#458)toasted-nutbread2020-05-02
| | | | | | | * Create new class for scanning text in a document * Update test styles * Add tests
* Style fixes (#494)toasted-nutbread2020-05-02
| | | | | | | * Place multi-line expression parentheses on the correct line * Add function-paren-newline eslint rule * Add some additional eslint rules
* Validate document nodes before use (#493)toasted-nutbread2020-05-02
| | | | | | | | | | | | | * Validate document.body before use in loadScripts This also fixes an issue where reject wasn't being passed to loadScriptSentinel. * Validate document nodes before use in _getSiteColor * Validate document.body before use in _getViewport * Validate document.body before use in setContentScale * Validate document.body before use in docImposterCreate
* Catch WrongDocumentError thrown by compareBoundaryPoints (#491)toasted-nutbread2020-05-02
| | | | | * Catch WrongDocumentError thrown by compareBoundaryPoints * Filter error based on name
* Remove and unload the popup frame if an unexpected load occurs (#490)toasted-nutbread2020-05-02
| | | | | | | | | * Remove and unload the popup frame if an unexpected load occurs * Remove unused fields * Only update _injectPromiseComplete if the promise is the most recent one * Remove redundant this._injectPromise !== null check
* Don't parent the popup frame to elements which cause unload (#488)toasted-nutbread2020-05-02
|
* Refactor frontend API classes (#482)toasted-nutbread2020-05-02
| | | | | | | | | | | | | * Mark functions as private * Remove constructor side effects * Use safer handler invocation * Mark functions as private * Mark fields as private * Update BackendApiForwarder public API
* Remove Frontend inheritance (#486)toasted-nutbread2020-05-02
| | | | | | | | | | | | | | | * Make Frontend use composition instead of inheritance for TextScanner * Use push instead of concat * Update setOptions and setEnabled APIs * Update how onWindowMessage event listener is added/removed * Rename options to _options * Use bind instead of arrow function * Fix selection being cleared due to settings changes
* Frontend refactor (part 1) (#484)toasted-nutbread2020-04-27
| | | | | | | | | | | | | | | | | | | * Remove _getVisualViewportScale * Use super's mouse event listener definitions * Remove redundant override * Remove getTouchEventListeners override * Rename Display.onSearchClear to onEscape * Change onSearchClear to clearSelection and use an event * Update how text is marked for selection and deselection * Replace onError with yomichan.logError * Update setEnabled to refresh all event listeners
* Use dynamicLoader for main (#481)toasted-nutbread2020-04-26
| | | | | * Update style of search-main and float-main to have better parity * Use dynamicLoader to inject scripts and CSS
* Add Yomichan icon SVG (#478)toasted-nutbread2020-04-26
| | | | | | | * Create Yomichan icon SVG and 32x32 PNG * Update icons * Add 32x32 icon definition to HTML pages
* Error logging refactoring (#454)toasted-nutbread2020-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create new logging methods on yomichan object * Use new yomichan.logError instead of global logError * Remove old logError * Handle unhandledrejection events * Add addEventListener stub * Update log function * Update error conversion to support more types * Add log event * Add API log function * Log errors to the backend * Make error/warning logs update the badge * Clear log error indicator on extension button click * Log correct URL on the background page * Fix incorrect error conversion * Remove unhandledrejection handling Firefox doesn't support it properly. * Remove unused argument type from log function * Improve function name * Change console.warn to yomichan.logWarning * Move log forwarding initialization into main scripts
* Update Popup and DisplayFloat optionsContext from Frontend (#464)siikamiika2020-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | * set optionsContext from Frontend * update Popup+Display options on Frontend change * remove popup setOptions * only update DisplayFloat options from Frontend * fix optionsContext usage * fix preview frame arguments * keep Frontend URL up to date * cache url * fix preview frame * trigger modifyingProfileChange in correct places * remove async from function not using await * refactor optionsContext in Frontend
* Use IIFE for entry pointstoasted-nutbread2020-04-22
|
* Move popup-nested content into float-maintoasted-nutbread2020-04-21
|
* Create float-main.jstoasted-nutbread2020-04-19
|
* Change frontend-initialize.js to content-script-main.jstoasted-nutbread2020-04-19
|
* Add support for displaying imagestoasted-nutbread2020-04-18
|
* cache invalidationsiikamiika2020-04-18
|
* simplify element source lazy loadsiikamiika2020-04-18
|
* cache closed shadow dom content windowssiikamiika2020-04-18
|
* lazy load element sourcessiikamiika2020-04-18
|
* optimize source frame findingsiikamiika2020-04-18
|
* use getFullscreenElement to check fullscreensiikamiika2020-04-18
|
* move open shadow root iframe finder to a functionsiikamiika2020-04-18
|
* show popup inside iframe for closed shadow domsiikamiika2020-04-18
|
* support iframes inside open shadow domsiikamiika2020-04-18
|
* disable root frame popup when iframe is fullscreensiikamiika2020-04-18
|
* Merge pull request #447 from toasted-nutbread/util-conversionstoasted-nutbread2020-04-18
|\ | | | | Util conversions
| * Add isExtensionUrl utility function to yomichan objecttoasted-nutbread2020-04-11
| |
* | Merge pull request #439 from siikamiika/popup-live-togglesiikamiika2020-04-17
|\ \ | | | | | | Popup live toggle
| * | fix _canEnable being used before setting optionssiikamiika2020-04-14
| | |