Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
同じコマンドをChromeのデベロッパーコンソールに再入力するのにうんざりしています。ローカルマシンに保存したスクリプトをロードすることはできますか?
file:// URLで開発者ツールを実行している場合は、次のようにすることができます。
s = document.createElement('script'); s.src = 'file://path/to/script.js'; document.body.appendChild(s);
回避策として、頻繁に繰り返されるコードスニペットを開発者ツールに貼り付けることもできます。
@PaulIrishがコメントで指摘したように、ChromeSnippetsはこの問題の解決策です。以下のスクリーンショットは、この記事の執筆時点でChromeの開発者ツール内でスニペットを検索したものです。スニペットを実行するには、左の図のスニペットペインでそのエントリを右クリックし、[実行]を選択します。
Snippets