show usw logo
This commit is contained in:
parent
000a614933
commit
a32adf1c32
|
@ -82,6 +82,12 @@ body.search-results-shown {
|
|||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.search-result-title img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: -6px 4px -6px 0;
|
||||
}
|
||||
|
||||
.search-result-title span {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
const RESULT_ID_PREFIX = 'search-result-';
|
||||
const INDEX_URL = URLS.usoArchiveRaw + 'search-index.json';
|
||||
const USW_INDEX_URL = URLS.usw + 'api/index/uso-format';
|
||||
const USW_ICON = $create('img', {
|
||||
src: `${URLS.usw}favicon.ico`,
|
||||
title: URLS.usw,
|
||||
});
|
||||
const STYLUS_CATEGORY = 'chrome-extension';
|
||||
const PAGE_LENGTH = 10;
|
||||
// update USO style install counter if the style isn't uninstalled immediately
|
||||
|
@ -283,6 +287,7 @@
|
|||
href: isUsw ? `${URLS.usw}style/${id}` :
|
||||
`${URLS.usoArchive}?category=${category}&style=${id}`,
|
||||
});
|
||||
if (isUsw) $('.search-result-title', entry).prepend(USW_ICON.cloneNode(true));
|
||||
$('.search-result-title span', entry).textContent =
|
||||
t.breakWord(name.length < 300 ? name : name.slice(0, 300) + '...');
|
||||
// screenshot
|
||||
|
|
Loading…
Reference in New Issue
Block a user