mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 20:29:10 +00:00
Add a changecount macro
This commit is contained in:
parent
b3ae45cbde
commit
bdcead624a
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…
Reference in New Issue
Block a user