mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-04-23 22:03:19 -07:00
Add a changecount macro
This commit is contained in:
parent
b3ae45cbde
commit
bdcead624a
1 changed files with 30 additions and 0 deletions
30
core/modules/macros/changecount.js
Normal file
30
core/modules/macros/changecount.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*\
|
||||
title: $:/core/modules/macros/changecount.js
|
||||
type: application/javascript
|
||||
module-type: macro
|
||||
|
||||
Macro to return the changecount for the current tiddler
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Information about this macro
|
||||
*/
|
||||
|
||||
exports.name = "changecount";
|
||||
|
||||
exports.params = [];
|
||||
|
||||
/*
|
||||
Run the macro
|
||||
*/
|
||||
exports.run = function() {
|
||||
return this.wiki.getChangeCount(this.getVariable("tiddlerTitle")) + "";
|
||||
};
|
||||
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue