It's unlikely SE will implement this specifically, because as @rene said, there's no official API for etymonline.
However, I have made a 'plugin' for use with my SE Chat Custom Oneboxes userscript. This is, by no means, an ideal solution, but it works, and could be helpful for sites such as this where SE can't implement themselves.
To use it:
- Install a userscript manager: Tampermonkey (for Chrome) or Greasemonkey (for Firefox)
- Install the userscript. Clicking this link will prompt your userscript manager to ask you to install it.
- Copy and paste the plugin (below) just above the
--------------------------------
in the middle of the script.
That's it!
Plugin:
customSites['etymonline.com'] = function(link, $obj) {
var term = link.split('?')[1].split('term=')[1];
if(term) {
$('head').append('<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/shu8/SE-Chat-Custom-Oneboxes/master/etymonline.css">');
$.get("https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22" + encodeURIComponent('http://etymonline.com/index.php?term=' + term) + "%22&callback=", function(d) {
var termToDisplay = $(d).find('#dictionary dt:eq(0)').text(),
definition = $(d).find('#dictionary dd:eq(0)').text();
var template = "<div class='etymonline-container'>\
<span class='term'>[etymonline]: <a href='"+link+"'>" + termToDisplay + "</a></span><br>\
<span>" + definition + "</span>\
</div>";
$obj.html(template);
});
}
};
Once you've installed it, you can quickly check if it works by going to this chat link, which is a etymonline link, which will transform into a nicer-looking, more helpful onebox! :D
If you have any installation questions, or any design suggestions (I did this really quickly!) please do comment here.