aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
Commit message (Collapse)AuthorAge
* Set content refactor (#686)toasted-nutbread2020-07-25
| | | | | | | | | | | | | | | | | | | | | | | * Simplify invoke * Pass isTerms instead of type * Update DisplaySearch.setContent to pass argument array * Simplify argument object structure for setContent * Move focus and disableHistory level * Always include focus and disableHistory options * Change disableHistory to history * Pass source text to setContent * Use consistent argument/object field order * Remove unused previous field * Combine logic for forward/back navigation
* Simplify Popup.showContent API to use only two details arguments (#684)toasted-nutbread2020-07-24
|
* Extension unload indication fix (#662)toasted-nutbread2020-07-18
| | | | | | | | | | | | | | | | | | | * Remove unused function * Rename field * Change extensionUnloaded trigger function * Update how extension unloaded content is shown * Ignore certain errors caused by extension unload * Add _showExtensionUnloaded function * Wrap internals of updateOptions * Suppress errors caued by extension unload * Make the frontend trigger the popup's extensionUnloaded event
* Message handler refactor (#660)toasted-nutbread2020-07-11
| | | | | | | | | | | * Refactor searchQueryUpdate action * Use standard message handler style * Use name "promiseOrResult" for consistency * Use standard message handler convention for Yomichan message handlers * Use common message handler invoker
* Various updates to FrameOffsetForwarder (#657)toasted-nutbread2020-07-10
| | | | | | | | | | | | | * Remove bindings * Fast exit if same window * Simplify selector * Rename functions, reuse _getFrameOffsetParent * Update message style * Send reply message to a specific frame
* Add support for async vs non-async (#656)toasted-nutbread2020-07-10
|
* Refactor DisplayFloat=>Frontend message passing (#652)toasted-nutbread2020-07-08
| | | | | | | | | | | * Change getOrCreatePopup arguments to be an object * Add ownerFrameId to popup and DisplayFloat * Refactor DisplayFloat host action invocation * Use CrossFrameAPI instead of window.postMessage * Update popup closing functionality on the search page
* Extension unload detection (#647)toasted-nutbread2020-07-03
| | | | | | | * Update how extension unload is detected * Remove event handlers and use yomichan.isExtensionUnloaded instead * Update terminology
* Shadow DOM container for popup iframes (#623)toasted-nutbread2020-06-24
| | | | | | | | | | | | | | | * Add support for injecting stylesheets into a custom parent node * Add api.getStylesheetContent * Add support for injecting a CSS file's content * Add usePopupShadowDom option * Use a per-parentNode cache * Add support for using a shadow DOM wrapper around popup iframes * Ignore the popup container instead of the frame
* Remove window. from visualViewport, use local variable instead (#621)toasted-nutbread2020-06-22
|
* Frontend initialization refactor (#610)toasted-nutbread2020-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create member functions for ignoreElements and ignorePoint * Create addFullscreenChangeEventListener utility * Move popup creation management into Frontend * Move getUrl implementation * Remove old setup * Remove try/catch block * Error wrap * Add prepare call to TextScanner * Update depth when popup changes * Refactor how Frontend gets PopupFactory and frameId * Update popup preview to work * Update popup preview frame to use the frontend's popup * Update how nested popups are set up * Error wrap * Update how popups are set up on the search page * Error wrap * Error unwrap * Add missing prepare * Remove use of frontendInitializationData * Catch and log errors
* Use DOMTextScanner (#536)toasted-nutbread2020-06-21
| | | | | | | | | | | | | | | | | * 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
* Ignore getZoom errors (#604)toasted-nutbread2020-06-14
|
* API refactor (#532)toasted-nutbread2020-05-24
| | | | | | | | | | | | | * Convert api.js into a class instance * Use new api.* functions * Fix missing binds * Group functions with progress callbacks together * Change style * Fix API override not working
* 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
* 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 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
* 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
* 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
* Merge pull request #439 from siikamiika/popup-live-togglesiikamiika2020-04-17
|\ | | | | Popup live toggle
| * fix _canEnable being used before setting optionssiikamiika2020-04-14
| |
| * don't focus tab when changing settingssiikamiika2020-04-14
| |
| * simplify frontend disable overridesiikamiika2020-04-11
| |
| * use setters instead of EventDispatchersiikamiika2020-04-11
| |
| * fix preview frame errorsiikamiika2020-04-11
| |
| * change iframe popup livesiikamiika2020-04-11
| |
| * allow disabling scan on search page livesiikamiika2020-04-11
| |
| * limit popup depth livesiikamiika2020-04-11
| |
* | Fix default value of _orphanedtoasted-nutbread2020-04-11
|/
* Merge pull request #437 from toasted-nutbread/backend-api-handler-changestoasted-nutbread2020-04-11
|\ | | | | Backend api handler changes
| * apiBroadcast => apiBroadcastTabtoasted-nutbread2020-04-10
| |
| * Rename apiForward to apiBroadcasttoasted-nutbread2020-04-07
| |
* | Update license author field to broader to explicitly reflect thatAlex Yatskov2020-04-10
|/ | | | | Yomichan is an ongoing community project. It really does take a village, and everyone who contributes code owns a part of it :)
* Add support for getting the document titletoasted-nutbread2020-04-06
|
* move broadcastRootPopupInformation to Frontendsiikamiika2020-04-05
|
* refactorsiikamiika2020-04-05
|
* fix and simplifysiikamiika2020-04-05
|
* show iframe popups in root framesiikamiika2020-04-05
|
* remove targetPopupId 'all'siikamiika2020-03-21
| | | | Make unset targetPopupId mean the same thing instead
* apply all options on profile changesiikamiika2020-03-21
|
* Update global declarationstoasted-nutbread2020-03-10
|
* Use .bind instead of () => {}toasted-nutbread2020-02-26
|
* Move event handler definitionstoasted-nutbread2020-02-26
|
* Simplify process to wait for iframe prepare completiontoasted-nutbread2020-02-16
|