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) {
|
Ox.UI.getImageURL = function(name, theme, color) {
|
||||||
var imageURL;
|
var imageURL;
|
||||||
theme = theme || Ox.Theme();
|
theme = theme || Ox.Theme();
|
||||||
|
color = Ox.Theme[theme].color[color] || null;
|
||||||
// fixme: not the best idea to do this here
|
// fixme: not the best idea to do this here
|
||||||
if (name == 'symbolPlay') {
|
if (name == 'symbolPlay') {
|
||||||
name = 'symbolRight';
|
name = 'symbolRight';
|
||||||
|
@ -317,8 +318,8 @@ Ox.load.UI = function(options, callback) {
|
||||||
if (options.loadImages && color) {
|
if (options.loadImages && color) {
|
||||||
imageURL = 'data:image/svg+xml;base64,' + btoa(
|
imageURL = 'data:image/svg+xml;base64,' + btoa(
|
||||||
atob(imageURL.split(',')[1]).replace(
|
atob(imageURL.split(',')[1]).replace(
|
||||||
/#\d{6}/, '#' + Ox.toHex(Ox.Theme[theme].color[color]
|
/#[0-9A-F]{6}/i, '#' + Ox.toHex(color)
|
||||||
))
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return imageURL;
|
return imageURL;
|
||||||
|
|
Loading…
Reference in a new issue