mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-24 20:27:38 +00:00
New implementation for shadow tiddlers
Now shadow tiddlers are any tiddler whose title starts with "$:/"
This commit is contained in:
@@ -20,6 +20,17 @@ exports.hasField = function(field) {
|
||||
return $tw.utils.hop(this.fields,field);
|
||||
};
|
||||
|
||||
exports.isShadow = function() {
|
||||
if(!$tw.utils.hop(this,"shadowFlag")) {
|
||||
this.shadowFlag = this.fields.title.indexOf("$:/") === 0;
|
||||
}
|
||||
return this.shadowFlag;
|
||||
};
|
||||
|
||||
exports.isTemporary = function() {
|
||||
return this.fields.title.indexOf("$:/temp/") === 0;
|
||||
};
|
||||
|
||||
exports.getFieldString = function(field) {
|
||||
var value = this.fields[field];
|
||||
// Check for a missing field
|
||||
|
||||
Reference in New Issue
Block a user