diff --git a/core/modules/filters/function.js b/core/modules/filters/function.js index 79210fb78..bc0702cf4 100644 --- a/core/modules/filters/function.js +++ b/core/modules/filters/function.js @@ -17,19 +17,24 @@ Export our filter function */ exports.function = function(source,operator,options) { var functionName = operator.operands[0], - params = []; + params = [], + results; $tw.utils.each(operator.operands.slice(1),function(param) { params.push({value: param}); }); + // console.log(`Calling ${functionName} with params ${JSON.stringify(params)}`); var variableInfo = options.widget && options.widget.getVariableInfo && options.widget.getVariableInfo(functionName,{params: params, source: source}); if(variableInfo && variableInfo.srcVariable && variableInfo.srcVariable.isFunctionDefinition) { - return variableInfo.resultList ? variableInfo.resultList : [variableInfo.text]; + results = variableInfo.resultList ? variableInfo.resultList : [variableInfo.text]; } // Return the input list if the function wasn't found - var results = []; - source(function(tiddler,title) { - results.push(title); - }); + if(!results) { + results = []; + source(function(tiddler,title) { + results.push(title); + }); + } + // console.log(`function ${functionName} with params ${JSON.stringify(params)} results: ${JSON.stringify(results)}`); return results; }; diff --git a/core/modules/startup/rootwidget.js b/core/modules/startup/rootwidget.js index 8496b48df..95e902db6 100644 --- a/core/modules/startup/rootwidget.js +++ b/core/modules/startup/rootwidget.js @@ -79,7 +79,7 @@ exports.startup = function() { successNotification: event.paramObject && event.paramObject.successNotification, failureNotification: event.paramObject && event.paramObject.failureNotification, plainText: event.paramObject && event.paramObject.plainText - },event.paramObject.type); + },event.paramObject && event.paramObject.type); }); // Install the tm-focus-selector message $tw.rootWidget.addEventListener("tm-focus-selector",function(event) { diff --git a/core/modules/utils/dom/http.js b/core/modules/utils/dom/http.js index f16f1c512..37a7855a5 100644 --- a/core/modules/utils/dom/http.js +++ b/core/modules/utils/dom/http.js @@ -216,11 +216,11 @@ HttpClientRequest.prototype.send = function(callback) { if(lengthComputable) { setBinding(self.bindProgress,"" + Math.floor((loaded/total) * 100)) } - self.wiki.invokeActionString(self.progressActions,undefined,{ + self.wiki.invokeActionString(self.progressActions,undefined,$tw.utils.extend({},self.variables,{ lengthComputable: lengthComputable ? "yes" : "no", loaded: loaded, total: total - },{parentWidget: $tw.rootWidget}); + }),{parentWidget: $tw.rootWidget}); } }); } diff --git a/core/palettes/FlexokiDark.tid b/core/palettes/FlexokiDark.tid index 53fa35330..05e53edf5 100644 --- a/core/palettes/FlexokiDark.tid +++ b/core/palettes/FlexokiDark.tid @@ -78,13 +78,13 @@ code-background: <> code-border: <> code-foreground: <> diff-delete-background: <> -diff-delete-foreground: <> +diff-delete-foreground: <> diff-equal-background: diff-equal-foreground: inherit diff-insert-background: <> -diff-insert-foreground: <> +diff-insert-foreground: <> diff-invisible-background: <> -diff-invisible-foreground: <> +diff-invisible-foreground: <> dirty-indicator: <> download-background: <> download-foreground: <> @@ -103,8 +103,8 @@ external-link-foreground-visited: <> external-link-foreground: <> footnote-target-background: <> foreground: #CECDC3 -highlight-background: <> -highlight-foreground: <> +highlight-background: <> +highlight-foreground: inherit menubar-background: <> menubar-foreground: <> message-background: <> diff --git a/core/palettes/FlexokiLight.tid b/core/palettes/FlexokiLight.tid index abf506387..c3c4d2f25 100644 --- a/core/palettes/FlexokiLight.tid +++ b/core/palettes/FlexokiLight.tid @@ -105,7 +105,7 @@ external-link-foreground-visited: <> external-link-foreground: <> footnote-target-background: <> foreground: #100F0F -highlight-background: <> +highlight-background: <> highlight-foreground: inherit menubar-background: <> menubar-foreground: <> diff --git a/plugins/tiddlywiki/consent-banner/banner.tid b/plugins/tiddlywiki/consent-banner/banner.tid index e9fcaba07..a20f7665c 100644 --- a/plugins/tiddlywiki/consent-banner/banner.tid +++ b/plugins/tiddlywiki/consent-banner/banner.tid @@ -3,6 +3,8 @@ tags: $:/tags/PageTemplate \whitespace trim +<%if [!match[yes]] %> + <$reveal state="$:/state/consent-banner/accepted" type="match" text="" tag="div"> + +<%endif%> \ No newline at end of file