MCPcopy Create free account
hub / github.com/cnodejs/nodeclub / showList

Function showList

public/javascripts/google_search_preview.js:41–53  ·  view source on GitHub ↗
(list)

Source from the content-addressed store, hash-verified

39 .after('<style>.__quick_search_list_item { border-bottom:1px solid #EEE; padding:4px 0px; }\n.__quick_search_list_item:last-child { border-bottom:none; }\n.__quick_search_list_item:hover { background-color:#EEE; }\n.__quick_search_list_item span { font-size:10px ;margin-left:20px; color:#333; }\n.__quick_search_list_item b { color:#DD4B39; font-weight:normal; margin:2px; }</style>');
40 var $list = $('#__quick_search_list');
41 var showList = function (list) {
42 var html = '';
43 list.forEach(function (line) {
44 html += '<div class="__quick_search_list_item"><a href="' + line.url + '">' + line.title + '</a>' +
45 '<span style="font-size:12px;">' + line.content + '</span></div>';
46 });
47 if (!html) {
48 html = '暂时没有相关结果。';
49 }
50 var o1 = $in.offset();
51 var o2 = {top: o1.top + $in.height() + 10, left: o1.left};
52 $list.offset(o2).html(html).show();
53 };
54});

Callers 1

checkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected