-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
d5018e3
commit fdc092b
Showing
11 changed files
with
161 additions
and
22 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 +1 @@ | ||
const appversion = "1.7.6"; | ||
const appversion = "1.8.0"; |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
const extensionId = "opgfklgemimfakkhhenkjpebopabfjjd"; | ||
|
||
// Release | ||
const writefullUrl = "https://storage.googleapis.com/writefull-cdn/writefull.js"; | ||
|
||
let isRunning = false; | ||
document.addEventListener("readystatechange", (event) => { | ||
isRunning = true; | ||
console.log("Writefull"); | ||
|
||
if ( | ||
document.readyState === "interactive" || | ||
(document.readyState === "complete" && !window._writefull && !isRunning) | ||
) { | ||
console.log("Writefull readystatechange"); | ||
const scriptCM6 = document.createElement("script"); | ||
scriptCM6.type = "text/javascript"; | ||
scriptCM6.innerHTML = ` | ||
window.addEventListener('UNSTABLE_editor:extensions', (event) => { | ||
if (event.detail) { | ||
const { CodeMirror, extensions } = event.detail; | ||
window._writefull = { | ||
...CodeMirror, | ||
extensions | ||
} | ||
} | ||
if (window.w$) { | ||
w$.reloadEditor(); | ||
} | ||
}); | ||
window.addEventListener('editor:extensions', (event) => { | ||
if (event.detail) { | ||
const { CodeMirror, extensions } = event.detail; | ||
window._writefull = { | ||
...CodeMirror, | ||
extensions | ||
} | ||
} | ||
if (window.w$) { | ||
w$.reloadEditor(); | ||
} | ||
}); | ||
`; | ||
document.body.append(scriptCM6); | ||
setTimeout(() => { | ||
scriptCM6.remove(); | ||
}, 0); | ||
isRunning = false; | ||
} | ||
}); | ||
|
||
const load = function () { | ||
setTimeout(function () { | ||
const script = document.createElement("script"); | ||
script.src = `${writefullUrl}?ts=${+new Date()}`; | ||
console.log(script.src); | ||
script.type = "text/javascript"; | ||
document.body.append(script); | ||
console.log("Writefull appended!"); | ||
console.log(document.body); | ||
setTimeout(() => { | ||
script.remove(); | ||
}, 0); | ||
}, 1000); | ||
}; | ||
window.addEventListener("load", load); |
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
Large diffs are not rendered by default.
Oops, something went wrong.