|
|
@ -1078,9 +1078,15 @@ var makeMenu = function() {
|
|
|
|
// Do all the stuff that needs to be done before building menu et al.
|
|
|
|
// Do all the stuff that needs to be done before building menu et al.
|
|
|
|
|
|
|
|
|
|
|
|
function initMenuEnvironment() {
|
|
|
|
function initMenuEnvironment() {
|
|
|
|
uDom('body').css('font-size', getUserSetting('displayTextSize'));
|
|
|
|
document.body.style.setProperty(
|
|
|
|
uDom('body').toggleClass('colorblind', getUserSetting('colorBlindFriendly') === true);
|
|
|
|
'font-size',
|
|
|
|
uDom('#version').text(matrixSnapshot.appVersion || '');
|
|
|
|
getUserSetting('displayTextSize')
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
document.body.classList.toggle(
|
|
|
|
|
|
|
|
'font-size',
|
|
|
|
|
|
|
|
getUserSetting('colorBlindFriendly')
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
uDom.nodeFromId('version').textContent = matrixSnapshot.appVersion || '';
|
|
|
|
|
|
|
|
|
|
|
|
var prettyNames = matrixHeaderPrettyNames;
|
|
|
|
var prettyNames = matrixHeaderPrettyNames;
|
|
|
|
var keys = Object.keys(prettyNames);
|
|
|
|
var keys = Object.keys(prettyNames);
|
|
|
@ -1330,6 +1336,13 @@ function dropDownMenuHide() {
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
var onMatrixSnapshotReady = function(response) {
|
|
|
|
var onMatrixSnapshotReady = function(response) {
|
|
|
|
|
|
|
|
if ( response === 'ENOTFOUND' ) {
|
|
|
|
|
|
|
|
uDom.nodeFromId('noTabFound').textContent =
|
|
|
|
|
|
|
|
vAPI.i18n('matrixNoTabFound');
|
|
|
|
|
|
|
|
document.body.classList.add('noTabFound');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Now that tabId and pageURL are set, we can build our menu
|
|
|
|
// Now that tabId and pageURL are set, we can build our menu
|
|
|
|
initMenuEnvironment();
|
|
|
|
initMenuEnvironment();
|
|
|
|
makeMenu();
|
|
|
|
makeMenu();
|
|
|
@ -1443,7 +1456,7 @@ var matrixSnapshotPoller = (function() {
|
|
|
|
if ( typeof response === 'object' ) {
|
|
|
|
if ( typeof response === 'object' ) {
|
|
|
|
matrixSnapshot = response;
|
|
|
|
matrixSnapshot = response;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onMatrixSnapshotReady();
|
|
|
|
onMatrixSnapshotReady(response);
|
|
|
|
pollAsync();
|
|
|
|
pollAsync();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|