Affirm: Buy Now, Pay Later

Affirm: Buy Now, Pay Later

Pay at your own pace with Affirm’s browser extension. Get prequalified while you shop and choose a payment plan. With no fees, ever.

Merlin
Additional files are visible only to premium users

manifest.json


{
  "update_url": "https://clients2.google.com/service/update2/crx",
  "name": "Affirm: Buy Now, Pay Later",
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtn/3F6ZUNKQWUFvqRDxA4uppsBTQCALn6fE7o6BO7YfMfeHvib+KScczaNoxA0zweOAuC6yxXtc7VcI2GJZ3Hs7vceRmt4pLJ8UApZb/y0KXtMG3VvMWlCLFwj/0IB50vbnGL9KQnAw8OcuFBMXx83tWsQFnY+nSMTPnrm/TvJvZUOxOIW0FWCBNlAUscytP7TvKJD2PwG3HeneeAhUJPvrx3YfradF7P8Oc5F4mnuWbftj7MLeEV5IDi8aWmY52CcdJRC3ksVl8AG1Wt0r6hNjiFxGB1GJ3/1ZsyV+t8MVBaqsrfDl3y/FGy1tgZk8ocIL3F2YRTkwo7fZj/N3ApQIDAQAB",
  "short_name": "Affirm",
  "description": "Pay at your own pace with Affirm’s browser extension. Get prequalified while you shop and choose a payment plan. With no fees, ever.",
  "version": "1.7.7",
  "icons": {
    "16": "./assets/icons/16x16-icon.png",
    "32": "./assets/icons/32x32-icon.png",
    "48": "./assets/icons/48x48-icon.png",
    "128": "./assets/icons/128x128-icon.png"
  },
  "content_scripts": [
    {
      "matches": [
        "http://*/*",
        "https://*/*"
      ],
      "all_frames": false,
      "js": [
        "./content.js"
      ],
      "run_at": "document_start"
    },
    {
      "matches": [
        "http://*/*",
        "https://*/*"
      ],
      "all_frames": false,
      "js": [
        "./scripts/frame_listener.js"
      ],
      "run_at": "document_start"
    },
    {
      "matches": [
        "http://www.google.com/search*",
        "https://www.google.com/search*"
      ],
      "all_frames": false,
      "js": [
        "./scripts/google_search_content.js"
      ],
      "run_at": "document_end"
    },
    {
      "matches": [
        "http://*/*",
        "https://*/*"
      ],
      "all_frames": false,
      "js": [
        "./scripts/affirm_ala_injection.js"
      ],
      "run_at": "document_start"
    }
  ],
  "manifest_version": 3,
  "web_accessible_resources": [
    {
      "resources": [
        "assets/images/*",
        "assets/branding.json",
        "assets/frame.html"
      ],
      "matches": [
        "https://*/*",
        "http://*/*",
        "file://*/*"
      ]
    }
  ],
  "declarative_net_request": {
    "rule_resources": [
      {
        "id": "api_request_rules",
        "enabled": true,
        "path": "rules/api_request_rules.json"
      },
      {
        "id": "tracking_request_rules",
        "enabled": true,
        "path": "rules/tracking_request_rules.json"
      }
    ]
  },
  "permissions": [
    "activeTab",
    "alarms",
    "contextMenus",
    "cookies",
    "declarativeNetRequest",
    "storage",
    "system.cpu",
    "system.memory",
    "webNavigation",
    "webRequest"
  ],
  "host_permissions": [
    "https://*/*",
    "http://*/*"
  ],
  "optional_permissions": [],
  "background": {
    "service_worker": "./background.js"
  },
  "action": {
    "default_icon": {
      "16": "./assets/icons/unsupported-16x16.png",
      "32": "./assets/icons/unsupported-32x32.png"
    },
    "default_title": "Affirm"
  },
  "content_security_policy": {
    "extension_pages": "script-src 'self'; object-src 'self'; connect-src http:; frame-src https://*.affirm.com https://*.affirm-stage.com; style-src 'unsafe-inline'; default-src 'self'"
  },
  "externally_connectable": {
    "matches": [
      "*://localhost/*",
      "https://www.affirm.com/*"
    ]
  }
}