diff --git a/background.js b/background.js index 55729fff..96e5a309 100644 --- a/background.js +++ b/background.js @@ -57,6 +57,19 @@ chrome.runtime.onMessage.addListener(function (request, sender, callback) { } }); +//add help page on install +chrome.runtime.onInstalled.addListener(function (object) { + chrome.storage.sync.get(["shownInstallPage"], function(result) { + let shownInstallPage = result.shownInstallPage; + if (shownInstallPage == undefined || !shownInstallPage) { + //open up the install page + chrome.tabs.create({url: chrome.extension.getURL("/help/index.html")}); + + //save that this happened + chrome.storage.sync.set({shownInstallPage: true}); + } + }); +}); //gets the sponsor times from memory function getSponsorTimes(videoID, callback) { diff --git a/firefox_manifest.json b/firefox_manifest.json index 3948c08a..e503a8e8 100644 --- a/firefox_manifest.json +++ b/firefox_manifest.json @@ -31,7 +31,9 @@ "icons/downvote.png", "icons/PlayerInfoIconSponsorBlocker256px.png", "icons/PlayerDeleteIconSponsorBlocker256px.png", - "popup.html" + "popup.html", + "help/index.html", + "help/style.css" ], "permissions": [ "tabs", diff --git a/help/index.html b/help/index.html new file mode 100644 index 00000000..28a2be0b --- /dev/null +++ b/help/index.html @@ -0,0 +1,122 @@ +
+Created By Ajay Ramachandran
+ ++ Thanks for installing SponsorBlock. Here are some quick tips for getting started. Please join the Discord if you have any questions or suggestions. +
+ +
+
+
+
+
+ Come contribute, make some suggestions and help out in the Discord: https://discord.gg/QnmVMpU
+
+
+
+
+
+ Videos will automatically be skipped if they are found in the database. You can open the popup by clicking the extension icon to get a preview of what they are.
+
+
+
+ Whenever you skip a video, you will get a notice allowing you to vote on that submission. If it worked, upvote it! You can also vote in the popup.
+

+
+
+
+
+ Submitting can either be done in the popup by hitting the "Sponsorship Starts Now" button or in the video player with the buttons on the player.
+
+
+
+
+ Clicking the play button indicated the start of a sponsorship section and clicking the stop icon indicates the end. You can prepare multiple sponsors before hitting submit. Clicking the upload button will submit. Clicking the garbage can will delete.
+
+
+
+
+
+ If you messed up, you can edit or delete your sponsor times in the popup or in the info menu (by hitting the info icon).
+
+
+ There are hotkeys if you want to use them. You must be focused on the YouTube player to use them. Press the semicolon key to indicate the start/end of a sponsor segment and click the appostrophe to submit. +
+ ++ All player buttons can be hidden in the options. +
+ ++ The database is public and available at https://sponsor.ajay.app/database.db. The source code is freely available. So, even if something happens to me, your submissions are not lost. +
+ ++ See https://sponsor.ajay.app/news. +
+ ++ Ask on Discord or make an Issue on GitHub. I am happy to hear suggestions or improvements you want. You may also contribute code or graphics if you would like. +
+ +The awesome Invidious API is used to grab the time the video was published.
+ +Some icons made by Gregor Cresnar from www.flaticon.com and are licensed by CC 3.0 BY
+ +Some icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY
+ +