mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Changed alignment and switched icons
This commit is contained in:
parent
2e2e5d136a
commit
739548d169
6 changed files with 43 additions and 22 deletions
41
content.css
41
content.css
|
@ -41,7 +41,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.sponsorSkipObject {
|
.sponsorSkipObject {
|
||||||
font-family: 'Source Sans Pro', sans-serif;
|
font-family: Roboto, Arial, Helvetica, sans-serif;
|
||||||
|
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
|
@ -59,23 +59,33 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.sponsorBlockSpacer {
|
.sponsorBlockSpacer {
|
||||||
border-color: #999999;
|
background-color: rgb(100, 100, 100);
|
||||||
background-color: #999999;
|
border-color: rgb(100, 100, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sponsorSkipNotice {
|
.sponsorSkipNotice {
|
||||||
min-width: 300px;
|
min-width: 270px;
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
background-color: rgba(28, 28, 28, 0.9);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 100px;
|
bottom: 100px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
|
|
||||||
border-radius: 10px;
|
border-radius: 5px;
|
||||||
|
|
||||||
animation: fadeIn 0.5s;
|
animation: fadeIn 0.5s;
|
||||||
|
|
||||||
border-spacing: 7px 7px;
|
border-spacing: 10px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sponsorSkipNoticeTimeLeft {
|
||||||
|
color: #eeeeee;
|
||||||
|
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
border: 1px solid #eeeeee;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if two are very close to eachother */
|
/* if two are very close to eachother */
|
||||||
|
@ -88,7 +98,7 @@
|
||||||
.sponsorSkipNoticeUnskipSection {
|
.sponsorSkipNoticeUnskipSection {
|
||||||
float: left;
|
float: left;
|
||||||
|
|
||||||
border-left: 1px solid #eeeeee;
|
border-left: 1px solid rgb(150, 150, 150);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sponsorSkipNoticeRightSection {
|
.sponsorSkipNoticeRightSection {
|
||||||
|
@ -98,15 +108,19 @@
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sponsorSkipNoticeCloseButton {
|
.sponsorSkipNoticeRightButton {
|
||||||
margin-left: 0px;
|
margin-left: 7px !important;
|
||||||
margin-right: 0px;
|
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sponsorSkipNoticeCloseButton {
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.sponsorSkipNoticeButton {
|
.sponsorSkipNoticeButton {
|
||||||
background: none;
|
background: none;
|
||||||
color: #ffffff;
|
color: rgb(235, 235, 235);
|
||||||
border: none;
|
border: none;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
||||||
|
@ -119,7 +133,7 @@
|
||||||
.sponsorSkipMessage {
|
.sponsorSkipMessage {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #ffffff;
|
color: rgb(235, 235, 235);
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +173,6 @@
|
||||||
height: 18px;
|
height: 18px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
margin-left: 10px;
|
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
.voteButton:hover {
|
.voteButton:hover {
|
||||||
|
|
21
content.js
21
content.js
|
@ -901,7 +901,7 @@ function openSkipNotice(UUID){
|
||||||
noticeMessage.id = "sponsorSkipMessage" + UUID;
|
noticeMessage.id = "sponsorSkipMessage" + UUID;
|
||||||
noticeMessage.classList.add("sponsorSkipMessage");
|
noticeMessage.classList.add("sponsorSkipMessage");
|
||||||
noticeMessage.classList.add("sponsorSkipObject");
|
noticeMessage.classList.add("sponsorSkipObject");
|
||||||
noticeMessage.innerText = "SponsorBlock - Sponsor Skipped";
|
noticeMessage.innerText = "Sponsor Skipped";
|
||||||
|
|
||||||
//create the first column
|
//create the first column
|
||||||
logoColumn.appendChild(logoElement);
|
logoColumn.appendChild(logoElement);
|
||||||
|
@ -909,13 +909,19 @@ function openSkipNotice(UUID){
|
||||||
|
|
||||||
//add the x button
|
//add the x button
|
||||||
let closeButtonContainer = document.createElement("td");
|
let closeButtonContainer = document.createElement("td");
|
||||||
closeButtonContainer.className = "sponsorSkipNoticeRightSection"
|
closeButtonContainer.className = "sponsorSkipNoticeRightSection";
|
||||||
|
closeButtonContainer.style.top = "11px";
|
||||||
|
|
||||||
let hideButton = document.createElement("button");
|
let timeLeft = document.createElement("span");
|
||||||
hideButton.innerText = "X";
|
timeLeft.innerText = "closing in 7s";
|
||||||
hideButton.className = "sponsorSkipNoticeButton sponsorSkipNoticeCloseButton";
|
timeLeft.className = "sponsorSkipObject sponsorSkipNoticeTimeLeft";
|
||||||
|
|
||||||
|
let hideButton = document.createElement("img");
|
||||||
|
hideButton.src = chrome.extension.getURL("icons/close.png");
|
||||||
|
hideButton.className = "sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeCloseButton sponsorSkipNoticeRightButton";
|
||||||
hideButton.addEventListener("click", () => closeSkipNotice(UUID));
|
hideButton.addEventListener("click", () => closeSkipNotice(UUID));
|
||||||
|
|
||||||
|
closeButtonContainer.appendChild(timeLeft);
|
||||||
closeButtonContainer.appendChild(hideButton);
|
closeButtonContainer.appendChild(hideButton);
|
||||||
|
|
||||||
//add all objects to first row
|
//add all objects to first row
|
||||||
|
@ -954,7 +960,7 @@ function openSkipNotice(UUID){
|
||||||
|
|
||||||
let unskipButton = document.createElement("button");
|
let unskipButton = document.createElement("button");
|
||||||
unskipButton.innerText = chrome.i18n.getMessage("goBack");
|
unskipButton.innerText = chrome.i18n.getMessage("goBack");
|
||||||
unskipButton.className = "sponsorSkipNoticeButton";
|
unskipButton.className = "sponsorSkipObject sponsorSkipNoticeButton";
|
||||||
unskipButton.addEventListener("click", () => goBackToPreviousTime(UUID));
|
unskipButton.addEventListener("click", () => goBackToPreviousTime(UUID));
|
||||||
|
|
||||||
unskipContainer.appendChild(unskipButton);
|
unskipContainer.appendChild(unskipButton);
|
||||||
|
@ -962,10 +968,11 @@ function openSkipNotice(UUID){
|
||||||
//add don't show again button
|
//add don't show again button
|
||||||
let dontshowContainer = document.createElement("td");
|
let dontshowContainer = document.createElement("td");
|
||||||
dontshowContainer.className = "sponsorSkipNoticeRightSection";
|
dontshowContainer.className = "sponsorSkipNoticeRightSection";
|
||||||
|
dontshowContainer.style.bottom = "14px";
|
||||||
|
|
||||||
let dontShowAgainButton = document.createElement("button");
|
let dontShowAgainButton = document.createElement("button");
|
||||||
dontShowAgainButton.innerText = chrome.i18n.getMessage("Hide");
|
dontShowAgainButton.innerText = chrome.i18n.getMessage("Hide");
|
||||||
dontShowAgainButton.className = "sponsorSkipNoticeButton sponsorSkipNoticeCloseButton";
|
dontShowAgainButton.className = "sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeRightButton";
|
||||||
dontShowAgainButton.addEventListener("click", dontShowNoticeAgain);
|
dontShowAgainButton.addEventListener("click", dontShowNoticeAgain);
|
||||||
|
|
||||||
dontshowContainer.appendChild(dontShowAgainButton);
|
dontshowContainer.appendChild(dontShowAgainButton);
|
||||||
|
|
BIN
icons/close.png
Normal file
BIN
icons/close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
icons/upvote.png
BIN
icons/upvote.png
Binary file not shown.
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -33,6 +33,7 @@
|
||||||
"icons/PlayerUploadFailedIconSponsorBlocker256px.png",
|
"icons/PlayerUploadFailedIconSponsorBlocker256px.png",
|
||||||
"icons/upvote.png",
|
"icons/upvote.png",
|
||||||
"icons/downvote.png",
|
"icons/downvote.png",
|
||||||
|
"icons/close.png",
|
||||||
"icons/PlayerInfoIconSponsorBlocker256px.png",
|
"icons/PlayerInfoIconSponsorBlocker256px.png",
|
||||||
"icons/PlayerDeleteIconSponsorBlocker256px.png",
|
"icons/PlayerDeleteIconSponsorBlocker256px.png",
|
||||||
"popup.html"
|
"popup.html"
|
||||||
|
|
Loading…
Reference in a new issue