Improving file structure
First off I fixed the mess of files that were just dropped into the project folder; this would become an issue in the future as I kept on creating new files.
Creating the popup
I stared off by creating popup.html popup.css and popup.js
files after which I went back to the manifest.json to link the popup files but here I realized that the whole JSON file was broken because all the items were inside "action" this had not caused any issues so far but it could have led to many problems in the future. After fixing the JSON file I linked the popup files and added storage and scripting permissions to the extension which will be needed later.
Next I read a blog post of how to write HTML. Then I created a toggle switch for which I borrowed copied the css from w3schools.
Now for the toggle switch to work I had to make a few changes to youtweaks.js . Now it checks the browser storage to see if thumbnail blur is toggled on/off and also continuous checks to see if the toggle switch has been changed which accordingly turns on/off the blur.
Other changes
I started working on the next feature to stop the auto play of videos when you hover over them as the only purpose of this is to get you hooked onto a video before you even click on it. Which often results in wasted time.
While working on that feature I also managed to fix the blur so now it works everywhere on youtube but as a side effect it also blurs youtubers profile pictures which ill fix later.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.