絞り込み条件を変更する
検索条件を絞り込む

すべてのカテゴリ

12 件中 1 - 12 件表示
カバー画像

メッセージ

送信 コンテンツスクリプトからバックグラウンドスクリプトresponse = await browser.runtime.sendMessage(値) バックグラウンドスクリプトからコンテンツスクリプト  アクティブタブmanifest.json"permissions": ["activeTab"]response = await browser.tabs.sendMessage(アクティブタブのID, 値) 指定できる値プリミティブ値文字列、数値, BigInt、真偽値、null, undefined組み込みオブジェクトArray, Object, Date, RegExp, Map, Setバイナリデータ・配列バッファBlob, FileArrayBuffer, DataViewUint8Array, Float32Array受信browser.runtime.onMessage.addListener((メッセージ) => {  処理});値を返すbrowser.runtime.onMessage.addListener((メッセージ, sender, sendResponse) => {  sendResponse(値);});
0
カバー画像

バックグラウンドスクリプト

manifest.json  "background": {    "scripts": ["background/スクリプト.js"],    "type": "module"   },
0
カバー画像

ツールバーのアイコン

クリックしたらポップアップ表示する manifest.json"action": {  "default_title": "タイトル"  "default_icon": "32": "ツールバーに表示される32×32pxの画像の相対パス",  "default_popup": "popup/index.html"} 構成  popup/index.htmlpopup/style.csspopup/script.jspopup/index.html<html><head>  ...  <link rel="stylesheet" href="style.css" /></head><body>  ...  <script type="module" src="script.js"></script></body></html>クリックしたら関数を実行browser.action.onClicked.addListener(関数);アイコンを変更画像browser.action.setIcon({  path: { サイズ: icons/画像ファイル },  tabId: タブ.id});タイトルbrowser.action.setTitle({  title: "タイトル",  tabId: タブ.id});
0
カバー画像

サイドバー

manifest.json"sidebar_action": {  "default_icon": {    "32": "icons/icon-32.png"  },  "default_title": "サイドバーの画像をホバーしたときに表示される文字列",  "default_panel": "sidebar/サイドバーのページ.html"}構成sidebar/ページ.htmlsidebar/style.csssidebar/script.js
0
カバー画像

ページ

manifest.json"permissions": ["tabs"]移動browser.tabs.update({url: "URL"});新しいタブを作成browser.tabs.create(タブの設定); タブの設定{キー1: 値1, ...}タブをアクティブにしないactive: falseURLを指定url: "URL"
0
カバー画像

アラーム

manifest.json"permissions": ["alarms"]作成1回だけ実行browser.alarms.create("アラーム名", {delayInMinutes: 分});削除全削除browser.alarms.clearAll();アラーム時の処理登録browser.alarms.onAlarm.addListener((alarm) => {  処理});アラーム名alarm.name
0
カバー画像

タブ

Get アクティブmanifest.json"permissions": ["activeTab"]background[タブ] = await browser.tabs.query({ active: true, currentWindow: true });タブIDタブ.id
0
カバー画像

インストール

デバッグ①about:debugging#/setup をブラウザで開く②このFirefoxリンク をクリック③一時的なアドオンを読み込む④拡張機能のディレクトリーにあるファイルを1つ選択
0
カバー画像

クリップボード

manifest.json"permissions": ["clipboardRead", "clipboardWrite"]Readawait navigator.clipboard.readText()Writeawait navigator.clipboard.writeText(文字列)
0
カバー画像

コンテンツスクリプト

実行 バックグランドスクリプトから実行  アクティブタブmanifest.json"permissions": [    "activeTab",    "scripting"  ],スクリプトbrowser.scripting.executeScript({  target: { tabId: タブID },  files: ["content_scripts/スクリプト.js"],});
0
カバー画像

manifest.json

基本構成{  "manifest_version": 3,  "name": "名前",  "version": "バージョンの番号",  "description": "説明",  "icons": {    "48": "拡張機能の管理で表示される48×48pxの画像の相対パス"  },  "action": {    "default_title": "ツールバーの画像をホバーしたときに表示される文字列"    "default_icon": {      "32": "ツールバーに表示される32×32pxの画像の相対パス"  }}指定したURLにスクリプトを実行"host_permissions": ["スクリプト実行対象のURLパターン"] ,"content_scripts": [  {    "matches": ["スクリプト実行対象のURLパターン"],    "js": ["スクリプトの相対パス"]  }]URLパターンhttps://パターン※httpsは小文字 ワイルドカード*
0
カバー画像

拡張機能

基本構成manifest.jsoniconsフォルダcontent_scripts/コンテントスクリプトbackground/バックグラウンドスクリプトpopup/ポップアップのHTML, CSS, JavaScriptmanifest.json設定ファイルiconsフォルダアイコン画像ファイル
0
12 件中 1 - 12