2023-01-05 17:12:13 +00:00
|
|
|
/*\
|
|
|
|
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) {
|
2023-01-13 11:34:39 +00:00
|
|
|
var name = operator.operands.length >= 1 ? operator.operands[0] : null,
|
2023-01-05 17:12:13 +00:00
|
|
|
value = operator.operands.length >= 2 ? operator.operands[1] : "",
|
|
|
|
results = [];
|
|
|
|
source(function(tiddler,title) {
|
2023-01-13 11:34:39 +00:00
|
|
|
results.push($tw.utils.setQueryStringParameter(title,name,value));
|
2023-01-05 17:12:13 +00:00
|
|
|
});
|
|
|
|
return results;
|
|
|
|
};
|
|
|
|
|
|
|
|
})();
|