-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
216e014
commit 771838e
Showing
21 changed files
with
55 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "miniated", | ||
"private": true, | ||
"author": "Savin Angel-Mario ([email protected])", | ||
"version": "1.1.4", | ||
"version": "1.2.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
|
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
import { convertToMarkdown } from "./lib/languages/markdown"; | ||
|
||
const origin = window.location.origin; | ||
const mainWrapper = document.querySelector("main")!; | ||
const origin = window.location.origin; | ||
let currentEditorValue = ""; | ||
|
||
window.addEventListener("message", async (ev) => { | ||
|
||
window.addEventListener("message", async ev => { | ||
if (ev.origin !== origin) return; | ||
if (ev.data === currentEditorValue) return; | ||
|
||
currentEditorValue = ev.data; | ||
const markdown = await convertToMarkdown(ev.data); | ||
|
||
mainWrapper.innerHTML = markdown; | ||
const markdown = await convertToMarkdown(ev.data); | ||
mainWrapper.innerHTML = markdown; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters