mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
CC
This commit is contained in:
parent
bcc927f21a
commit
8c7d749f11
1 changed files with 10 additions and 10 deletions
20
content.js
20
content.js
|
@ -486,7 +486,7 @@ function addPlayerControlsButton() {
|
|||
let startSponsorButton = document.createElement("button");
|
||||
startSponsorButton.id = "startSponsorButton";
|
||||
startSponsorButton.className = "ytp-button playerButton";
|
||||
startSponsorButton.setAttribute("title", chrome.i18n.getMessage("SponsorStart"));
|
||||
startSponsorButton.setAttribute("title", chrome.i18n.getMessage("sponsorStart"));
|
||||
startSponsorButton.addEventListener("click", startSponsorClicked);
|
||||
|
||||
let startSponsorImage = document.createElement("img");
|
||||
|
@ -578,7 +578,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) {
|
|||
if (showStartSponsor) {
|
||||
showingStartSponsor = true;
|
||||
document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png");
|
||||
document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("SponsorStart"));
|
||||
document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("sponsorStart"));
|
||||
|
||||
if (document.getElementById("startSponsorImage").style.display != "none" && uploadButtonVisible && !hideInfoButtonPlayerControls) {
|
||||
document.getElementById("submitButton").style.display = "unset";
|
||||
|
@ -589,7 +589,7 @@ function changeStartSponsorButton(showStartSponsor, uploadButtonVisible) {
|
|||
} else {
|
||||
showingStartSponsor = false;
|
||||
document.getElementById("startSponsorImage").src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker256px.png");
|
||||
document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("SponsorEND"));
|
||||
document.getElementById("startSponsorButton").setAttribute("title", chrome.i18n.getMessage("sponsorEND"));
|
||||
|
||||
//disable submit button
|
||||
document.getElementById("submitButton").style.display = "none";
|
||||
|
@ -777,8 +777,8 @@ function clearSponsorTimes() {
|
|||
let sponsorTimes = result[sponsorTimeKey];
|
||||
|
||||
if (sponsorTimes != undefined && sponsorTimes.length > 0) {
|
||||
let confirmMessage = chrome.i18n.getMessage("ClearThis") + getSponsorTimesMessage(sponsorTimes);
|
||||
confirmMessage += chrome.i18n.getMessage("ConfirmMSG")
|
||||
let confirmMessage = chrome.i18n.getMessage("clearThis") + getSponsorTimesMessage(sponsorTimes);
|
||||
confirmMessage += chrome.i18n.getMessage("confirmMSG")
|
||||
if(!confirm(confirmMessage)) return;
|
||||
|
||||
//clear the sponsor times
|
||||
|
@ -859,7 +859,7 @@ function openSkipNotice(UUID){
|
|||
buttonContainer.setAttribute("align", "center");
|
||||
|
||||
let goBackButton = document.createElement("button");
|
||||
goBackButton.innerText = chrome.i18n.getMessage("GoBack");
|
||||
goBackButton.innerText = chrome.i18n.getMessage("goBack");
|
||||
goBackButton.className = "sponsorSkipButton";
|
||||
goBackButton.addEventListener("click", () => goBackToPreviousTime(UUID));
|
||||
|
||||
|
@ -924,12 +924,12 @@ function afterDownvote(UUID) {
|
|||
//add thanks for voting text
|
||||
let thanksForVotingText = document.createElement("p");
|
||||
thanksForVotingText.id = "sponsorTimesThanksForVotingText";
|
||||
thanksForVotingText.innerText = chrome.i18n.getMessage("VOTED");
|
||||
thanksForVotingText.innerText = chrome.i18n.getMessage("Voted");
|
||||
|
||||
//add extra info for voting
|
||||
let thanksForVotingInfoText = document.createElement("p");
|
||||
thanksForVotingInfoText.id = "sponsorTimesThanksForVotingInfoText";
|
||||
thanksForVotingInfoText.innerText = chrome.i18n.getMessage("HitGoBack");
|
||||
thanksForVotingInfoText.innerText = chrome.i18n.getMessage("hitGoBack");
|
||||
|
||||
//add element to div
|
||||
document.getElementById("sponsorTimesVoteButtonsContainer" + UUID).appendChild(thanksForVotingText);
|
||||
|
@ -984,10 +984,10 @@ function vote(type, UUID) {
|
|||
}
|
||||
} else if (response.successType == 0) {
|
||||
//failure: duplicate vote
|
||||
addLoadingInfo(chrome.i18n.getMessage("VOTE_FAIL"), UUID)
|
||||
addLoadingInfo(chrome.i18n.getMessage("voteFAIL"), UUID)
|
||||
} else if (response.successType == -1) {
|
||||
if (response.statusCode == 502) {
|
||||
addLoadingInfo(chrome.i18n.getMessage("ServerDown"), UUID)
|
||||
addLoadingInfo(chrome.i18n.getMessage("serverDown"), UUID)
|
||||
} else {
|
||||
//failure: unknown error
|
||||
addLoadingInfo((chrome.i18n.getMessage("connectionError") + response.statusCode, UUID)
|
||||
|
|
Loading…
Reference in a new issue