A chrome extension help to import pkg in devtools

Latest Version

Version
1.0.4
Update
November 24, 2024
Size
18.49KiB
Developer
Category
Users
14
Rating
0 ★
Manifest Version
3
Web Store Status
Languages Support
中文 (简体)
See more
Permissions
DeclarativeNetRequest
DeclarativeNetRequestFeedback
See more

Import Pkg In Devtools Extension

A chrome plugin that helps import npm packages into devtools for easier debugging. The package contents are attached to the window.lucky variable by default.You can also specify to mount it on a different global variable. You also can specify different package version.

Feature:
- Import npm package into devtool
- Specify package version. (default latest version)
- Specify attached gloabal variable. (default window.lucky)
- Multiple Instance. (by specify different global variable)

Example: In Chrome devtools
- Basic:
$npm('dayjs') // you can use window.lucky
- Specify package version
$npm('[email protected]') //
- Specify attached gloabal variable
$npm('[email protected]', 'MyDayJs') // you can use window.MyDayJs
- Multiple Instance
$npm('[email protected]', 'MyDayJs1') // you can use window.MyDayJs1
$npm('[email protected]', 'MyDayJs2') // you can use window.MyDayJs2

Notice: since this chrome extension old version may not work in some website's (eg. npmjs.com) devtools since these website has some csp policy. To workaround this, we add a feature to remove the csp policy by default. Currently, this feature is not able to switch on/off now, but i may release it as soon as possible


chrome 插件,帮助将 npm 包引入到 devtools 中,便于调试。包内容默认会挂到 window.lucky变量上。
比如:
$npm('dayjs') // 则可以使用 lucky().format('YYYY-MM-DD')
$npm('number-precision') // 则可以使用 lucky.times(1, 2)

也可以自己指定名字,比如:

$npm('dayjs', 'dayjs') // 则可以使用 dayjs().format('YYYY-MM-DD')
$npm('number-precision', 'NP') // 则可以使用 NP.times(1, 2)
Read more

Source Manifest.json

{
"update_url": "https://clients2.google.com/service/update2/crx",
"description":"A chrome extension help to import pkg in devtools",
"version":"1.0.4",
"manifest_version":3,
"name":"Import Pkg In Devtools",
"icons":{"128":"icon-128.png"},
"options_page":"options.html",
"background":{"service_worker":"background.bundle.js"},
"content_scripts":[{"world":"MAIN",
"matches":["http://*/*",
"https://*/*",
""],
"js":["contentScript.bundle.js"]}],
"declarative_net_request":{"rule_resources":[{"id":"remove_csp",
"enabled":true,
"path":"rules/remove_csp.json"}]},
"permissions":["declarativeNetRequest",
"declarativeNetRequestFeedback"],
"host_permissions":[""],
"web_accessible_resources":[{"resources":["icon-128.png",
"icon-32.png"],
"matches":[]}]}
Read more

Similar Extensions

icon

Plugins Extension · Productivity 14 297 ★ 1.36MiB

icon

ProseMirror Developer Tools Extension · Developer Tools 14 5 ★ 164KiB

icon

Python Tutor - Wiingy Extension · Productivity 14 3 ★ 10.28KiB

icon

HTML Validator Extension · Developer Tools 14 37 ★ 2.5MiB

icon

Initab Extension · Developer Tools 14 95 ★ 12.93MiB

icon

React Developer Tools Extension · Developer Tools 14 1576 ★ 1.56MiB

icon

Chrome History Analysis to CSV Extension · Productivity 14 3 ★ 19.12KiB

icon

Easy Extension Manager Extension · Productivity 14 6 ★ 100KiB

icon

UX Enhancer for GitLab Extension · Developer Tools 14 7 ★ 115KiB

icon

gRPC Web Devtools Extension · Developer Tools 14 5 ★ 999KiB

icon

JPT - ChatGPT Code Interpreter Extension · Developer Tools 14 8 ★ 54.8MiB

icon

F12 Extension · Developer Tools 14 3 ★ 3.54MiB

icon

Save Rendered HTML Extension · Developer Tools 14 3 ★ 164KiB

icon

React code finder Extension · Developer Tools 14 5 ★ 2.95MiB

icon

Lexical Developer Tools Extension · Developer Tools 14 1 ★ 238KiB

icon

cocopy Extension · Productivity 14 7 ★ 2.14MiB

icon

GitHub Jira Integration Extension · Productivity 14 6 ★ 96.29KiB

icon

Date Countdown Timer Extension · Productivity 14 3 ★ 299KiB

icon

TypeScript Console Extension · Developer Tools 14 3 ★ 7.45MiB

icon

SuperExtender.io Extension · Productivity 14 0 ★ 132KiB

icon

Simple User Scripts Extension · Productivity 14 0 ★ 94.92KiB

icon

Chromium Open IDE Extension · Developer Tools 14 0 ★ 1.32MiB

icon

Bolt Extension · Developer Tools 14 3 ★ 1.17MiB

icon

Markdown Preview Plus Extension · Productivity 14 234 ★ 2.24MiB