Enable appcache, remove boilerplate css from raw html content.

This commit is contained in:
Nicholas Jitkoff 2018-07-05 20:29:58 -07:00
parent e7fd6b75ab
commit 175ab3dcbf
4 changed files with 11 additions and 6 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
*.log
*.DS_Store

11
edit.js
View file

@ -160,17 +160,20 @@ function handleInput(e) {
var text = content.innerText;
var title = QS("#doc-title").innerText;
var strip = false;
if (text.indexOf("</") > 0) {
var rawHTML = (text.indexOf("</") > 0);
if (rawHTML) {
text = text.replace(/[\n|\t]+/g,' ').replace(/> +</g, '> <')
} else {
text = content.innerHTML
strip = true
}
if (text.trim().length) {
stringToZip(text, function(zip) {
updateLink("?" + zip, title)
if (rawHTML) {
updateLink(DATA_PREFIX_BXZE + zip, title)
} else {
updateLink("?" + zip, title)
}
});
setFileName("")
} else if (importedFileData) {

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,5 @@
CACHE MANIFEST
CACHE:
/
/