summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
Commit message (Collapse)AuthorAge
* Improve popup window ownership (#1364)toasted-nutbread2021-02-09
| | | | | | | | | | | | | | | | | * Update frameInformationGet to also return the tab ID * Add tabId to Frontend * Pass tabId/frameId to Display * Pass ownership information using setContent * Remove ownerFrameId for Popup classes * Use frameId instead of ownerFrameId for screenshotting * Use contentOrigin instead of owner * Update _invokeContentOrigin implementation
* Fix the settings page trying to create a popup window (#1341)toasted-nutbread2021-01-31
|
* Various firefox fixes (#1306)toasted-nutbread2021-01-24
| | | | | * Fix for chrome.commands not being present on Firefox's embedded float.html * Fix _getSearchContext mishandling _optionsContextOverride
* Add support for frontend hotkeys; add scanSelectedText action (#1266)toasted-nutbread2021-01-17
| | | | | | | * Add support for frontend hotkeys; add scanSelectedText action * Remove unused global * Remove duplicate hotkey handler script
* Text scanner improvements (#1261)toasted-nutbread2021-01-17
| | | | | | | | | | | | | | | | | * Add support for allowing TextScanner.search to force focus * Simplify query parser searched event forwarding * Defer fallback creation * Simplify event listeners * Change type to pointerType * Change cause to eventType * Change empty to passive; make .search function passive * Remove unused input index
* Refactor note document title (#1227)toasted-nutbread2021-01-12
| | | | | | | | | | | | | * Pass url into setContent * Update where url is checked from * Add documentTitle to state information * Update how _getNoteContext gets the document title * Update how url is fetched for options context * Pass document title in to 'searched' event
* Refactor text scanner options context generation (#1225)toasted-nutbread2021-01-11
| | | | | * Refactor how options context is created and updated * Udpate TextScanner/QueryParser to use getSearchContext instead of getOptionsContext
* Customizable sentence parsing (#1217)toasted-nutbread2021-01-10
| | | | | | | | | | | | | | | * Add new sentenceParsing options * Update TextScanner.setOptions * Assign terminator/quote maps * Pass sentence parsing info to extractSentence * Simplify setting * Add setting for enableTerminationCharacters * Create new settings for sentence termination characters
* Refactor sentence parsing (#1215)toasted-nutbread2021-01-09
| | | | | | | | | | | | | * Rename sentenceExtent with sentenceScanExtent * Update TextScanner.setOptions * Change function argument order * Rename quote map variables * Fix edge case quote handling * Update terminator maps to support character inclusion
* Sentence parsing options (#1214)toasted-nutbread2021-01-09
| | | | | | | * Rename options.anki.sentenceExt to options.sentenceParsing.scanExtent * Create sentence parsing icon * Create new sentence parsing section
* Update copyright year (#1194)toasted-nutbread2021-01-01
| | | | | * Update copyright year * Remove redundant Author info
* Display profile panel (#1178)toasted-nutbread2020-12-29
| | | | | | | | | | | * Expose Display.displayGenerator * Update search when assigning options context * Don't clear selection unless the popup changes * Merge search styles * Create panel for changing the profile
* Support frame resize on firefox (#1088)toasted-nutbread2020-12-08
| | | | | | | | | | | | | * Add popup functions for getting/setting the frame size * Add frontend functions for getting/setting popup frame size * Expose display mode attribute on display HTML * Disable resizer on iframe * Add custom frame resizer handle * Add support for custom frame resizer
* Text scanner improvements (#1056)toasted-nutbread2020-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Only ignore nodes on non-web pages * Fix issue where options might not be assigned on nested frontends * Refactor default TextScanner options * Add option to enable search only on click * Simplify restore state assignment * Update options context passing * Fix empty title * Use TextScanner to scan content inside of Display * Rename ignoreNodes to excludeSelector(s) * Fix options update incorrectly triggering a re-search * Fix copy throwing an error on the search page * Replace _onSearchQueryUpdated with _search * Use include selector instead of exclude selector
* Popup setup refactoring (#1054)toasted-nutbread2020-11-23
| | | | | | | | | | | | | * Pass childrenSupported as a parameter to Frontend/Popup constructors * Remove setChildrenSupported * Use event listener instead of function override * Update options order * Expand options and use object for clarity * Fix childrenSupported not being fully propagated
* Refactor nested popup/frontend setup (#1052)toasted-nutbread2020-11-22
|
* Display fixes (#1033)toasted-nutbread2020-11-14
| | | | | | | * Fix an entry not always being focused * Fix typo * Fix copy action not working on Firefox
* Text scanning options propagation (#1020)toasted-nutbread2020-11-12
| | | | | | | | | | | | | | | | | * Update Display.setOptionsContext to update options * Update how options context is updated in Popup * Omit optionsContext for some _showPopupContent calls * Remove extension unload * Disable modifier keys in frontend's options context * Update how text scanner passes modifiers to options context * Update how options context is passed to display * Update how display uses options context
* Options context updates (#1017)toasted-nutbread2020-11-08
| | | | | | | | | | | | | | | * Update event order * Update inputs * Add type and cause to input info * Update input info args * Simplify arguments * Update argument name * Change order
* Frontend options override refactor (#1016)toasted-nutbread2020-11-08
| | | | | * Update how options context overriding works * Make function private
* Update keyboard/mouse modifiers to return an array rather than a set (#1015)toasted-nutbread2020-11-08
|
* Popup preview improvements (#947)toasted-nutbread2020-10-20
| | | | | | | | | | | | | * Move CSS * Update indent * Refactor HTML/CSS * Add support for editing the source text * Add WanaKana binding for input * Rename file
* Fix search page being focused when changing settings (#892)toasted-nutbread2020-10-06
|
* Add middle mouse prevention option (#868)toasted-nutbread2020-09-26
| | | | | | | | | * Add preventMiddleMouse option to TextScanner * Add preventMiddleMouse options * Add options * Apply preventMiddleMouse options
* Fix page type never being detected as search page correctly (#867)toasted-nutbread2020-09-26
|
* Add missing null check (#836)toasted-nutbread2020-09-17
|
* Pointer events support (#819)toasted-nutbread2020-09-13
| | | | | | | | | | | | | * Add option pointerEventsEnabled * Add _pointerEventsEnabled option to TextScanner * Add additional options * Mouse pointer events * Touch pointer events * Pen pointer events
* Text scanner cause update (#813)toasted-nutbread2020-09-11
| | | | | * Rename _searchAtFromMouse to _searchAtFromMouseMove * Rename cause 'mouse' to 'mouseMove' for clarity
* Scanning input generalization (#789)toasted-nutbread2020-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | * Add inputs to options.scanning * Update CSS for mouse buttons * Update list counters * Set up HTML/CSS * Add input controller * Use new inputs * Include mouse buttons * Update how button inputs are detected * Add index/empty fields to the input details object * Update none check for scanning modifier * Remove old settings * Remove unused global
* Anki screenshot refactor (#791)toasted-nutbread2020-09-09
| | | | | | | * Use more consistent style for injectScreenshot * Move screenshot generation into AnkiNoteBuilder/Backend * Get optionsContext before await
* Delay hide option (#774)toasted-nutbread2020-09-08
| | | | | | | | | | | * Add hideDelay option * Add _clearSelection * Use hideDelay * Prevent repeated delayed selection clears * Fix popup hide timer being cleared when the cursor is moved into the frame
* Text scanner fixes and refactoring (#788)toasted-nutbread2020-09-08
| | | | | | | * Fix incorrect argument being passed * Clear causeCurrent * Change cause string to a more general input object
* Refactor how TextScanner's public search() function is used (#787)toasted-nutbread2020-09-08
|
* Popup window (#773)toasted-nutbread2020-09-05
| | | | | | | * Add option usePopupWindow * Add PopupWindow class * Add support for creating PopupWindow
* Text scanner refactor (#771)toasted-nutbread2020-09-05
| | | | | | | | | | | | | | | | | * Create searchAt wrappers * Add optional support for searching on the click event * Update QueryParser to use TextScanner's searchOnClick functionality * Move/rename searchAt * Move pendingLookup checks * Add 'searched' event to TextScanner * Use common searched event for Frontend and QueryParser * Move functions, make private
* Handle error if _waitForFrontendReady fails when creating a popup proxy (#760)toasted-nutbread2020-09-04
|
* 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
* Move generateId to core.js (#748)toasted-nutbread2020-08-22
|
* Move findTerms and findKanji functions into TextScanner (#747)toasted-nutbread2020-08-22
|
* 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
* XMLDocument handling (#738)toasted-nutbread2020-08-22
| | | | | | | * Add tests for SVGs * Add more null checks for Frontend._popup * Use null popup when on an XMLDocument
* Frontend initialization refactor (#737)toasted-nutbread2020-08-16
| | | | | | | | | | | | | * Fix incorrect popup depth reassignment * Rename variable * Rename property * Use explicit parameter values * Refactor setupNestedPopups * Refactor frontend initialization
* Refactor some frontend cross-frame communication (#733)toasted-nutbread2020-08-15
| | | | | * Refactor iframe proxy setup * Simplify document title acquisition
* 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
* DOM + DocumentUtil merge (#727)toasted-nutbread2020-08-09
| | | | | | | | | * Add DOM functions to DocumentUtil * Use DocumentUtil instead of DOM * Remove DOM * Move document-util.js into mixed
* document.js refactor (#719)toasted-nutbread2020-08-09
| | | | | | | | | | | | | | | | | | | * Refactor document.js into a class * Move public functions first * Rename private functions * Rename * Rename argument * Use instance of DocumentUtil * Update tests * Refactor * Rename (test-)document.js to (test-)document-util.js
* Query parser text scanner options refactor (#717)toasted-nutbread2020-08-09
| | | | | | | * Add _setSelectedParser helper * Update TextScanner internal options representation * Update QueryParser internal options representation
* Button and image scanning (#705)toasted-nutbread2020-08-02
| | | | | | | * Update TextSourceElement.equals check to match TextSourceRange.equals * Force full query to be visible when scanning buttons or images with more text * Update style of query parser
* Display scroll refactor (#694)toasted-nutbread2020-07-26
| | | | | | | | | * Cache navigation header * Create _focusEntry * Update scroll restoration * Require explicit entry focus index
* Display history refactor (#691)toasted-nutbread2020-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create DisplayHistory * Change arguments for _setContentTermsOrKanji * Set up history-driven content updates * Use new history only * Load definitions if missing * Refactor definitions getting * Add support for wildcards * Move definitions setup * Add events * Allow state change even if there is no history state * Update search page to use history * Fix history overwriting * Fix search page not seeing state chang events during prepare * Update state if necessary * Don't reassign query text if the same * Remove DisplayContext * Initialize with real history state * Track URL * Update DisplayHistory to support pseudo-history * Configure history settings on search page * Fix state * Use full URL * Change data format of setContent * Rename details to content * Update event arguments * Fix animation * Remove old state changes * Clear content properly * Remove set/clear content overrides * Fix setting up event listeners for content clear * Make clearContent private * Make focus opt-in * Validate source * Add unloaded type * Generalize content params * Update how extension unload content is assigned * Restore query blurring