- Every single Chrome extension needs a manifest.json file.
- The manifest.json file must be placed in the root of folder, all other structure in the extension is up to the developer.
- The manifest.json file is the only required file for a Chrome extension.
- Only required keys in the manifest are: manifest_version, name, version.
- Comments // are allowed during development but must be removed in the production version (uploaded to the Chrome Web Store).
When to reload the extension The following table shows which components need to be reloaded to see changes:
| Extension Component | Requires Extension Reload |
|---|---|
| The manifest | Yes |
| Service worker | Yes |
| Content scripts | Yes (plus the host page) |
| The popup | No |
| Options page | No |
- Create an
.envfile and put your environment variables in there in the format MY_ENV_VARIABLE=VARIABLE_VALUE (no quote marks, no spaces, no additional formatting) pip install dot-env- In the Python file where you want to use the actual environment variables:
from dotenv import load_dotenv
load_dotenv()
# And then wherever you want to actually use the environment variable:
os.getenv('MY_ENV_VARIABLE')
- Rename the repo through clicking "Settings" on the page for the repo.
- All commits and other things will be auto-redirected to this new repo, BUT:
- For the local copy, rename it as usual (mv old_name new_name) AND
- git remote set-url origin git@github.com:username/the-entire-new-url
- Make a minor change locally and do a test commit to ensure the rename was successful and everything works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # full, working project at: https://github.com/banflam/chess-trainer/tree/main | |
| import csv | |
| import pathlib | |
| import random | |
| import chess | |
| import time | |
| import argparse | |
| import sys | |
| def show_board(board: chess.Board) -> None: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def crackle_pop(): | |
| for num in range(1, 101): | |
| if num % 15 == 0: | |
| print("CracklePop") | |
| elif num % 3 == 0: | |
| print("Crackle") | |
| elif num % 5 == 0: | |
| print("Pop") | |
| else: | |
| print(num) |