mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
fix image urls, fix context menu
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
// @electron/remote shim
|
||||
// Returned when Obsidian calls: window.require('@electron/remote')
|
||||
|
||||
import { clipboardShim } from './clipboard.js';
|
||||
import { shellShim } from './shell.js';
|
||||
import { dialogShim } from './dialog.js';
|
||||
import { menuShim, menuItemShim } from './menu.js';
|
||||
import { appShim } from './app.js';
|
||||
import { windowShim, webContentsShim } from './window.js';
|
||||
import { themeShim } from './theme.js';
|
||||
import { sessionShim } from './session.js';
|
||||
import { systemPreferencesShim } from './system-preferences.js';
|
||||
import { screenShim } from './screen.js';
|
||||
import { nativeImageShim } from './native-image.js';
|
||||
import { notificationShim } from './notification.js';
|
||||
import { clipboardShim } from "./clipboard.js";
|
||||
import { shellShim } from "./shell.js";
|
||||
import { dialogShim } from "./dialog.js";
|
||||
import { menuShim, menuItemShim } from "./menu.js";
|
||||
import { appShim } from "./app.js";
|
||||
import { windowShim, webContentsShim } from "./window.js";
|
||||
import { themeShim } from "./theme.js";
|
||||
import { sessionShim } from "./session.js";
|
||||
import { systemPreferencesShim } from "./system-preferences.js";
|
||||
import { screenShim } from "./screen.js";
|
||||
import { nativeImageShim } from "./native-image.js";
|
||||
import { notificationShim } from "./notification.js";
|
||||
|
||||
export const remoteShim = {
|
||||
clipboard: clipboardShim,
|
||||
@@ -33,6 +33,8 @@ export const remoteShim = {
|
||||
return windowShim._current();
|
||||
},
|
||||
|
||||
webContents: webContentsShim,
|
||||
|
||||
getCurrentWebContents() {
|
||||
return webContentsShim._current();
|
||||
},
|
||||
|
||||
@@ -135,6 +135,7 @@ const currentWindow = {
|
||||
};
|
||||
|
||||
const currentWebContents = {
|
||||
id: 1,
|
||||
_zoomLevel: 0,
|
||||
|
||||
get zoomLevel() {
|
||||
@@ -182,7 +183,25 @@ const currentWebContents = {
|
||||
|
||||
undo() {},
|
||||
redo() {},
|
||||
pasteAndMatchStyle() {},
|
||||
cut() {
|
||||
document.execCommand("cut");
|
||||
},
|
||||
copy() {
|
||||
document.execCommand("copy");
|
||||
},
|
||||
paste() {
|
||||
document.execCommand("paste");
|
||||
},
|
||||
pasteAndMatchStyle() {
|
||||
document.execCommand("paste");
|
||||
},
|
||||
replaceMisspelling(word) {},
|
||||
|
||||
session: {
|
||||
availableSpellCheckerLanguages: [],
|
||||
setSpellCheckerLanguages(langs) {},
|
||||
addWordToSpellCheckerDictionary(word) {},
|
||||
},
|
||||
|
||||
setSpellCheckerLanguages(langs) {},
|
||||
|
||||
@@ -212,4 +231,7 @@ export const windowShim = {
|
||||
|
||||
export const webContentsShim = {
|
||||
_current: () => currentWebContents,
|
||||
fromId(id) {
|
||||
return id === currentWebContents.id ? currentWebContents : null;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user