mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-19 18:59:42 +00:00
36 lines
782 B
JavaScript
36 lines
782 B
JavaScript
|
/*\
|
||
|
title: $:/core/modules/filters/getstoryviewsingletiddlermode.js
|
||
|
type: application/javascript
|
||
|
module-type: filteroperator
|
||
|
|
||
|
Filter operator for retrieving the single tiddler mode status of a storyview.
|
||
|
|
||
|
\*/
|
||
|
(function(){
|
||
|
|
||
|
/*jslint node: true, browser: true */
|
||
|
/*global $tw: false */
|
||
|
"use strict";
|
||
|
|
||
|
/*
|
||
|
Export our filter functions
|
||
|
*/
|
||
|
|
||
|
exports.getstoryviewsingletiddlermode = function(source,operator,options) {
|
||
|
// Initialise the storyviews if they've not been done already
|
||
|
var storyviews = {};
|
||
|
$tw.modules.applyMethods("storyview",storyviews);
|
||
|
var results = [];
|
||
|
source(function(tiddler,title) {
|
||
|
var storyview = storyviews[title];
|
||
|
if(storyview && storyview.singleTiddlerMode) {
|
||
|
results.push("yes");
|
||
|
} else {
|
||
|
results.push("no");
|
||
|
}
|
||
|
});
|
||
|
return results;
|
||
|
};
|
||
|
|
||
|
})();
|