0
点赞
收藏
分享

微信扫一扫

甜点——Chrome插件开发

一ke大白菜 2022-01-31 阅读 74

神级教程

https://www.cnblogs.com/liuxianan/p/chrome-plugin-develop.html#%E5%86%99%E5%9C%A8%E5%89%8D%E9%9D%A2

案例:简单的新标签页

manifest.json

{
	"manifest_version": 2,
	"name": "newtab",
	"version": "1.0.0",
	"description": "简单的新标签页",
	"chrome_url_overrides":
	{
		"newtab": "newtab.html"
	}
}

newtab.html

<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title></title>
		<style>
			h1{
				font-weight: normal;
			}
		</style>
	</head>
	<body>
		<h1>你好,世界!</h1>
	</body>
</html>

引入浏览器:

  • 菜单——更多工具——开发者工具
  • 开启开发者模式
  • 加载已解压的扩展程序,选择文件夹。

效果:
在这里插入图片描述
成功!

举报

相关推荐

0 条评论