Skip to content

Commit

Permalink
Adds code in script.js::xcom_params to detect if function has been se…
Browse files Browse the repository at this point in the history
…lected
  • Loading branch information
turnermm committed Feb 12, 2022
1 parent 60d84fc commit e4c0dcd
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions script.js
Expand Up @@ -70,13 +70,6 @@ function xmlrpc() {
var options = xcom_params();

var func = options[0];
var arobj = Array();
if(typeof arobj.includes === "function"){
if(!xcom_query_types.includes(func)) {
xcom_err_msg('nofunc');
return;
}
}
xcom_query_status(options);

var other=false;
Expand Down Expand Up @@ -354,7 +347,7 @@ function xcom_srch_opts() { // for search function
return result;
}
function xcom_check_opts(fn,page,opts, params) {
page = page.trim();
page = page.trim();
var regex;
var skip_opts_cnt = false;
switch(fn) {
Expand Down Expand Up @@ -507,8 +500,14 @@ function xcom_params() {
}
else
{
if(!opts) return false;

var regex = RegExp('(wiki|plugin|dokuwiki|xcom)\.');
if(!optstring.match(regex)) {
xcom_err_msg('nofunc');
return false;
}
else {
alert(optstring);
}
return params[i] = opts;
}

Expand Down

0 comments on commit e4c0dcd

Please sign in to comment.