Merge pull request #576 from ajayyy/padding

Fix popup padding on YouTube page
This commit is contained in:
Ajay Ramachandran 2020-12-15 14:25:04 -05:00 committed by GitHub
commit 3b07bc638a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -18,7 +18,7 @@
flex-flow: column nowrap;
align-items: center;
width: 330px;
margin: 22px;
padding: 22px;
text-align: center;
}

View file

@ -4,7 +4,7 @@
<link id="sponsorBlockStyleSheet" rel="stylesheet" type="text/css" href="popup.css">
</head>
<body style="margin: 0; min-width: 320px; background: var(--sb-main-bg-color);">
<body style="margin: auto; width: 374px; background: var(--sb-main-bg-color);">
<div id="sponsorblockPopup" class="sponsorBlockPageBody preload">
<div class="logoText bottomSpace">
<img src="icons/IconSponsorBlocker256px.png" height="40px" id="sponsorBlockPopupLogo">
@ -129,13 +129,13 @@
<span id="sponsorTimeSavedEndWord">__MSG_minsLower__</span></b>).
</div>
<footer id="sbFooter">
<a href="https://sponsor.ajay.app" target="_blank" rel="noopener">Website</a> |
<a href="https://sponsor.ajay.app" target="_blank" rel="noopener">__MSG_website__</a> |
<a href="https://sponsor.ajay.app/stats" target="_blank" rel="noopener">__MSG_viewLeaderboard__</a> |
<a href="https://github.com/ajayyy/SponsorBlock" target="_blank" rel="noopener">GitHub</a>
<br/>
<a href="https://discord.gg/QnmVMpU" target="_blank" rel="noopener">Discord</a> |
<a href="https://matrix.to/#/+sponsorblock:ajay.app" target="_blank" rel="noopener">Matrix</a> |
<a id="helpButton" href="#">__MSG_help__</a>
<a id="helpButton" style="cursor: pointer;">__MSG_help__</a>
</footer>
<button id="showNoticeAgain" style="display: none" class="dangerButton popupElement">__MSG_showNotice__</button>

View file

@ -33,7 +33,7 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) {
chrome.runtime.openOptionsPage();
return;
case "openHelp":
window.open(chrome.runtime.getURL('help/index_en.html'));
chrome.tabs.create({url: chrome.runtime.getURL('help/index_en.html')});
return;
case "sendRequest":
sendRequestToCustomServer(request.type, request.url, request.data).then(async (response) => {

View file

@ -375,7 +375,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
const sponsorTimeButton = document.createElement("button");
sponsorTimeButton.className = "segmentTimeButton popupElement";
const prefix = chrome.i18n.getMessage("category_" + segmentTimes[i].category) + ": ";
const prefix = utils.shortCategoryName(segmentTimes[i].category) + ": ";
let extraInfo = "";
if (segmentTimes[i].hidden === SponsorHideType.Downvoted) {

View file

@ -206,7 +206,7 @@ class Utils {
getLocalizedMessage(text: string): string | false {
const valNewH = text.replace(/__MSG_(\w+)__/g, function(match, v1) {
return v1 ? chrome.i18n.getMessage(v1) : "";
return v1 ? chrome.i18n.getMessage(v1).replace("\n", "<br/>") : "";
});
if(valNewH != text) {