Ox.UI.getImageURL: fix color regexp
This commit is contained in:
parent
359a8984d3
commit
893ba67bc0
1 changed files with 3 additions and 2 deletions
|
@ -309,6 +309,7 @@ Ox.load.UI = function(options, callback) {
|
|||
Ox.UI.getImageURL = function(name, theme, color) {
|
||||
var imageURL;
|
||||
theme = theme || Ox.Theme();
|
||||
color = Ox.Theme[theme].color[color] || null;
|
||||
// fixme: not the best idea to do this here
|
||||
if (name == 'symbolPlay') {
|
||||
name = 'symbolRight';
|
||||
|
@ -317,8 +318,8 @@ Ox.load.UI = function(options, callback) {
|
|||
if (options.loadImages && color) {
|
||||
imageURL = 'data:image/svg+xml;base64,' + btoa(
|
||||
atob(imageURL.split(',')[1]).replace(
|
||||
/#\d{6}/, '#' + Ox.toHex(Ox.Theme[theme].color[color]
|
||||
))
|
||||
/#[0-9A-F]{6}/i, '#' + Ox.toHex(color)
|
||||
)
|
||||
);
|
||||
}
|
||||
return imageURL;
|
||||
|
|
Loading…
Reference in a new issue