add xhr variant detection
This commit is contained in:
@@ -154,7 +154,7 @@
|
||||
|
||||
Danbooru.Post.initialize_similar = function() {
|
||||
$("#similar-button").click(function(e) {
|
||||
$.get("/iqdb_queries", {"variant": "xhr", "url": $("#post_source").val()}).done(function(html) {$("#iqdb-similar").html(html).show()});
|
||||
$.get("/iqdb_queries", {"url": $("#post_source").val()}).done(function(html) {$("#iqdb-similar").html(html).show()});
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
Danbooru.Upload.initialize_iqdb_source = function() {
|
||||
if (/^https?:\/\//.test($("#normalized_url").val())) {
|
||||
$.get("/iqdb_queries", {"variant": "xhr", "url": $("#normalized_url").val()}).done(function(html) {$("#iqdb-similar").html(html)});
|
||||
$.get("/iqdb_queries", {"url": $("#normalized_url").val()}).done(function(html) {$("#iqdb-similar").html(html)});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
Danbooru.Upload.initialize_similar = function() {
|
||||
$("#similar-button").click(function(e) {
|
||||
$.get("/iqdb_queries", {"variant": "xhr", "url": $("#upload_source").val()}).done(function(html) {$("#iqdb-similar").html(html).show()});
|
||||
$.get("/iqdb_queries", {"url": $("#upload_source").val()}).done(function(html) {$("#iqdb-similar").html(html).show()});
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user