mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-12 17:11:55 +00:00
add parent-ancestorcount-dom macro
This commit is contained in:
parent
1a5c05d2a9
commit
1a4c114ecb
26
core/modules/macros/parent-ancestorcount-dom.js
Normal file
26
core/modules/macros/parent-ancestorcount-dom.js
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*\
|
||||||
|
title: $:/core/modules/macros/parent-ancestorcount-dom.js
|
||||||
|
type: application/javascript
|
||||||
|
module-type: macro
|
||||||
|
|
||||||
|
Macro to return the parent widget this.ancestors variable
|
||||||
|
|
||||||
|
\*/
|
||||||
|
/*jslint node: true, browser: true */
|
||||||
|
/*global $tw: false */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Information about this macro
|
||||||
|
*/
|
||||||
|
|
||||||
|
exports.name = "parent-ancestorcount-dom";
|
||||||
|
|
||||||
|
exports.params = [];
|
||||||
|
|
||||||
|
/*
|
||||||
|
Run the macro
|
||||||
|
*/
|
||||||
|
exports.run = function() {
|
||||||
|
return (this.parentWidget) ? this.parentWidget.getAncestorCountDom() + "" : "";
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user