summaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy.js
Commit message (Collapse)AuthorAge
* Popup proxy improvements (#764)toasted-nutbread2020-09-04
| | | | | | | | | * Fix incorrect function invocations * Ignore setVisibleOverride when it returns null * Omit redundant async * Change default return value
* Fix screenshot popup hide (#753)toasted-nutbread2020-08-23
| | | | | | | | | | | | | * Refactor Popup.setVisibleOverride * Use event to observe visibility changes * Add setAllVisibleOverride/clearAllVisibleOverride * Add setAllVisibleOverride/clearAllVisibleOverride cross frame handlers * Update how visibility is changed * Wait for next frame to ensure visibility has been updated
* Popup factory proxy creation (#745)toasted-nutbread2020-08-22
| | | | | | | * Change getOrCreatePopup to async * Rename parentFrameId to frameId, expose frameId property * Update how proxy popups are created
* Popup API refactor (#732)toasted-nutbread2020-08-15
| | | | | | | | | | | | | | | | | * Simplify how parent/child are set * Remove unused public frameId property * Change use of getFrame * Simplify parent access * Use property for the container * Remove isProxy * Public function API parity * Public property API parity
* Fix extension unload cases (#712)toasted-nutbread2020-08-02
| | | | | | | | | * Add _invokeSafe function to silently ignore extension unload errors * Remove "Api" from function names * Add invokeSafe to Popup * Don't redundantly set content type to 'unloaded'
* 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
* 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
* Make PopupProxy._frameOffsetExpireTimeout non-static (#640)toasted-nutbread2020-07-03
|
* 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
* PopupProxy refactor (#609)toasted-nutbread2020-06-14
| | | | | | | | | | | * Remove setDisabled member; replace with an event * Pass frameOffsetForwarder directly to PopupProxy * Replace .start with .prepare * Make onMessage private * Make message safer and handle unexpected inputs
* Use cross frame API (#553)toasted-nutbread2020-06-07
| | | | | | | | | * 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
* 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 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
* 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
* show popup inside iframe for closed shadow domsiikamiika2020-04-18
|
* 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 :)
* refactor _updateFrameOffsetsiikamiika2020-04-05
|
* reduce code duplicationsiikamiika2020-04-05
|
* give a name to a timeoutsiikamiika2020-04-05
|
* move broadcastRootPopupInformation to Frontendsiikamiika2020-04-05
|
* default to [0, 0] when sourceFrame is not foundsiikamiika2020-04-05
|
* error handlingsiikamiika2020-04-05
|
* throttle frame offset gettingsiikamiika2020-04-05
|
* refactorsiikamiika2020-04-05
|
* move frame offset forwarding code to a classsiikamiika2020-04-05
|
* simplify popup proxy preparesiikamiika2020-04-05
|
* fix and simplifysiikamiika2020-04-05
|
* adjust iframe popup position to root pagesiikamiika2020-04-05
|
* apply all options on profile changesiikamiika2020-03-21
|
* Update global declarationstoasted-nutbread2020-03-10
|
* Update how popups are createdtoasted-nutbread2020-02-16
|
* Simplify process to wait for iframe prepare completiontoasted-nutbread2020-02-16
|
* Merge pull request #357 from siikamiika/simplify-display-preparesiikamiika2020-02-14
|\ | | | | Simplify display prepare
| * use sendMessage to notify about initializationsiikamiika2020-02-14
| |
* | Define more globalstoasted-nutbread2020-02-11
|/
* Fix undefined idtoasted-nutbread2020-02-11
|
* Scale popup based on current page zoom factortoasted-nutbread2020-01-22
|
* Update license info URLtoasted-nutbread2020-01-01
|
* Update copyrighttoasted-nutbread2020-01-01
|
* Make PopupProxy functions async enabled status match Popuptoasted-nutbread2019-12-16
|
* isVisibleAsync => isVisibletoasted-nutbread2019-12-16
|
* Remove unused child gettertoasted-nutbread2019-12-16
|
* Add Popup.isProxytoasted-nutbread2019-12-16
|
* Flag members as privatetoasted-nutbread2019-12-16
|
* Mark PopupProxy internal functions as privatetoasted-nutbread2019-12-16
|
* Reposition popup on window resize rather than clear the searchtoasted-nutbread2019-10-17
| | | | Fixes #107
* Update *show* APIs to unified showContent and setContenttoasted-nutbread2019-10-17
|
* Update how custom CSS is appliedtoasted-nutbread2019-10-12
|