Remove unused functions from backend.js (#1014)
This commit is contained in:
parent
6232e3efc2
commit
681065e554
@ -1255,11 +1255,6 @@ class Backend {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_getTemplates(options) {
|
|
||||||
const templates = options.anki.fieldTemplates;
|
|
||||||
return typeof templates === 'string' ? templates : this._defaultAnkiFieldTemplates;
|
|
||||||
}
|
|
||||||
|
|
||||||
async _getTabUrl(tabId) {
|
async _getTabUrl(tabId) {
|
||||||
try {
|
try {
|
||||||
const {url} = await this._sendMessageTabPromise(
|
const {url} = await this._sendMessageTabPromise(
|
||||||
@ -1462,23 +1457,6 @@ class Backend {
|
|||||||
return isValidTab ? tab : null;
|
return isValidTab ? tab : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
_environmentHasDocument() {
|
|
||||||
return (typeof document === 'object' && document !== null);
|
|
||||||
}
|
|
||||||
|
|
||||||
_executePasteCommand() {
|
|
||||||
document.execCommand('paste');
|
|
||||||
}
|
|
||||||
|
|
||||||
_readFileAsDataURL(file) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const reader = new FileReader();
|
|
||||||
reader.onload = () => resolve(reader.result);
|
|
||||||
reader.onerror = () => reject(reader.error);
|
|
||||||
reader.readAsDataURL(file);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async _getScreenshot(windowId, tabId, ownerFrameId, format, quality) {
|
async _getScreenshot(windowId, tabId, ownerFrameId, format, quality) {
|
||||||
if (typeof windowId !== 'number') {
|
if (typeof windowId !== 'number') {
|
||||||
throw new Error('Invalid window ID');
|
throw new Error('Invalid window ID');
|
||||||
|
Loading…
Reference in New Issue
Block a user