Fixed icons for popup.html embeded in YouTube

This commit is contained in:
mmble 2020-08-19 16:57:43 +02:00
parent 34ea13ecba
commit abc6f70329
4 changed files with 13 additions and 5 deletions

View file

@ -28,6 +28,9 @@
"icons/PlayerStopIconSponsorBlocker256px.png",
"icons/PlayerUploadIconSponsorBlocker256px.png",
"icons/PlayerUploadFailedIconSponsorBlocker256px.png",
"icons/settings.svg",
"icons/pencil.svg",
"icons/check.svg",
"icons/upvote.png",
"icons/downvote.png",
"icons/thumbs_down.svg",

View file

@ -135,7 +135,7 @@ div.logoText>p, .recordingSubtitle {
}
.recordingSubtitle {
margin-bottom: 4px !important;
margin-bottom: 5px !important;
}
.logoText {

View file

@ -47,7 +47,7 @@
</label>
</div>
<button id="optionsButton" title="__MSG_optionsInfo__">
<img src="/icons/settings.svg" alt="Settings icon" width="16" height="16">
<img src="/icons/settings.svg" alt="Settings icon" width="16" height="16" id="sbPopupIconSettings">
__MSG_Options__
</button>
</div>
@ -60,7 +60,7 @@
<div id="setUsernameContainer">
<p id="usernameValue"></p>
<button id="setUsernameButton" title="__MSG_setUsername__">
<img src="/icons/pencil.svg" alt="__MSG_setUsername__" width="16" height="16">
<img src="/icons/pencil.svg" alt="__MSG_setUsername__" width="16" height="16" id="sbPopupIconEdit">
</button>
</div>
<div id="setUsername" style="display: none">
@ -69,7 +69,7 @@
</div>
<input id="usernameInput" hint="Username"></input>
<button id="submitUsername">
<img src="/icons/check.svg" alt="__MSG_setUsername__" width="16" height="16">
<img src="/icons/check.svg" alt="__MSG_setUsername__" width="16" height="16" id="sbPopupIconCheck">
</button>
</div>
</div>

View file

@ -1265,11 +1265,16 @@ function openInfoMenu() {
parentNode = document.getElementById("watch7-sidebar-contents");
}
//make the logo source not 404
//query selector must be used since getElementByID doesn't work on a node and this isn't added to the document yet
let logo = <HTMLImageElement> popup.querySelector("#sponsorBlockPopupLogo");
let settings = <HTMLImageElement> popup.querySelector("#sbPopupIconSettings");
let edit = <HTMLImageElement> popup.querySelector("#sbPopupIconEdit");
let check = <HTMLImageElement> popup.querySelector("#sbPopupIconCheck");
logo.src = chrome.extension.getURL("icons/LogoSponsorBlocker256px.png");
settings.src = chrome.extension.getURL("icons/settings.svg");
edit.src = chrome.extension.getURL("icons/pencil.svg");
check.src = chrome.extension.getURL("icons/check.svg");
//remove the style sheet and font that are not necessary
popup.querySelector("#sponsorBlockPopupFont").remove();