Giter VIP home page Giter VIP logo

markdown-download's Introduction

markdown-download

markdown文档下载 chrome插件

作为插件使用

  1. 在命令行中执行拉取/安装/打包
git clone https://github.com/kscript/download-markdown
cd download-markdown
npm install
npm run build

也可以在clone后使用gh-pages分支中的文件

  1. 在chrome浏览器扩展程序中开启开发者模式
  2. 选择加载已解压的扩展程序, 选中项目打包后的dist文件夹
  3. 访问已支持的网站的文章详情页面, 等待文章内图片全部加载后, 点击插件图标

作为模块使用

安装

npm i markdown-downloader

使用

由于会操作dom元素, 所以运行时需要在浏览器环境下

// 方式1. 导入模块
import markdownDownload, { convert, download, websiteConfigs } from 'markdown-downloader'
markdownDownload(websiteConfigs.juejin, {
	// 包含所有信息的innerHTML文本
	context: ``
})
<!-- 方式2. 直接使用脚本文件 -->
<script src="./markdownDownload.js"></script>
<script>
	// 给window对象添加一个markdownDownload函数, convert, download, websiteConfigs作为其属性
	markdownDownload(markdownDownload.websiteConfigs.juejin, {
		// 包含所有信息的innerHTML文本
		context: ``
	})
</script>

已支持的网站

掘金
知乎专栏
思否专栏
简书
博客园
微信文章
开源**
CSDN

markdown-download's People

Contributors

kscript avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.