use different selector rather than hardcoding url
This commit is contained in:
parent
ddb6d32e29
commit
258fda188e
1 changed files with 2 additions and 2 deletions
|
@ -19,8 +19,8 @@ $(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Generate a random seed when using order:random
|
//Generate a random seed when using order:random
|
||||||
$('form[action="/shimmie/post/list"]').submit(function(e){
|
$('form > input[placeholder="Search"]').parent().submit(function(e){
|
||||||
var input = $('form[action="/shimmie/post/list"] input[name=search]');
|
var input = $('form > input[placeholder="Search"]');
|
||||||
var tagArr = input.val().split(" ");
|
var tagArr = input.val().split(" ");
|
||||||
|
|
||||||
var rand = (($.inArray("order:random", tagArr) + 1) || ($.inArray("order=random", tagArr) + 1)) - 1;
|
var rand = (($.inArray("order:random", tagArr) + 1) || ($.inArray("order=random", tagArr) + 1)) - 1;
|
||||||
|
|
Reference in a new issue