Build a chrome extension to resume the browsing experience revolution

Build a chrome extension to upgrade browsing experience

 

View at Medium.com

 

 

 

However, here is a quick summary of the steps:

Create a javascript project

This is no requirements on the frameworks, developers can choose whichever prefered either plain javascript, react, angular or vue. I have been building extensions with jquery, angular and react. As long as the final package can be rendered as normal web page, it will work with chrome extension.

Set up the manifest

We need to have the manifest set up. Here are some of the configurations:

most importantly, we need to have the background, popup, options and content script configured as needed. To invoke the extension by keyboard, the browser and page actions need to be set up.

Build and Test out

You can load the extension locally using the `developer mode`

Note: if you are using react and react-scripts for packaging, you need to set up for the CSP policy:

Publish to the market

You need to create a developer account and publish using the chrome developer console.

 

 

View at Medium.com

Poetry dependency update

When updating the dependency version in pyproject.toml, for example

[tool.poetry.dependencies]
python = “^3.8.1”
streamlit = “^0.51”. ## ==> update to 0.56

If there is already existing a poetry.lock, poetry would throw

(streamlit-base) jackie@jackie streamlit-base % poetry install
Installing dependencies from lock file

[NonExistentKey]
‘Key “hashes” does not exist.’

install [–no-dev] [–dry-run] [-E|–extras EXTRAS] [–develop DEVELOP]

The reason being the hashes in the lock file doesn’t match the content with pyproject.tom.

The way to sort out this is to remove the lock file, then do the install again to generate a new file:

poetry install

pipenv

issue with pipenv

(base) ➜ lib git:(develop) ✗ python –version
dyld: Library not loaded: @executable_path/../.Python
Referenced from: /Users/jackie/.local/share/virtualenvs/streamlit-GdDAcdiW/bin/python
Reason: image not found
[1] 81477 abort python –version

(base) ➜ lib git:(develop) ✗ ..
dyld: Library not loaded: @executable_path/../.Python
Referenced from: /Users/jackie/.local/share/virtualenvs/streamlit-GdDAcdiW/bin/python
Reason: image not found

(base) ➜ streamlit git:(develop) ✗ make all-devel

dyld: Library not loaded: @executable_path/../.Python
Referenced from: /Users/jackie/.local/share/virtualenvs/streamlit-GdDAcdiW/bin/python
Reason: image not found

solution:
1. reinstall pipenv

(base) ➜ streamlit git:(develop) ✗ brew uninstall pipenv
Uninstalling /usr/local/Cellar/pipenv/2018.11.26_3… (1,483 files, 21.3MB)

(base) ➜ streamlit git:(develop) ✗ brew install pipenv

  1. clear old virtualenv

    (base) ➜ lib git:(develop) ✗ rm -rf pipenv --venv
    (base) ➜ lib git:(develop) ✗ pipenv --venv
    No virtualenv has been created for this project yet!
    Aborted!
    (base) ➜ lib git:(develop) ✗ pipenv --rm
    No virtualenv has been created for this project yet!
    Aborted!

  2. recreate new env with specific version (exist on local OS)

    (base) ➜ lib git:(develop) ✗ pipenv --python 3.7
    Warning: the environment variable LANG is not set!
    We recommend setting this in ~/.profile (or equivalent) for proper expected behavior.
    Creating a virtualenv for this project…