mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
Enable appcache, remove boilerplate css from raw html content.
This commit is contained in:
parent
e7fd6b75ab
commit
175ab3dcbf
4 changed files with 11 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
|
||||
*.log
|
||||
*.DS_Store
|
||||
|
|
|
|||
11
edit.js
11
edit.js
|
|
@ -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
|
|
@ -1,4 +1,5 @@
|
|||
CACHE MANIFEST
|
||||
|
||||
CACHE:
|
||||
/
|
||||
/
|
||||
|
||||
Loading…
Reference in a new issue