1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-10-30 06:36:17 +00:00
TiddlyWiki5/core/modules/widgets/version.js

35 lines
624 B
JavaScript
Raw Normal View History

2013-01-03 22:55:23 +00:00
/*\
title: $:/core/modules/widgets/version.js
2013-01-03 22:55:23 +00:00
type: application/javascript
module-type: widget
Implements the version widget.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var VersionWidget = function(renderer) {
// Save state
this.renderer = renderer;
// Generate child nodes
this.generate();
};
VersionWidget.prototype.generate = function() {
// Set the element
this.tag = "span";
this.attributes = {};
this.children = this.renderer.renderTree.createRenderers(this.renderer,[{
2013-01-03 22:55:23 +00:00
type: "text",
text: $tw.version
}]);
};
exports.version = VersionWidget;
})();