Weilbyte
5 years ago
No known key found for this signature in database
GPG Key ID: BB87B2C8A1468388
1 changed files with
8 additions and
6 deletions
-
PVEDiscordDark/js/PVEDiscordDark.js
|
@ -2,13 +2,15 @@ const swapLogo = async function() { |
|
|
const imgElements = document.getElementsByTagName('img'); |
|
|
const imgElements = document.getElementsByTagName('img'); |
|
|
var found = false; |
|
|
var found = false; |
|
|
for (var i = 0; i< imgElements.length; i++) { |
|
|
for (var i = 0; i< imgElements.length; i++) { |
|
|
var source = imgElements[i].src; |
|
|
var node = imgElements[i] |
|
|
if (source.includes('proxmox_logo.png')) { |
|
|
if (node.src.includes('proxmox_logo.png')) { |
|
|
found = true; |
|
|
found = true; |
|
|
imgElements[i].parentElement.parentElement.style.background = '#23272A'; |
|
|
var width = (node.parentElement.clientWidth == undefined || node.parentElement.clientWidth == 0) ? 177 : node.parentElement.clientWidth; |
|
|
imgElements[i].setAttribute('height', '34px'); |
|
|
var height = (node.parentElement.clientHeight == undefined || node.parentElement.clientHeight == 0) ? 34 : node.parentElement.clientHeight; |
|
|
imgElements[i].setAttribute('width', '177px'); |
|
|
node.parentElement.parentElement.style.background = '#23272A'; |
|
|
imgElements[i].setAttribute('src', '/pve2/images/dd_logo.png'); |
|
|
node.setAttribute('height', `${height}px`); |
|
|
|
|
|
node.setAttribute('width', `${width}px`); |
|
|
|
|
|
node.setAttribute('src', '/pve2/images/dd_logo.png'); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (!found) { |
|
|
if (!found) { |
|
|