From e191217264a81206fd84596ac638faa7930a689b Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 9 Oct 2023 17:35:55 +0100 Subject: [PATCH] Remove obsolete setquerystring operator Instead we have the query- parameters to the http request message --- core/modules/filters/url-ops.js | 25 ---------------- .../tests/data/filters/querystrings.tid | 29 ------------------- 2 files changed, 54 deletions(-) delete mode 100644 core/modules/filters/url-ops.js delete mode 100644 editions/test/tiddlers/tests/data/filters/querystrings.tid diff --git a/core/modules/filters/url-ops.js b/core/modules/filters/url-ops.js deleted file mode 100644 index ce8817539..000000000 --- a/core/modules/filters/url-ops.js +++ /dev/null @@ -1,25 +0,0 @@ -/*\ -title: $:/core/modules/filters/url-ops.js -type: application/javascript -module-type: filteroperator - -Filter operators for URL operations - -\*/ -(function(){ - -/*jslint node: true, browser: true */ -/*global $tw: false */ -"use strict"; - -exports["setquerystring"] = function(source,operator,options) { - var name = operator.operands.length >= 1 ? operator.operands[0] : null, - value = operator.operands.length >= 2 ? operator.operands[1] : "", - results = []; - source(function(tiddler,title) { - results.push($tw.utils.setQueryStringParameter(title,name,value)); - }); - return results; -}; - -})(); diff --git a/editions/test/tiddlers/tests/data/filters/querystrings.tid b/editions/test/tiddlers/tests/data/filters/querystrings.tid deleted file mode 100644 index bdd3c72d9..000000000 --- a/editions/test/tiddlers/tests/data/filters/querystrings.tid +++ /dev/null @@ -1,29 +0,0 @@ -title: Filters/QueryStrings -description: Query string filter operators -type: text/vnd.tiddlywiki-multiple -tags: [[$:/tags/wiki-test-spec]] - -title: Output - -\define url() https://tiddlywiki.com/ - -<$let lf={{{ [charcode[10],[13]]}}}> - -<$text text={{{ - [[$$$]setquerystring[habitat],[desert]] - [setquerystring[]] - [setquerystring[animal],[elephant]] - [setquerystring[animal],[elephant]setquerystring[animal],[ostrich]] - [setquerystring[animal],[elephant]setquerystring[animal],[ostrich]setquerystring[animal]] - +[join] -}}}/> - - -+ -title: ExpectedResult - -$$$ -https://tiddlywiki.com/ -https://tiddlywiki.com/?animal=elephant -https://tiddlywiki.com/?animal=ostrich -https://tiddlywiki.com/?animal= \ No newline at end of file