mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Expand username textbox when editing.
This commit is contained in:
parent
df84f328a7
commit
1afabb934f
3 changed files with 18 additions and 6 deletions
|
@ -7,7 +7,7 @@
|
|||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#sponsorblockPopup {
|
||||
|
@ -329,6 +329,12 @@ label>p, #disableExtension>p, #usernameValue, #usernameElement > div > p,#sponso
|
|||
border: white 1px solid;
|
||||
color: var(--sb-main-fg-color);
|
||||
width: calc(100% - 24px);
|
||||
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#setUsername.SBExpanded {
|
||||
width: 200%;
|
||||
}
|
||||
|
||||
/* footer */
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sponsorTimesContributionsContainer" style="display: none">
|
||||
<div id="sponsorTimesContributionsContainer" class="hidden">
|
||||
<div>
|
||||
<p>__MSG_soFarUHSubmited__</p>
|
||||
<span id="sponsorTimesContributionsDisplay">
|
||||
|
|
14
src/popup.ts
14
src/popup.ts
|
@ -188,8 +188,8 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||
} else {
|
||||
PageElements.sponsorTimesContributionsDisplayEndWord.innerText = chrome.i18n.getMessage("Segment");
|
||||
}*/
|
||||
PageElements.sponsorTimesContributionsDisplay.innerText = Config.config.sponsorTimesContributed;
|
||||
PageElements.sponsorTimesContributionsContainer.style.display = "flex";
|
||||
PageElements.sponsorTimesContributionsDisplay.innerText = Config.config.sponsorTimesContributed.toLocaleString();
|
||||
PageElements.sponsorTimesContributionsContainer.classList.remove("hidden");
|
||||
|
||||
//get the userID
|
||||
let userID = Config.config.userID;
|
||||
|
@ -206,7 +206,7 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||
PageElements.sponsorTimesViewsDisplayEndWord.innerText = chrome.i18n.getMessage("Segment");
|
||||
}
|
||||
|
||||
PageElements.sponsorTimesViewsDisplay.innerText = viewCount;
|
||||
PageElements.sponsorTimesViewsDisplay.innerText = viewCount.toLocaleString();
|
||||
PageElements.sponsorTimesViewsContainer.style.display = "unset";
|
||||
}
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||
PageElements.sponsorTimesSkipsDoneEndWord.innerText = chrome.i18n.getMessage("Segment");
|
||||
}
|
||||
|
||||
PageElements.sponsorTimesSkipsDoneDisplay.innerText = Config.config.skipCount;
|
||||
PageElements.sponsorTimesSkipsDoneDisplay.innerText = Config.config.skipCount.toLocaleString();
|
||||
PageElements.sponsorTimesSkipsDoneContainer.style.display = "unset";
|
||||
}
|
||||
|
||||
|
@ -856,8 +856,11 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||
|
||||
PageElements.setUsernameContainer.style.display = "none";
|
||||
PageElements.setUsername.style.display = "flex";
|
||||
PageElements.setUsername.classList.add("SBExpanded");
|
||||
|
||||
PageElements.setUsernameStatusContainer.style.display = "none";
|
||||
|
||||
PageElements.sponsorTimesContributionsContainer.classList.add("hidden");
|
||||
}
|
||||
|
||||
//submit the new username
|
||||
|
@ -873,9 +876,12 @@ async function runThePopup(messageListener?: MessageListener) {
|
|||
PageElements.usernameInput.style.display = "none";
|
||||
|
||||
PageElements.setUsernameContainer.style.removeProperty("display");
|
||||
PageElements.setUsername.classList.remove("SBExpanded");
|
||||
PageElements.usernameValue.innerText = PageElements.usernameInput.value;
|
||||
|
||||
PageElements.setUsernameStatusContainer.style.display = "none";
|
||||
|
||||
PageElements.sponsorTimesContributionsContainer.classList.remove("hidden");
|
||||
} else {
|
||||
PageElements.setUsernameStatus.innerText = utils.getErrorMessage(response.status);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue