diff options
-rw-r--r-- | addon/background.js | 3 | ||||
-rw-r--r-- | src/Layout.mjs | 2 | ||||
-rw-r--r-- | src/editor.mjs | 9 |
3 files changed, 1 insertions, 13 deletions
diff --git a/addon/background.js b/addon/background.js index 42e0c8d..6c007e5 100644 --- a/addon/background.js +++ b/addon/background.js | |||
@@ -1,12 +1,9 @@ | |||
1 | console.log('background') | ||
2 | |||
3 | browser.contextMenus.create( | 1 | browser.contextMenus.create( |
4 | { | 2 | { |
5 | id: 'map-inline-add', | 3 | id: 'map-inline-add', |
6 | title: 'Add Links and Maps by content', | 4 | title: 'Add Links and Maps by content', |
7 | contexts: ['page'], | 5 | contexts: ['page'], |
8 | }, | 6 | }, |
9 | () => void browser.runtime.lastError, | ||
10 | ) | 7 | ) |
11 | 8 | ||
12 | browser.contextMenus.create( | 9 | browser.contextMenus.create( |
diff --git a/src/Layout.mjs b/src/Layout.mjs index 8c6a8ea..c24a2bc 100644 --- a/src/Layout.mjs +++ b/src/Layout.mjs | |||
@@ -263,7 +263,7 @@ export class Overlay extends Layout { | |||
263 | * @param {HTMLElement} htmlHolder | 263 | * @param {HTMLElement} htmlHolder |
264 | * @param {HTMLElement[]} blocks | 264 | * @param {HTMLElement[]} blocks |
265 | */ | 265 | */ |
266 | leaveHandler = ({ htmlHolder, blocks }) => { | 266 | leaveHandler = ({ blocks }) => { |
267 | const resumeFromDraggable = block => { | 267 | const resumeFromDraggable = block => { |
268 | const draggableContainer = block.closest('.draggable-block') | 268 | const draggableContainer = block.closest('.draggable-block') |
269 | if (!draggableContainer) return | 269 | if (!draggableContainer) return |
diff --git a/src/editor.mjs b/src/editor.mjs index 3f8f27d..f3b812a 100644 --- a/src/editor.mjs +++ b/src/editor.mjs | |||
@@ -49,15 +49,6 @@ const refLinkPattern = /\[([^\x5B\x5D]+)\]:\s+(\S+)(\s["'](\S+)["'])?/ | |||
49 | let refLinks = [] | 49 | let refLinks = [] |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * Validates if the given anchor name is unique | ||
53 | * | ||
54 | * @param {string} anchorName - The anchor name to validate | ||
55 | * @returns {boolean} True if the anchor name is unique, false otherwise | ||
56 | */ | ||
57 | const validateAnchorName = anchorName => | ||
58 | !refLinks.find(obj => obj.ref.toLowerCase() === anchorName.toLowerCase()) | ||
59 | |||
60 | /** | ||
61 | * Appends a reference link to the CodeMirror instance | 52 | * Appends a reference link to the CodeMirror instance |
62 | * | 53 | * |
63 | * @param {CodeMirror} cm - The CodeMirror instance | 54 | * @param {CodeMirror} cm - The CodeMirror instance |