diff options
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -155,6 +155,10 @@ function chooseWaifu() { fetch("https://api.waifu.im/search").then((response) => { response.json().then((json) => { doc.getElementById("waifu").src = json["images"][0]["url"]; + doc.getElementById("waifu-link").href = + json["images"][0]["source"] || + json["images"][0]["artist"]["twitter"] || + json["images"][0]["artist"]["pixiv"]; }); }); } |