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