Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
my-spot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
e
cloud
my-spot
Commits
4ec2fab5
Commit
4ec2fab5
authored
Jun 16, 2020
by
Noémi Ványi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consider HTTP request when running search categories on select is enabled
Closes #1138
parent
08c13daf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
searx/static/plugins/js/search_on_category_select.js
searx/static/plugins/js/search_on_category_select.js
+18
-0
No files found.
searx/static/plugins/js/search_on_category_select.js
View file @
4ec2fab5
...
@@ -6,19 +6,37 @@ $(document).ready(function() {
...
@@ -6,19 +6,37 @@ $(document).ready(function() {
});
});
$
(
document
.
getElementById
(
$
(
this
).
attr
(
"
for
"
))).
prop
(
'
checked
'
,
true
);
$
(
document
.
getElementById
(
$
(
this
).
attr
(
"
for
"
))).
prop
(
'
checked
'
,
true
);
if
(
$
(
'
#q
'
).
val
())
{
if
(
$
(
'
#q
'
).
val
())
{
if
(
getHttpRequest
()
==
"
GET
"
)
{
$
(
'
#search_form
'
).
attr
(
'
action
'
,
$
(
'
#search_form
'
).
serialize
());
}
$
(
'
#search_form
'
).
submit
();
$
(
'
#search_form
'
).
submit
();
}
}
return
false
;
return
false
;
});
});
$
(
'
#time-range
'
).
change
(
function
(
e
)
{
$
(
'
#time-range
'
).
change
(
function
(
e
)
{
if
(
$
(
'
#q
'
).
val
())
{
if
(
$
(
'
#q
'
).
val
())
{
if
(
getHttpRequest
()
==
"
GET
"
)
{
$
(
'
#search_form
'
).
attr
(
'
action
'
,
$
(
'
#search_form
'
).
serialize
());
}
$
(
'
#search_form
'
).
submit
();
$
(
'
#search_form
'
).
submit
();
}
}
});
});
$
(
'
#language
'
).
change
(
function
(
e
)
{
$
(
'
#language
'
).
change
(
function
(
e
)
{
if
(
$
(
'
#q
'
).
val
())
{
if
(
$
(
'
#q
'
).
val
())
{
if
(
getHttpRequest
()
==
"
GET
"
)
{
$
(
'
#search_form
'
).
attr
(
'
action
'
,
$
(
'
#search_form
'
).
serialize
());
}
$
(
'
#search_form
'
).
submit
();
$
(
'
#search_form
'
).
submit
();
}
}
});
});
}
}
});
});
function
getHttpRequest
()
{
httpRequest
=
"
POST
"
;
urlParams
=
new
URLSearchParams
(
window
.
location
.
search
);
if
(
urlParams
.
has
(
'
method
'
))
{
httpRequest
=
urlParams
.
get
(
'
method
'
);
}
return
httpRequest
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment