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
5 changed files with 7 additions and 7 deletions

View File

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

View File

@@ -4,7 +4,7 @@
<link id="sponsorBlockStyleSheet" rel="stylesheet" type="text/css" href="popup.css"> <link id="sponsorBlockStyleSheet" rel="stylesheet" type="text/css" href="popup.css">
</head> </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 id="sponsorblockPopup" class="sponsorBlockPageBody preload">
<div class="logoText bottomSpace"> <div class="logoText bottomSpace">
<img src="icons/IconSponsorBlocker256px.png" height="40px" id="sponsorBlockPopupLogo"> <img src="icons/IconSponsorBlocker256px.png" height="40px" id="sponsorBlockPopupLogo">
@@ -129,13 +129,13 @@
<span id="sponsorTimeSavedEndWord">__MSG_minsLower__</span></b>). <span id="sponsorTimeSavedEndWord">__MSG_minsLower__</span></b>).
</div> </div>
<footer id="sbFooter"> <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://sponsor.ajay.app/stats" target="_blank" rel="noopener">__MSG_viewLeaderboard__</a> |
<a href="https://github.com/ajayyy/SponsorBlock" target="_blank" rel="noopener">GitHub</a> <a href="https://github.com/ajayyy/SponsorBlock" target="_blank" rel="noopener">GitHub</a>
<br/> <br/>
<a href="https://discord.gg/QnmVMpU" target="_blank" rel="noopener">Discord</a> | <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 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> </footer>
<button id="showNoticeAgain" style="display: none" class="dangerButton popupElement">__MSG_showNotice__</button> <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(); chrome.runtime.openOptionsPage();
return; return;
case "openHelp": case "openHelp":
window.open(chrome.runtime.getURL('help/index_en.html')); chrome.tabs.create({url: chrome.runtime.getURL('help/index_en.html')});
return; return;
case "sendRequest": case "sendRequest":
sendRequestToCustomServer(request.type, request.url, request.data).then(async (response) => { 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"); const sponsorTimeButton = document.createElement("button");
sponsorTimeButton.className = "segmentTimeButton popupElement"; sponsorTimeButton.className = "segmentTimeButton popupElement";
const prefix = chrome.i18n.getMessage("category_" + segmentTimes[i].category) + ": "; const prefix = utils.shortCategoryName(segmentTimes[i].category) + ": ";
let extraInfo = ""; let extraInfo = "";
if (segmentTimes[i].hidden === SponsorHideType.Downvoted) { if (segmentTimes[i].hidden === SponsorHideType.Downvoted) {

View File

@@ -206,7 +206,7 @@ class Utils {
getLocalizedMessage(text: string): string | false { getLocalizedMessage(text: string): string | false {
const valNewH = text.replace(/__MSG_(\w+)__/g, function(match, v1) { 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) { if(valNewH != text) {