aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/popup.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
* Popup crossFrame communication (#658)toasted-nutbread2020-07-10
| | | | | | | | | * Add support for dynamic message handlers * Pass messages using crossFrame.invoke instead of contentWindow.postMessage * Set up async handlers * Simplify configure call and response
* Generalized frame connections (#654)toasted-nutbread2020-07-08
| | | | | | | | | * 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
* 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
* Don't use/assign popup private fields without using "this" (#635)toasted-nutbread2020-07-03
|
* Use deferPromise (#630)toasted-nutbread2020-06-28
| | | | | | | * Use deferPromise * Move definition * Implement promiseTimeout using deferPromise
* 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
* Secure popup frame url changes (#622)toasted-nutbread2020-06-22
| | | | | | | * Throw error if options is not ready * Remove id * Change unsecurePopupFrameUrl to useSecurePopupFrameUrl
* 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
* Add option to use the unsecure frame URL (#618)toasted-nutbread2020-06-21
|
* 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
* 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)
* 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()
* 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
* 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
* 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
* 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
|
* 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 getFullscreenElement to check fullscreensiikamiika2020-04-18
|
* Add isExtensionUrl utility function to yomichan objecttoasted-nutbread2020-04-11
|
* 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 :)
* move broadcastRootPopupInformation to Frontendsiikamiika2020-04-05
|
* use getTemporaryListenerResult in other placessiikamiika2020-04-05
|
* refactorsiikamiika2020-04-05
|
* fix and simplifysiikamiika2020-04-05
|
* simplify popup preparesiikamiika2020-04-05
|
* show iframe popups in root framesiikamiika2020-04-05
|
* apply all options on profile changesiikamiika2020-03-21
|
* Update global declarationstoasted-nutbread2020-03-10
|
* Use .bind instead of () => {}toasted-nutbread2020-02-26
|
* Use a token to ensure that messages are coming from Yomichantoasted-nutbread2020-02-17
|
* Check origin on window messagestoasted-nutbread2020-02-16
|
* Fix error handling on style injectiontoasted-nutbread2020-02-16
|
* Delay CSS injection until a popup is createdtoasted-nutbread2020-02-16
|
* Create more generic function for injecting stylesheetstoasted-nutbread2020-02-16
|
* Change parameter nametoasted-nutbread2020-02-16
|
* Allow apiInjectStylesheet to inject a URLtoasted-nutbread2020-02-16
|
* Set URL before adding to the documenttoasted-nutbread2020-02-16
|
* Fix missing argumenttoasted-nutbread2020-02-16
|
* Update how popups are createdtoasted-nutbread2020-02-16
|
* Tweak how fullscreen changes are observedtoasted-nutbread2020-02-16
|
* Undo "Obscure the iframe's URL from the host page"toasted-nutbread2020-02-16
| | | | | | There are some additional issues which cause the frame to be reset to about:blank on certain occasions which must be fixed before this can be used.
* Simplify process to wait for iframe prepare completiontoasted-nutbread2020-02-16
|
* Obscure the iframe's URL from the host pagetoasted-nutbread2020-02-15
|
* Merge pull request #357 from siikamiika/simplify-display-preparesiikamiika2020-02-14
|\ | | | | Simplify display prepare