Are you always procrastinating? Yeah me too, procrastinating often leads to an increase in stress and anxiety, as well as the likelihood of making errors when rushing toward the completion of a project. In worst-case scenarios, putting things off until the last minute can cause you to miss an important deadline. We do this a lot as programmers so I decided to create something to help us to stop procrastinating and be more productive.
- Make sure to change the name of your folder when you clone the repo
- Click the ︙ dots on the top right
- Click More Tools
- Click Extensions
- Make sure you have Developer mode turned on
- Next Click Pack Extension
- Choose the folder where you have the extension
- Then click pack extension
- After those steps click pack extension you can now click Load unpacked
- Then look for the folder should you chose
After you have done all of these steps you should be able to click the plugin icon to find the extension and the sites you have blocked of you shouldnt be able to go to.
Adding links to website you would like to block
switch (window.location.hostname) {
case 'www.youtube.com':
document.head.innerHTML = generateSTYLING()
document.body.innerHTML = generateHTML('youtube');
break;
//Add more links below
Giving Permission and Editing Extension Name
{
"manifest_version": 2,
"name": "Better Person",
"version": "1.0",
"description": "Become a better person",
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["Content.js"]
}
],
"browser_action": {
"default_popup": "Popup.html",
"default_title": "Better Person"
},
"permissions": [
"https://www.youtube.com/*",
]
}
Customizing your popup
<!DOCTYPE html>
<html>
<head> </head>
<body>
<div class="main">
<h1>Better Person</h1>
<hr />
<span>
Current Blocked Sites:
<span style="color: #ff0100;">youtube</span>
</span>
</div>
</body>
</html>