|
|
@ -1,7 +1,7 @@ |
|
|
|
const swapLogo = async function() { |
|
|
|
const imgElements = document.getElementsByTagName('img'); |
|
|
|
var found = false; |
|
|
|
for (var i = 0; i< imgElements.length; i++) { |
|
|
|
for (var i = 0; i < imgElements.length; i++) { |
|
|
|
var node = imgElements[i] |
|
|
|
if (node.src.includes('proxmox_logo.png')) { |
|
|
|
found = true; |
|
|
@ -19,6 +19,23 @@ const swapLogo = async function() { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
const swapFavIcon = async function() { |
|
|
|
const lnkElements = document.getElementsByTagName('link'); |
|
|
|
var found = false; |
|
|
|
for (var i = 0; i < lnkElements.length; i++) { |
|
|
|
var node = lnkElements[i] |
|
|
|
if (node.getAttribute('rel') == 'icon' && node.getAttributr('href') == '/images/logo-128.png') { |
|
|
|
found = true; |
|
|
|
node.setAttribute('href', '/images/dd_logo-128.png'); |
|
|
|
i = lnkElements.length; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!found) { |
|
|
|
await new Promise(resolve => setTimeout(resolve, 60)); |
|
|
|
await swapFavIcon(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
const patchCharts = function() { |
|
|
|
Ext.chart.theme.Base.prototype.config.chart.defaults.background = '#23272a'; |
|
|
|
Ext.chart.theme.Base.prototype.config.axis.defaults.label.color = 'white'; |
|
|
@ -60,6 +77,7 @@ function patchCreateWidget() { |
|
|
|
} |
|
|
|
|
|
|
|
swapLogo(); |
|
|
|
swapFavIcon(); |
|
|
|
patchCharts(); |
|
|
|
patchGaugeWidget(); |
|
|
|
patchBackupConfig(); |
|
|
|