mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
Remove plugin
field now that we've got the plugin-type
field
I've been meaning to remove the `plugin` field for ages.
This commit is contained in:
parent
ea1855d872
commit
d6ec1ea1e5
@ -741,7 +741,7 @@ $tw.Wiki.prototype.registerPluginTiddlers = function(pluginType,titles) {
|
|||||||
registeredTitles = [];
|
registeredTitles = [];
|
||||||
// Go through the provided titles, or the entire tiddler list, looking for plugins of this type
|
// Go through the provided titles, or the entire tiddler list, looking for plugins of this type
|
||||||
var checkTiddler = function(tiddler) {
|
var checkTiddler = function(tiddler) {
|
||||||
if(tiddler && tiddler.fields.type === "application/json" && tiddler.hasField("plugin") && tiddler.fields["plugin-type"] === pluginType) {
|
if(tiddler && tiddler.fields.type === "application/json" && tiddler.fields["plugin-type"] === pluginType) {
|
||||||
self.plugins.push(tiddler);
|
self.plugins.push(tiddler);
|
||||||
registeredTitles.push(tiddler.fields.title);
|
registeredTitles.push(tiddler.fields.title);
|
||||||
}
|
}
|
||||||
@ -1173,7 +1173,6 @@ $tw.loadPluginFolder = function(filepath,excludeRegExp) {
|
|||||||
var fields = {
|
var fields = {
|
||||||
title: pluginInfo.title,
|
title: pluginInfo.title,
|
||||||
type: "application/json",
|
type: "application/json",
|
||||||
plugin: "yes",
|
|
||||||
text: JSON.stringify(pluginInfo,null,4),
|
text: JSON.stringify(pluginInfo,null,4),
|
||||||
"plugin-priority": pluginInfo["plugin-priority"],
|
"plugin-priority": pluginInfo["plugin-priority"],
|
||||||
"name": pluginInfo["name"],
|
"name": pluginInfo["name"],
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
title: $:/docs/fields/plugin
|
|
||||||
|
|
||||||
Set to "yes" to indicate that a tiddler is a plugin
|
|
@ -17,7 +17,7 @@ exports.hasTag = function(tag) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.isPlugin = function() {
|
exports.isPlugin = function() {
|
||||||
return this.fields.type === "application/json" && this.hasField("plugin") && this.hasField("plugin-type");
|
return this.fields.type === "application/json" && this.hasField("plugin-type");
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.getFieldString = function(field) {
|
exports.getFieldString = function(field) {
|
||||||
|
@ -21,7 +21,6 @@ Other fields used by the core are:
|
|||||||
* `footer` - The footer for a modal dialogue (interpreted as WikiText)
|
* `footer` - The footer for a modal dialogue (interpreted as WikiText)
|
||||||
* `library` - Set to `yes` if the tiddler should be loaded in the browser as a `<script>` tag
|
* `library` - Set to `yes` if the tiddler should be loaded in the browser as a `<script>` tag
|
||||||
* `name` - Human-readable name of a plugin
|
* `name` - Human-readable name of a plugin
|
||||||
* `plugin` - Set to `yes` if the tiddler is a plugin
|
|
||||||
* `plugin-priority` - An integer giving the priority for loading plugin tiddlers
|
* `plugin-priority` - An integer giving the priority for loading plugin tiddlers
|
||||||
* `plugin-type` - The type of a plugin (currently can be `plugin` or `theme`)
|
* `plugin-type` - The type of a plugin (currently can be `plugin` or `theme`)
|
||||||
* `source` - The original URL associated with a tiddler
|
* `source` - The original URL associated with a tiddler
|
||||||
|
Loading…
Reference in New Issue
Block a user