diff --git a/content.css b/content.css index 6126768a..c4e8e7bf 100644 --- a/content.css +++ b/content.css @@ -1,4 +1,4 @@ -.playerButton { +.playerButtonImage { height: 60%; top: 0; bottom: 0; @@ -6,6 +6,10 @@ margin: auto; } +.playerButton { + vertical-align: top; +} + .sponsorSkipObject { font-family: 'Source Sans Pro', sans-serif; } diff --git a/content.js b/content.js index 1fdccecc..7b5f32dd 100644 --- a/content.js +++ b/content.js @@ -117,7 +117,6 @@ function videoIDChange(id) { function sponsorsLookup(id) { v = document.querySelector('video') // Youtube video player - let xmlhttp = new XMLHttpRequest(); //check database for sponsor times sendRequestToServer('GET', "/api/getVideoSponsorTimes?videoID=" + id, function(xmlhttp) { @@ -193,13 +192,13 @@ function addPlayerControlsButton() { let startSponsorButton = document.createElement("button"); startSponsorButton.id = "startSponsorButton"; - startSponsorButton.className = "ytp-button"; + startSponsorButton.className = "ytp-button playerButton"; startSponsorButton.setAttribute("title", "Sponsor Starts Now"); startSponsorButton.addEventListener("click", startSponsorClicked); let startSponsorImage = document.createElement("img"); startSponsorImage.id = "startSponsorImage"; - startSponsorImage.className = "playerButton"; + startSponsorImage.className = "playerButtonImage"; startSponsorImage.src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png"); //add the image to the button @@ -269,7 +268,7 @@ function addSubmitButton() { //make a submit button let submitButton = document.createElement("button"); submitButton.id = "submitButton"; - submitButton.className = "ytp-button"; + submitButton.className = "ytp-button playerButton"; submitButton.setAttribute("title", "Submit Sponsor Times"); submitButton.addEventListener("click", submitSponsorTimes); //hide it at the start @@ -277,7 +276,7 @@ function addSubmitButton() { let submitImage = document.createElement("img"); submitImage.id = "submitButtonImage"; - submitImage.className = "playerButton"; + submitImage.className = "playerButtonImage"; submitImage.src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker256px.png"); //add the image to the button diff --git a/manifest.json b/manifest.json index f0a4ba7b..16797449 100644 --- a/manifest.json +++ b/manifest.json @@ -30,7 +30,8 @@ "permissions": [ "tabs", "storage", - "notifications" + "notifications", + "https://sponsor.ajay.app/*" ], "browser_action": { "default_title": "SponsorBlock", @@ -49,5 +50,11 @@ "128": "icons/LogoSponsorBlocker128px.png", "256": "icons/LogoSponsorBlocker256px.png" }, + "browser_specific_settings": { + "gecko": { + "id": "sponsorBlocker@ajay.app", + "strict_min_version": "42.0" + } + }, "manifest_version": 2 }