aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed
Commit message (Collapse)AuthorAge
* 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
* CacheMap (#715)toasted-nutbread2020-08-09
| | | | | * Create CacheMap class * Add test
* Persistent display mode (#714)toasted-nutbread2020-08-09
| | | | | | | | | | | | | * Simplify calls using chrome.tabs.sendMessage and getMessageResponseResult * Rename message handlers * Move onMessage handler into Display * Assign search popup mode which persists across refreshes * Update clipboard monitor on the search page * Remove mode param
* 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'
* 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
* Strip request origin (#710)toasted-nutbread2020-08-02
| | | | | | | * Add web request permissions * Create fetch wrapper that anonymizes the request * Fix Firefox not supporting 'extraHeaders' option
* Fix _setContentTermsOrKanjiUpdateAdderButtons not working (#709)toasted-nutbread2020-08-02
| | | | this._setContentToken was cleared, so comparison exited. There is not really a good reason to clear this object.
* Fix fetch requests (#708)toasted-nutbread2020-08-02
| | | | | | | | | | | | | | | | | * Revert audio fetching functionality to use XMLHttpRequest * Replace requestJson * Replace requestJson * Replace requestJson * Replace requestJson and requestText * Fix tests * Include support for vulgar word searches * Remove request.js
* Display try catch refactor (#704)toasted-nutbread2020-08-01
| | | | | | | * Remove try-catch from _termLookup Already handled by _onTermLookup * Move try-catch out of _onTermLookup and into _onGlossaryMouseUp
* More display refactoring (#697)toasted-nutbread2020-08-01
| | | | | | | | | | | | | | | | | | | * Remove some unnecessary _setQuery calls * Add support for forcing the query parser to be visible or hidden * Move _setEventListenersActive calls * Remove URL for kanji links * Refactor _setContentTermsOrKanji * Move search query text assignment into Display * Move title updates into Display * Move popup close calls * Prevent infinite loop of extension unload events
* Dictionary data utility class (#698)toasted-nutbread2020-07-30
| | | | | * Create utility class for helping format dictionary data * Change format
* Standardize hotkey action naming convention (#696)toasted-nutbread2020-07-26
|
* Query parser fix (#695)toasted-nutbread2020-07-26
| | | | | | | | | | | * Standardize setContent calls * Rename _queryText to _fullQuery * Move query parser into Display and update float.html * Generalize params * Add "full" parameter to maintain the original full query
* 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
* 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
* Display fixes and refactoring (#685)toasted-nutbread2020-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | * Fix scroll target override sometimes using undefined value * Clear event listeners in clearContent() * Remove unused arguments * Remove unused disableScroll * Destructure definitions and context * Merge _setContentTerms and _setContentKanji * Move history tracking * Destructure context * Rename context to noteContext for clarity * Destructure before passing args * Move window focus * Update scroll defaults
* Force targetTabId to be null if not a number (#678)toasted-nutbread2020-07-19
|
* Display refactoring (#674)toasted-nutbread2020-07-18
| | | | | | | | | * Move setupNestedPopups to Display * Move auto-play timer and delay into Display * Move some message handler definitions into Display * Move default optionsContext definition
* Reusable backend popup window (#673)toasted-nutbread2020-07-18
| | | | | | | | | | | * Update _updateSearchQuery to return the promise * Update how the clipboard search popup is opened * Create an API function to open the search popup * Skip animation on popup creation * Add API function
* Script ready state change (#672)toasted-nutbread2020-07-18
| | | | | | | * Update how backend/frontend ready states are awaited and signaled * Log errors on the search page * Update action name
* Content script ready checks (#670)toasted-nutbread2020-07-18
| | | | | * Move ready checkout of Display * Add function to wait until if a tab's content script is ready
* Port name details (#667)toasted-nutbread2020-07-18
| | | | | | | | | * Use a stringified JSON details object for extension port names * Fix incorrect frame ID check * Add support for connecting to different tabs * Add function for invoking on a different tab
* 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
* 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
* Refactor hotkey definitions to be more generic (#655)toasted-nutbread2020-07-08
|
* 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
* Display class refactoring (#650)toasted-nutbread2020-07-03
| | | | | | | | | | | | | | | | | | | | | | | * Organize by public/private * Don't access super class's private members * Make _autoPlayAudioTimer private * Refactor constructors * Make functions private * Organize by public/private * Organize window message handlers * Make fields private * Refactor DisplaySearch constructor * Make functions private * Organize by public/private
* Extension unload detection (#647)toasted-nutbread2020-07-03
| | | | | | | * Update how extension unload is detected * Remove event handlers and use yomichan.isExtensionUnloaded instead * Update terminology
* Add up arrow icon (#648)toasted-nutbread2020-07-03
|
* Display refactor (#643)toasted-nutbread2020-07-03
| | | | | | | | | | | | | | | | | | | * Remove statics * Move orphan detection and error handling to Display * Add clearContent function * Add/use public get/set functions for optionsContext * Add public getOptions * Move interactive assignment * Mark fields as private * Mark functions as private * Change stray getter into a function
* Refactor timer privates (#639)toasted-nutbread2020-07-03
| | | | | * Make Timer.current public * Make _indentString non-static
* Util refactor and fix (#638)toasted-nutbread2020-07-03
| | | | | * Remove unused functions * Fix clone function not being visible on the window object
* Fix chrome.runtime.manifest failing when extension is reloaded (#646)toasted-nutbread2020-07-01
|
* Use deferPromise (#630)toasted-nutbread2020-06-28
| | | | | | | * Use deferPromise * Move definition * Implement promiseTimeout using deferPromise
* Update browser compatibility and Edge detection (#629)toasted-nutbread2020-06-28
|
* Clone function (#624)toasted-nutbread2020-06-28
| | | | | | | | | | | * Add clone function * Replace utilIsolate with clone * Replace JsonSchema.isolate with clone function * Include core.js for tests which use json-schema.js * Update visisted set
* Yomichan object separation (#627)toasted-nutbread2020-06-28
| | | | | | | | | | | | | * Move "yomichan" object setup to a separate file * Update script imports * Align message handlers * Rename Yomichan.prepare to Yomichan.ready * Add new prepare function * Improve isExtensionUrl
* Add deferPromise function (#626)toasted-nutbread2020-06-28
|
* Add lock icon (#628)toasted-nutbread2020-06-26
|
* 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
* 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
* Safely handle volume values that are out of range (#617)toasted-nutbread2020-06-21
|
* Replace XMLHttpRequest (#562)toasted-nutbread2020-06-13
| | | | | * Replace XMLHttpRequest with fetch * Implement fetch placeholder for tests
* Handle cases where platform info is not available (#597)toasted-nutbread2020-06-10
| | | | | * Handle cases where platform info is not available * Safely return the correct os property
* 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
* fix css class name (#591)siikamiika2020-06-07
| | | Broken in 90af55d4c84f545635f238178b30748a0e8093ee