获取HTML代码

获取HTML代码

通过class或id获取指定元素节点的HTML代码

Merlin
Additional files are visible only to premium users

manifest.json


{
  "manifest_version": 3,
  "name": "获取HTML代码",
  "version": "1.0",
  "description": "通过class或id获取指定元素节点的HTML代码",
  "permissions": [
    "activeTab",
    "scripting"
  ],
  "action": {
    "default_popup": "popup.html",
    "default_icon": {
      "16": "images/icon.png",
      "48": "images/icon.png",
      "128": "images/icon.png"
    }
  },
  "background": {
    "service_worker": "background.js"
  },
  "icons": {
    "16": "images/icon.png",
    "48": "images/icon.png",
    "128": "images/icon.png"
  },
  "content_scripts": [
    {
      "matches": [
        "<all_urls>"
      ],
      "js": [
        "content.js"
      ]
    }
  ],
  "update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx"
}