mirror of
https://github.com/murdos/musicbrainz-userscripts
synced 2024-12-13 20:02:27 +00:00
discogs_importer: improve debug_color() output
This commit is contained in:
parent
bce2b544d5
commit
a9695a21ca
1 changed files with 4 additions and 3 deletions
|
@ -112,7 +112,7 @@ function insertMBLinks($root) {
|
||||||
$root = $('body');
|
$root = $('body');
|
||||||
}
|
}
|
||||||
|
|
||||||
function debug_color(what, n) {
|
function debug_color(what, n, id) {
|
||||||
var colors = [
|
var colors = [
|
||||||
'#B3C6FF',
|
'#B3C6FF',
|
||||||
'#C6B3FF',
|
'#C6B3FF',
|
||||||
|
@ -131,10 +131,11 @@ function insertMBLinks($root) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
$(what).css('border', '2px dotted ' + colors[n%colors.length]);
|
$(what).css('border', '2px dotted ' + colors[n%colors.length]);
|
||||||
var debug_attr = $(what).attr('debug_discogs');
|
var debug_attr = $(what).attr('debug_discogs');
|
||||||
|
if (!id) id = '';
|
||||||
if (debug_attr) {
|
if (debug_attr) {
|
||||||
$(what).attr('debug_discogs', debug_attr + ',' + n);
|
$(what).attr('debug_discogs', debug_attr + ' || ' + id + '(' + n + ')');
|
||||||
} else {
|
} else {
|
||||||
$(what).attr('debug_discogs', n);
|
$(what).attr('debug_discogs', id + '(' + n + ')');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue