|
|
@ -281,11 +281,7 @@ var renderLogEntry = function(entry) {
|
|
|
|
tr.cells[0].title = time.toLocaleDateString('fullwide', dateOptions);
|
|
|
|
tr.cells[0].title = time.toLocaleDateString('fullwide', dateOptions);
|
|
|
|
|
|
|
|
|
|
|
|
if ( entry.tab ) {
|
|
|
|
if ( entry.tab ) {
|
|
|
|
tr.classList.add('tab');
|
|
|
|
tr.classList.add('tab', classNameFromTabId(entry.tab));
|
|
|
|
var className = classNameFromTabId(entry.tab);
|
|
|
|
|
|
|
|
if ( className !== '' ) {
|
|
|
|
|
|
|
|
tr.classList.add(className);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( entry.tab === noTabId ) {
|
|
|
|
if ( entry.tab === noTabId ) {
|
|
|
|
tr.cells[1].appendChild(createHiddenTextNode('bts'));
|
|
|
|
tr.cells[1].appendChild(createHiddenTextNode('bts'));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -384,11 +380,9 @@ var synchronizeTabIds = function(newTabIds) {
|
|
|
|
var select = document.getElementById('pageSelector');
|
|
|
|
var select = document.getElementById('pageSelector');
|
|
|
|
var selectValue = select.value;
|
|
|
|
var selectValue = select.value;
|
|
|
|
var tabIds = Object.keys(newTabIds).sort(function(a, b) {
|
|
|
|
var tabIds = Object.keys(newTabIds).sort(function(a, b) {
|
|
|
|
var sa = newTabIds[a].title || newTabIds[a].url;
|
|
|
|
return newTabIds[a].localeCompare(newTabIds[a]);
|
|
|
|
var sb = newTabIds[b].title || newTabIds[b].url;
|
|
|
|
|
|
|
|
return sa.localeCompare(sb);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
var option, entry;
|
|
|
|
var option;
|
|
|
|
for ( var i = 0, j = 2; i < tabIds.length; i++ ) {
|
|
|
|
for ( var i = 0, j = 2; i < tabIds.length; i++ ) {
|
|
|
|
tabId = tabIds[i];
|
|
|
|
tabId = tabIds[i];
|
|
|
|
if ( tabId === noTabId ) {
|
|
|
|
if ( tabId === noTabId ) {
|
|
|
@ -400,8 +394,7 @@ var synchronizeTabIds = function(newTabIds) {
|
|
|
|
option = document.createElement('option');
|
|
|
|
option = document.createElement('option');
|
|
|
|
select.appendChild(option);
|
|
|
|
select.appendChild(option);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
entry = newTabIds[tabId];
|
|
|
|
option.textContent = newTabIds[tabId];
|
|
|
|
option.textContent = entry.title || entry.url;
|
|
|
|
|
|
|
|
option.value = classNameFromTabId(tabId);
|
|
|
|
option.value = classNameFromTabId(tabId);
|
|
|
|
if ( option.value === selectValue ) {
|
|
|
|
if ( option.value === selectValue ) {
|
|
|
|
option.setAttribute('selected', '');
|
|
|
|
option.setAttribute('selected', '');
|
|
|
@ -409,7 +402,7 @@ var synchronizeTabIds = function(newTabIds) {
|
|
|
|
option.removeAttribute('selected');
|
|
|
|
option.removeAttribute('selected');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for ( ; j < select.options.length; j++ ) {
|
|
|
|
while ( j < select.options.length ) {
|
|
|
|
select.removeChild(select.options[j]);
|
|
|
|
select.removeChild(select.options[j]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( select.value !== selectValue ) {
|
|
|
|
if ( select.value !== selectValue ) {
|
|
|
|