1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-03-24 04:16:56 +00:00

Remove obsolete setquerystring operator

Instead we have the query- parameters to the http request message
This commit is contained in:
Jeremy Ruston 2023-10-09 17:35:55 +01:00
parent 10f09e08a9
commit e191217264
2 changed files with 0 additions and 54 deletions

View File

@ -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;
};
})();

View File

@ -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]]
[<url>setquerystring[]]
[<url>setquerystring[animal],[elephant]]
[<url>setquerystring[animal],[elephant]setquerystring[animal],[ostrich]]
[<url>setquerystring[animal],[elephant]setquerystring[animal],[ostrich]setquerystring[animal]]
+[join<lf>]
}}}/>
</$let>
+
title: ExpectedResult
$$$
https://tiddlywiki.com/
https://tiddlywiki.com/?animal=elephant
https://tiddlywiki.com/?animal=ostrich
https://tiddlywiki.com/?animal=