forked from 0x2620/oxjs
add new timeline and find input to video player
This commit is contained in:
parent
ac2ea5f53d
commit
ce33d3650a
6 changed files with 326 additions and 162 deletions
|
|
@ -3864,11 +3864,12 @@ Ox.highlight <f> Highlight matches in a string
|
|||
> Ox.highlight('foobar', 'foo', 'match')
|
||||
'<span class="match">foo</span>bar'
|
||||
@*/
|
||||
// fixme: with regexp, special chars would have to be escaped
|
||||
Ox.highlight = function(txt, str, classname) {
|
||||
return txt.replace(
|
||||
return str.length ? txt.replace(
|
||||
new RegExp('(' + str + ')', 'ig'),
|
||||
'<span class="' + classname + '">$1</span>'
|
||||
);
|
||||
) : txt;
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue