A sample Chrome/Edge extension that adds a "Pick from CASE" link to the Open Badge Factory badge editor, allowing you to search and select items from a CASE framework and register them as badge alignments.
From the Open Badge Factory badge editor, you can search and select items from a CASE (Curriculum and Assessment Standards Exchange) framework and add them directly as alignments.
Currently supports the Japanese High School Course of Study (MEXT / OpenSALT) only.
- Chrome or Edge (Manifest V3)
- An Open Badge Factory account
- Clone this repository or download it as a ZIP
- Open
chrome://extensionsin Chrome - Enable Developer mode (top right)
- Click Load unpacked and select this folder
- Log in to OBF and open a badge editor
- A "Pick from CASE" link will appear next to the existing "Pick from ESCO" link in the alignments section
- Click the link to open the modal, then search by keyword or filter by item type
- Select an item from the list and click "Add to badge" in the right pane
- Save the badge — the alignment will be registered
obf-case-sample-extension/
├── manifest.json # MV3 manifest
├── background.js # CASE API fetch and cache
└── content/
├── page-interceptor.js # XHR interceptor (MAIN world)
├── main.js # UI and logic
└── modal.css # Modal styles
- OBF saves badges via Backbone.js (XHR), so
page-interceptor.jsruns inworld: "MAIN"to intercept requests - Communication between the content script and MAIN world is handled through a shared DOM
<meta>element - To prevent duplicate alignments, existing OBF alignments are checked in two steps using the alignment URL
See CLAUDE.md for full technical details.
This extension is a workaround, not a standards-compliant CASE integration.
OBF currently implements the Open Badges 2.0 alignment schema. The CASE-specific fields defined in Open Badges 3.0 (targetFramework, targetCode, targetType, etc.) are not supported by OBF. As a result, CASE data is mapped to the available OB 2.0 fields as follows:
| OBF field | What is stored | OBv3 equivalent |
|---|---|---|
name |
CFItem.fullStatement |
targetName |
url |
https://opensalt.net/uri/{identifier} |
targetUrl |
description |
CFItem.notes or CFItem.CFItemType |
targetDescription |
framework |
(empty — OBF validation issue) | targetFramework |
code |
(empty — OBF validation issue) | targetCode |
targetType: "CFItem" and targetFramework have no corresponding field in OBF's current UI and are not stored.
If OBF adds official OBv3 + CASE support in the future, this extension will need to be reworked accordingly.
To use a different CASE framework, update CASE_ENDPOINT in background.js:
const CASE_ENDPOINT = 'https://your-case-server/ims/case/v1p0/CFPackages/{id}';Apache License 2.0 — see LICENSE for details.
© 2026 Infosign, Inc.
Open Badge Factory のバッジ編集画面に「CASEから選択」リンクを追加し、CASEフレームワークのアイテムをバッジのアライメントとして登録するChrome/Edge拡張機能のサンプル実装です。
バッジ編集画面から、CASE(Curriculum and Assessment Standards Exchange) フレームワークのアイテムを直接検索・選択してアライメントに追加できます。
現在は高等学校学習指導要領(文部科学省 / OpenSALT)のみに対応しています。
- Chrome または Edge(Manifest V3 対応)
- Open Badge Factory のアカウント
- このリポジトリをクローンまたはZIPでダウンロードする
- Chrome で
chrome://extensionsを開く - 右上の「デベロッパーモード」をオンにする
- 「パッケージ化されていない拡張機能を読み込む」をクリックし、このフォルダを選択する
- OBF にログインし、バッジの編集画面を開く
- アライメントセクションの「ESCOから選択」の隣に「CASEから選択」リンクが表示される
- リンクをクリックしてモーダルを開き、キーワード検索またはフィルタでアイテムを絞り込む
- 一覧から項目を選択し、右ペインの「バッジに追加」をクリックする
- バッジを保存すると、アライメントが登録される
obf-case-sample-extension/
├── manifest.json # MV3 マニフェスト
├── background.js # CASE API データ取得・キャッシュ
└── content/
├── page-interceptor.js # XHR インターセプター(MAIN world)
├── main.js # UI・ロジック
└── modal.css # モーダルスタイル
- OBF のバッジ保存は Backbone.js(XHR)で行われるため、
page-interceptor.jsをworld: "MAIN"で実行してリクエストをインターセプトしています - content script と MAIN world 間の通信はDOMの
<meta>要素を介して行っています - アライメントの重複登録を防ぐため、OBF の既存アライメントをURLで2段階検索しています
詳細は CLAUDE.md を参照してください。
本拡張機能は暫定的な回避策であり、CASE の正式な標準実装ではありません。
OBF は現在 Open Badges 2.0 のアライメントスキーマを使用しています。Open Badges 3.0 で定義されている CASE 対応フィールド(targetFramework・targetCode・targetType 等)は OBF に存在しないため、CASE データを既存の OB 2.0 フィールドに次のように割り当てています。
| OBF フィールド | セットされる値 | OBv3 での対応 |
|---|---|---|
name |
CFItem.fullStatement(例: "国語") |
targetName |
url |
https://opensalt.net/uri/{identifier} |
targetUrl |
description |
CFItem.notes または CFItem.CFItemType |
targetDescription |
framework |
空(OBF のバリデーション制約のため) | targetFramework |
code |
空(OBF のバリデーション制約のため) | targetCode |
targetType: "CFItem" および targetFramework に相当するフィールドは OBF の現 UI に存在しないため、保存されません。
将来 OBF が OBv3 + CASE に正式対応した場合、本拡張機能の大幅な見直しが必要になります。
別のCASEフレームワークを使用する場合は、background.js の CASE_ENDPOINT を変更してください。
const CASE_ENDPOINT = 'https://your-case-server/ims/case/v1p0/CFPackages/{id}';Apache License 2.0 — 詳細は LICENSE を参照してください。
© 2026 株式会社インフォザイン