aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/display.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/display/display.js')
-rw-r--r--ext/js/display/display.js64
1 files changed, 32 insertions, 32 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js
index 988aa0ae..dc6b4713 100644
--- a/ext/js/display/display.js
+++ b/ext/js/display/display.js
@@ -200,7 +200,7 @@ export class Display extends EventDispatcher {
['profileNext', async () => { await this._setProfile(1); }],
['copyHostSelection', () => this._copyHostSelection()],
['nextEntryDifferentDictionary', () => { this._focusEntryWithDifferentDictionary(1, true); }],
- ['previousEntryDifferentDictionary', () => { this._focusEntryWithDifferentDictionary(-1, true); }]
+ ['previousEntryDifferentDictionary', () => { this._focusEntryWithDifferentDictionary(-1, true); }],
]);
this.registerDirectMessageHandlers([
['displaySetOptionsContext', this._onMessageSetOptionsContext.bind(this)],
@@ -208,10 +208,10 @@ export class Display extends EventDispatcher {
['displaySetCustomCss', this._onMessageSetCustomCss.bind(this)],
['displaySetContentScale', this._onMessageSetContentScale.bind(this)],
['displayConfigure', this._onMessageConfigure.bind(this)],
- ['displayVisibilityChanged', this._onMessageVisibilityChanged.bind(this)]
+ ['displayVisibilityChanged', this._onMessageVisibilityChanged.bind(this)],
]);
this.registerWindowMessageHandlers([
- ['displayExtensionUnloaded', this._onMessageExtensionUnloaded.bind(this)]
+ ['displayExtensionUnloaded', this._onMessageExtensionUnloaded.bind(this)],
]);
/* eslint-enable @stylistic/no-multi-spaces */
}
@@ -325,7 +325,7 @@ export class Display extends EventDispatcher {
this._application.on('extensionUnloaded', this._onExtensionUnloaded.bind(this));
this._application.crossFrame.registerHandlers([
['displayPopupMessage1', this._onDisplayPopupMessage1.bind(this)],
- ['displayPopupMessage2', this._onDisplayPopupMessage2.bind(this)]
+ ['displayPopupMessage2', this._onDisplayPopupMessage2.bind(this)],
]);
window.addEventListener('message', this._onWindowMessage.bind(this), false);
@@ -353,7 +353,7 @@ export class Display extends EventDispatcher {
getContentOrigin() {
return {
tabId: this._contentOriginTabId,
- frameId: this._contentOriginFrameId
+ frameId: this._contentOriginFrameId,
};
}
@@ -441,8 +441,8 @@ export class Display extends EventDispatcher {
layoutAwareScan: scanningOptions.layoutAwareScan,
preventMiddleMouse: scanningOptions.preventMiddleMouse.onSearchQuery,
matchTypePrefix: false,
- sentenceParsingOptions
- }
+ sentenceParsingOptions,
+ },
});
void this._updateNestedFrontend(options);
@@ -553,7 +553,7 @@ export class Display extends EventDispatcher {
optionsContext: void 0,
url: window.location.href,
sentence: {text: query, offset: 0},
- documentTitle: document.title
+ documentTitle: document.title,
}
);
if (!hasState || updateOptionsContext) {
@@ -566,8 +566,8 @@ export class Display extends EventDispatcher {
params: this._createSearchParams(type, query, false, this._queryOffset),
state: newState,
content: {
- contentOrigin: this.getContentOrigin()
- }
+ contentOrigin: this.getContentOrigin(),
+ },
};
this.setContent(details);
}
@@ -656,7 +656,7 @@ export class Display extends EventDispatcher {
},
() => {
reject(new Error(`Invalid action: ${action}`));
- }
+ },
);
});
}
@@ -810,12 +810,12 @@ export class Display extends EventDispatcher {
state: {
sentence,
optionsContext,
- cause: 'queryParser'
+ cause: 'queryParser',
},
content: {
dictionaryEntries,
- contentOrigin: this.getContentOrigin()
- }
+ contentOrigin: this.getContentOrigin(),
+ },
};
this.setContent(details);
}
@@ -832,8 +832,8 @@ export class Display extends EventDispatcher {
params: {type},
state: {},
content: {
- contentOrigin: {tabId, frameId}
- }
+ contentOrigin: {tabId, frameId},
+ },
};
this.setContent(details);
}
@@ -911,12 +911,12 @@ export class Display extends EventDispatcher {
optionsContext,
url,
sentence,
- documentTitle
+ documentTitle,
},
content: {
dictionaryEntries,
- contentOrigin: this.getContentOrigin()
- }
+ contentOrigin: this.getContentOrigin(),
+ },
};
this.setContent(details);
} catch (error) {
@@ -1703,7 +1703,7 @@ export class Display extends EventDispatcher {
const [{PopupFactory}, {Frontend}] = await Promise.all([
import('../app/popup-factory.js'),
- import('../app/frontend.js')
+ import('../app/frontend.js'),
]);
const popupFactory = new PopupFactory(this._application);
@@ -1720,7 +1720,7 @@ export class Display extends EventDispatcher {
allowRootFramePopupProxy: true,
childrenSupported: this._childrenSupported,
hotkeyHandler: this._hotkeyHandler,
- canUseWindowPopup: true
+ canUseWindowPopup: true,
});
this._frontend = frontend;
await frontend.prepare();
@@ -1827,7 +1827,7 @@ export class Display extends EventDispatcher {
searchKanji: false,
searchOnClick: true,
searchOnClickOnly: true,
- textSourceGenerator: this._textSourceGenerator
+ textSourceGenerator: this._textSourceGenerator,
});
this._contentTextScanner.includeSelector = '.click-scannable,.click-scannable *';
this._contentTextScanner.excludeSelector = '.scan-disable,.scan-disable *';
@@ -1857,8 +1857,8 @@ export class Display extends EventDispatcher {
scanOnPenPress: false,
scanOnPenRelease: false,
preventTouchScrolling: false,
- preventPenScrolling: false
- }
+ preventPenScrolling: false,
+ },
}],
deepContentScan: scanningOptions.deepDomScan,
normalizeCssZoom: scanningOptions.normalizeCssZoom,
@@ -1869,7 +1869,7 @@ export class Display extends EventDispatcher {
scanLength: scanningOptions.length,
layoutAwareScan: scanningOptions.layoutAwareScan,
preventMiddleMouse: false,
- sentenceParsingOptions
+ sentenceParsingOptions,
});
this._contentTextScanner.setEnabled(true);
@@ -1894,19 +1894,19 @@ export class Display extends EventDispatcher {
params: {
type,
query,
- wildcards: 'off'
+ wildcards: 'off',
},
state: {
focusEntry: 0,
optionsContext: optionsContext !== null ? optionsContext : void 0,
url,
sentence: sentence !== null ? sentence : void 0,
- documentTitle
+ documentTitle,
},
content: {
dictionaryEntries: dictionaryEntries !== null ? dictionaryEntries : void 0,
- contentOrigin: this.getContentOrigin()
- }
+ contentOrigin: this.getContentOrigin(),
+ },
};
/** @type {TextScanner} */ (this._contentTextScanner).clearSelection();
this.setContent(details);
@@ -1928,8 +1928,8 @@ export class Display extends EventDispatcher {
return {
optionsContext: this.getOptionsContext(),
detail: {
- documentTitle: document.title
- }
+ documentTitle: document.title,
+ },
};
}
@@ -2014,7 +2014,7 @@ export class Display extends EventDispatcher {
path: 'profileCurrent',
value: newProfile,
scope: 'global',
- optionsContext: null
+ optionsContext: null,
};
await this.application.api.modifySettings([modification], 'search');
}