Authors: Sithu Khant
Last update: Wed Jun 5, 2024
Note: Create a new branch, please don't on the
main
branch. And make pull requrest.
For example, the new course name is New Course in 2024: Zero To Mastery
and the link is https://zerotomastery.io/courses/new-course/
. To add this new course:
Open course-details.json
and add like this at the bottom of the course-details.json
[
...others course list,
{
"name": "New Course in 2024: Zero To Mastery",
"link": "https://zerotomastery.io/courses/chatgpt-code-interpreter-guide/"
}
]
That is all!
You can't add extra words in the object of course-details.json
.
For example:
NAME | COURSE NAME |
---|---|
Actual name: | New Course in 2024: Zero To Mastery |
Your name: | Bla Bla Bla New Course in 2024: Zero To Mastery |
Becuase how my codes work is that it will loop through every single words of Your name
and check whether that word contains in the Actual name
word list.
My code will automatically remove:
:
(
and)
- years (2024, 2025, ...)
in
But you can leave some words in Your name
string.
For example:
NAME | COURSE NAME |
---|---|
Actual name: | Bla Bla Bla New Course in 2024: Zero To Mastery |
Your name: | New Course in 2024: Zero To Mastery |
My advice is better not to leave words. It is okay you leave one or two words. But if it is more than three words, there might be conflict between names.
-
Open
manifest.json
file, updateversion
name with the current date.{ ...others, "version": "2024.6.5", ...others, }
-
Add version name and list changes you made under
Version List
Select these files and folders in your file manager
background.js
course-details.js
css/
icons/
LICENSE
manifest.json
popup/
scripts/
And compress them to create zip file. Rename that file into this format ztm-extension-chrome-2024.6.5
, 2024.6.5
is the version name.
Extract the previous zipped file version.
The purpose of doing this is not to confuse with the actual codebase. You should work on the unzipped folder of the chrome version to create the Firefox version.
Open manifest.json
file:
-
Replace this part:
{ ...others, "background": { "service_worker": "background.js" }, ...others }
with:
{ ...others, "background": { "scripts": ["background.js"], "service_worker": "background.js" }, ...others }
-
Add this part:
{ ...others, "browser_specific_settings": { "gecko": { "id": "[email protected]", "strict_min_version": "42.0" } }, ...others, }
See the complete manifest.json
file example here. Link
- Replece the
chrome
object name withbrowser
in every file. Tip: if you use VS Code, you can easily replace using the Search tab. It will automatically change all the object names.
-
Create
.xpi
zip version.- You can install with
brew
if you don't have7zip
brew install p7zip
- Open your terminal and type
Replace
7z u ./ztm-extension-firefox.2024.6.5.xpi * -r
2024.6.5
with the current date.
- You can install with
-
After you get the
ztm-extension-firefox-2024.6.5.xpi
file, you may delete firefox version folder.
I normally added these two new versions (for Firefox and Chrome) into utils/versions/
folder. Delete the old version files and add that new versions. I encourage you to do the same if you can.
After you finish all the steps, please create a pull request. We will review and merge it.
Go to the Releases
page, click Draft a new release
, and follow these steps: