remove ccs integration
This commit is contained in:
@@ -150,33 +150,6 @@
|
|||||||
}
|
}
|
||||||
$dest.append(Danbooru.RelatedTag.build_html("artist", tags, "artist", true));
|
$dest.append(Danbooru.RelatedTag.build_html("artist", tags, "artist", true));
|
||||||
}
|
}
|
||||||
if (Danbooru.meta("ccs-server")) {
|
|
||||||
if (Danbooru.RelatedTag.recent_ccs) {
|
|
||||||
if (Danbooru.RelatedTag.recent_ccs.length) {
|
|
||||||
Danbooru.RelatedTag.build_ccs($dest);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Danbooru.RelatedTag.recent_ccs = []; // semaphore to only make 1 call
|
|
||||||
Danbooru.RelatedTag.fetch_ccs($dest);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Danbooru.RelatedTag.fetch_ccs = function($dest) {
|
|
||||||
$.getJSON(Danbooru.meta("ccs-server") + "/query", {
|
|
||||||
"url": Danbooru.meta("image-url"),
|
|
||||||
"ref": Danbooru.meta("image-ref"),
|
|
||||||
"sig": Danbooru.meta("image-sig")
|
|
||||||
}, function(data) {
|
|
||||||
Danbooru.RelatedTag.recent_ccs = data.filter(function(x) {return x[0] > 0.25;});
|
|
||||||
Danbooru.RelatedTag.recent_ccs = $.map(Danbooru.RelatedTag.recent_ccs, function(x) {return [[x[1], 4]];});
|
|
||||||
|
|
||||||
if (Danbooru.RelatedTag.recent_ccs.length) {
|
|
||||||
Danbooru.RelatedTag.build_ccs($dest);
|
|
||||||
}
|
|
||||||
}).fail(function() {
|
|
||||||
Danbooru.notice("Character classification service is not currently available");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.RelatedTag.build_recent_and_frequent = function($dest) {
|
Danbooru.RelatedTag.build_recent_and_frequent = function($dest) {
|
||||||
@@ -201,12 +174,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.RelatedTag.build_ccs = function($dest) {
|
|
||||||
if (Danbooru.RelatedTag.recent_ccs) {
|
|
||||||
$dest.append(this.build_html("Guessed Characters", Danbooru.RelatedTag.recent_ccs, "ccs"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Danbooru.RelatedTag.build_translated = function($dest) {
|
Danbooru.RelatedTag.build_translated = function($dest) {
|
||||||
if (Danbooru.RelatedTag.translated_tags && Danbooru.RelatedTag.translated_tags.length) {
|
if (Danbooru.RelatedTag.translated_tags && Danbooru.RelatedTag.translated_tags.length) {
|
||||||
$dest.append(this.build_html("Translated Tags", Danbooru.RelatedTag.translated_tags, "translated"));
|
$dest.append(this.build_html("Translated Tags", Danbooru.RelatedTag.translated_tags, "translated"));
|
||||||
|
|||||||
@@ -141,13 +141,4 @@
|
|||||||
Upload - <%= Danbooru.config.app_name %>
|
Upload - <%= Danbooru.config.app_name %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if CurrentUser.is_builder? && Danbooru.config.ccs_server.present? && @normalized_url %>
|
|
||||||
<% content_for(:html_header) do %>
|
|
||||||
<%= tag("meta", name: "ccs-server", content: Danbooru.config.ccs_server) %>
|
|
||||||
<%= tag("meta", name: "image-url", content: @normalized_url) %>
|
|
||||||
<%= tag("meta", name: "image-ref", content: ImageProxy.fake_referer_for(@normalized_url)) %>
|
|
||||||
<%= tag("meta", name: "image-sig", content: ccs_build_sig(@normalized_url)) %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= render "posts/partials/common/secondary_links" %>
|
<%= render "posts/partials/common/secondary_links" %>
|
||||||
|
|||||||
Reference in New Issue
Block a user