mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Added hasTag() method to wiki store
This commit is contained in:
parent
6d727437e7
commit
e9d3a878c1
@ -59,6 +59,17 @@ var Tiddler = function(/* tiddler,fields */) {
|
||||
}
|
||||
};
|
||||
|
||||
Tiddler.prototype.hasTag = function(tag) {
|
||||
if(this.tags) {
|
||||
for(var t=0; t<this.tags.length; t++) {
|
||||
if(this.tags[t] === tag) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
Tiddler.prototype.parseTiddlerField = function(name,value) {
|
||||
var type = Tiddler.specialTiddlerFields[name];
|
||||
if(type) {
|
||||
|
Loading…
Reference in New Issue
Block a user