client/posts: provide link for danbooru image search

This commit is contained in:
Shyam Sunder 2021-01-08 11:03:38 -05:00
parent b9451bef4a
commit 8fa84abdc4
3 changed files with 13 additions and 2 deletions

View file

@ -7,8 +7,8 @@
>.sidebar
margin-right: 1em
min-width: 20em
max-width: 20em
min-width: 21em
max-width: 21em
line-height: 160%
a:active

View file

@ -52,6 +52,7 @@
<section class='search'>
Search on
<a href='http://iqdb.org/?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>IQDB</a> &middot;
<a href='https://danbooru.donmai.us/posts?tags=md5:<%- ctx.post.checksumMD5 %>'>Danbooru</a> &middot;
<a href='https://www.google.com/searchbyimage?&image_url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>Google Images</a>
</section>

View file

@ -38,6 +38,14 @@ class Post extends events.EventTarget {
return this._mimeType;
}
get checksumSHA1() {
return this._checksumSHA1;
}
get checksumMD5() {
return this._checksumMD5;
}
get creationTime() {
return this._creationTime;
}
@ -459,6 +467,8 @@ class Post extends events.EventTarget {
_id: response.id,
_type: response.type,
_mimeType: response.mimeType,
_checksumSHA1: response.checksum,
_checksumMD5: response.checksumMD5,
_creationTime: response.creationTime,
_user: response.user,
_safety: response.safety,