Sha256: 22dfeafb3b633990ec7c61c578b192651aa50fb30ab5cd86f8cca39e9b7b55d6
Contents?: true
Size: 649 Bytes
Versions: 103
Compression:
Stored size: 649 Bytes
Contents
$(function() { var updateView = function() { $.ajax({ url: '/onebox', type: 'GET', data: { url: input.val() } }).done(function(data) { $('.onebox-container').empty().append(data.onebox).append(data.placeholder); $('#oneboxed-url').empty().text(data.url); $('#onebox-engine').empty().text(data.engine); $('#preview-html').empty().text(data.onebox); $('#placeholder-html').empty().text(data.placeholder); }); }; var input = $('#onebox-url').keyup(function(e) { // ENTER key if (e.keyCode === 13) { updateView(); } }).focus(); $('#go').click(updateView); });
Version data entries
103 entries across 103 versions & 1 rubygems