by Andre_H » Fri Jan 20, 2023 5:52 am
Hi guys,
i try to color-code tracks (all fields of the track would be nice, but just the title would also be ok) in the main view, if a keyword is found in the tracks comment (example here "DUPLIKAT"). I used the "Highlight Bitrate" addon as a template, but the syntax of "includes" seems to fail me.
Code: Select all
// highlight track if comment contains 'DUPLIKAT'
uitools.tracklistFieldDefs.title.override({
bindData: function ($super, div, item) {
$super(div, item);
var CommentCheck = item.comment;
div.style.fontWeight = '';
if (CommentCheck.includes('DUPLIKAT')) {
div.style.color = 'blue';
} else
div.style.color = '';
}
});
"Application throw an exception "Cannot read properties of undefined (reading 'includes')".
Can anyone show me, what's wrong?
Hi guys,
i try to color-code tracks (all fields of the track would be nice, but just the title would also be ok) in the main view, if a keyword is found in the tracks comment (example here "DUPLIKAT"). I used the "Highlight Bitrate" addon as a template, but the syntax of "includes" seems to fail me.
[code]// highlight track if comment contains 'DUPLIKAT'
uitools.tracklistFieldDefs.title.override({
bindData: function ($super, div, item) {
$super(div, item);
var CommentCheck = item.comment;
div.style.fontWeight = '';
if (CommentCheck.includes('DUPLIKAT')) {
div.style.color = 'blue';
} else
div.style.color = '';
}
});[/code]
"Application throw an exception "Cannot read properties of undefined (reading 'includes')".
Can anyone show me, what's wrong?