mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-29 03:20:27 +00:00
Do some content type jiggling with TiddlyWeb
To be fixed up later
This commit is contained in:
parent
b962739f04
commit
951c53c982
@ -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…
Reference in New Issue
Block a user