Browse Source

favicon white

pull/157/head
Luckyvb 4 years ago
parent
commit
016751236d
  1. BIN
      PBSDiscordDark/images/dd-logo-128.png
  2. 18
      PBSDiscordDark/js/PBSDiscordDark.js

BIN
PBSDiscordDark/images/dd-logo-128.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

18
PBSDiscordDark/js/PBSDiscordDark.js

@ -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() { const patchCharts = function() {
Ext.chart.theme.Base.prototype.config.chart.defaults.background = '#23272a'; Ext.chart.theme.Base.prototype.config.chart.defaults.background = '#23272a';
Ext.chart.theme.Base.prototype.config.axis.defaults.label.color = 'white'; Ext.chart.theme.Base.prototype.config.axis.defaults.label.color = 'white';
@ -60,6 +77,7 @@ function patchCreateWidget() {
} }
swapLogo(); swapLogo();
swapFavIcon();
patchCharts(); patchCharts();
patchGaugeWidget(); patchGaugeWidget();
patchBackupConfig(); patchBackupConfig();

Loading…
Cancel
Save