forked from 0x2620/oxjs
add timeline view
This commit is contained in:
parent
36a747fe83
commit
b237451eb5
11 changed files with 1486 additions and 1 deletions
|
|
@ -1573,6 +1573,14 @@ Ox.endsWith = function(str, sub) {
|
|||
return str.substr(-sub.length) === sub;
|
||||
};
|
||||
|
||||
Ox.highlight = function(txt, str) {
|
||||
// fixme: move to ox.ui
|
||||
return str ? txt.replace(
|
||||
new RegExp('(' + str + ')', 'ig'),
|
||||
'<span class="OxHighlight">$1</span>'
|
||||
) : txt;
|
||||
}
|
||||
|
||||
Ox.pad = function(str, len, pad, pos) {
|
||||
/*
|
||||
>>> Ox.pad(1, 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue