mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Более логичная подсветка совпадений. Строку мы и там видим, а вот част которая совпала с поисковой лучше подсветить.
This commit is contained in:
parent
02ac67bb50
commit
317691eb5f
1 changed files with 4 additions and 4 deletions
|
@ -18,13 +18,13 @@ a.hl, a.hl:visited { color: #1515FF; }
|
|||
function qs_highlight_found ()
|
||||
{
|
||||
this.style.display = '';
|
||||
var a = $('a:first', this)[0];
|
||||
var a = $('a:first', this);
|
||||
var q = $('#q-search').val().toLowerCase();
|
||||
if (q != '' && a.innerHTML.toLowerCase().indexOf(q) != -1) {
|
||||
a.className = 'hl';
|
||||
if (q != '' && a.text().toLowerCase().indexOf(q) != -1) {
|
||||
a.html(a.text().replace(q, '<b style="color:#1515ff">' + q + '</b>'));
|
||||
}
|
||||
else {
|
||||
a.className = '';
|
||||
a.html(a.text());
|
||||
}
|
||||
}
|
||||
function open_feed (f_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue