mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-10 03:03:08 -08:00
Do some content type jiggling with TiddlyWeb
To be fixed up later
This commit is contained in:
parent
b962739f04
commit
951c53c982
1 changed files with 7 additions and 0 deletions
|
|
@ -202,6 +202,7 @@ Convert a TiddlyWeb JSON tiddler into a TiddlyWiki5 tiddler
|
|||
*/
|
||||
TiddlyWebSyncer.prototype.convertTiddler = function(tiddlerFields) {
|
||||
var result = {};
|
||||
// Transfer the fields, pulling down the `fields` hashmap
|
||||
for(var f in tiddlerFields) {
|
||||
switch(f) {
|
||||
case "fields":
|
||||
|
|
@ -214,6 +215,12 @@ TiddlyWebSyncer.prototype.convertTiddler = function(tiddlerFields) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
// Some unholy freaking of content types
|
||||
if(result.type === "text/javascript") {
|
||||
result.type = "application/javascript";
|
||||
} else if(!result.type || result.type === "None") {
|
||||
result.type = "text/x-tiddlywiki-old";
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue