diff --git a/src/commands/ReplaceImage.js b/src/commands/ReplaceImage.js index c5067b5..bd976a0 100644 --- a/src/commands/ReplaceImage.js +++ b/src/commands/ReplaceImage.js @@ -35,8 +35,6 @@ class ReplaceImage extends Command { search = parameters[0] } - console.log(search, replace, withRatio) - this.search = search this.replace = replace this.withRatio = withRatio === '1' || withRatio === 'true' diff --git a/src/models/Monkey.js b/src/models/Monkey.js index 47f4c1e..bef6287 100644 --- a/src/models/Monkey.js +++ b/src/models/Monkey.js @@ -228,10 +228,12 @@ class Monkey { configuration.apply(pseudoNode, 'value', 'text') if (node.dataset.fullString !== pseudoNode.value) { const original = node.textContent + const originalFullString = node.dataset.fullString const replacement = original.length < pseudoNode.value.length ? '...' + pseudoNode.value.substring(pseudoNode.value.length - original.length - 3) : pseudoNode.value node.dataset.fullString = pseudoNode.value node.textContent = replacement undos.push(new UndoElement(node, 'textContent', original, node.textContent)) + undos.push(new UndoElement(node.dataset, 'fullString', originalFullString, node.dataset.fullString)) } }) this.addUndo(undos)