A chrome extension help to import pkg in devtools
Import Pkg In Devtools Extension
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)
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":[]}]}
Similar Extensions
Plugins 14 297 ★ 1.36MiB
ProseMirror Developer Tools 14 5 ★ 164KiB
Python Tutor - Wiingy 14 3 ★ 10.28KiB
HTML Validator 14 37 ★ 2.5MiB
Initab 14 95 ★ 12.93MiB
React Developer Tools 14 1576 ★ 1.56MiB
Chrome History Analysis to CSV 14 3 ★ 19.12KiB
Easy Extension Manager 14 6 ★ 100KiB
UX Enhancer for GitLab 14 7 ★ 115KiB
gRPC Web Devtools 14 5 ★ 999KiB
JPT - ChatGPT Code Interpreter 14 8 ★ 54.8MiB
F12 14 3 ★ 3.54MiB
Save Rendered HTML 14 3 ★ 164KiB
React code finder 14 5 ★ 2.95MiB
Lexical Developer Tools 14 1 ★ 238KiB
cocopy 14 7 ★ 2.14MiB
GitHub Jira Integration 14 6 ★ 96.29KiB
Date Countdown Timer 14 3 ★ 299KiB
TypeScript Console 14 3 ★ 7.45MiB
SuperExtender.io 14 0 ★ 132KiB
Simple User Scripts 14 0 ★ 94.92KiB
Chromium Open IDE 14 0 ★ 1.32MiB
Bolt 14 3 ★ 1.17MiB
Markdown Preview Plus 14 234 ★ 2.24MiB