mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-18 19:59:25 +00:00
![Jermolene](/assets/img/avatar_default.png)
There are still some warnings about making functions in a loop, but I’ll fix those as a separate pull request because the fixes are more than typographic errors.
31 lines
576 B
JavaScript
31 lines
576 B
JavaScript
/*\
|
|
title: $:/core/modules/filters/shadowsource.js
|
|
type: application/javascript
|
|
module-type: filteroperator
|
|
|
|
Filter operator for returning the source plugins for shadow tiddlers
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter function
|
|
*/
|
|
exports.shadowsource = function(source,operator,options) {
|
|
var results = [];
|
|
source(function(tiddler,title) {
|
|
var source = options.wiki.getShadowSource(title);
|
|
if(source) {
|
|
$tw.utils.pushTop(results,source);
|
|
}
|
|
});
|
|
results.sort();
|
|
return results;
|
|
};
|
|
|
|
})();
|