diff --git a/README.md b/README.md
index 3b171518e..424f6a637 100644
--- a/README.md
+++ b/README.md
@@ -3,12 +3,12 @@
让你瞬间进入沉浸式阅读的扩展,还原阅读的本质,提升你的阅读体验。
为了达到完美的阅读模式这个小目标 ,我适配了 数百种类型 的网站,因此诞生了简悦。
-
+
-
+
@@ -16,63 +16,113 @@
***
-#### 马上使用:
-* [Chrome 应用商店](https://chrome.google.com/webstore/detail/%E7%AE%80%E6%82%A6-simpread/ijllcpnolfcooahcekpamkbidhejabll) 或者 [离线下载](http://ksria.com/simpread/crx/1.1.2/simpread.crx)
+## 目录
+
+* [下载](#马上使用)
+
+* [入门指南](#入门指南)
+
+* [主要功能一览](#主要功能一览)
+
+* [全部功能](#全部功能)
+
+* [如何使用](#如何使用)
+
+* [简悦各平台版本之间的差异](#简悦各平台版本之间的差异)
+
+* [截图](#截图)
+
+* [提交新站](#提交新站)
+
+* [投票](#投票)
+
+* [相关链接](#相关链接)
+
+* [贡献者](#感谢)
+
+* [参与开发](#协作开发)
+
+* [请杯咖啡](#请杯咖啡-)
+
+* [开源列表](#简悦的诞生离不开它们)
+
+* [许可](#许可)
+
+***
+
+## 马上使用
+* [Chrome 应用商店](https://chrome.google.com/webstore/detail/%E7%AE%80%E6%82%A6-simpread/ijllcpnolfcooahcekpamkbidhejabll) 或者 [离线下载](http://ksria.com/simpread/crx/1.1.3/simpread.crx)
+
* [Firefox 扩展中心](https://addons.mozilla.org/zh-CN/firefox/addon/simpread)
+
* [支持 UserScript 的浏览器](https://greasyfork.org/zh-CN/scripts/39998) 如:Apple Safari · Microsoft Edge · Opera · Dolphin 详细 [请看这里](https://github.com/Kenshin/simpread-little)
-* [iOS( iPhone / iPad )版](https://xteko.com/redir?url=http://sr.ksria.cn/jsbox/simpread-1.0.0.box?201805251238&name=%E7%AE%80%E6%82%A6) 详细 [请看这里](http://ksria.com/simpread/docs/#/JSBox)
-* 现在就加入 [Telegram 群](https://t.me/simpread),获取简悦的第一手资料。
-* 不同简悦如何使用?想知道简悦的高级功能,请看简悦的 [帮助中心](http://ksria.com/simpread/docs/#) 。
+* [iPhone / iPad 版](https://xteko.com/redir?url=http://sr.ksria.cn/jsbox/simpread-1.0.0.box?201805251238&name=%E7%AE%80%E6%82%A6) 详细 [请看这里](http://ksria.com/simpread/docs/#/JSBox)
+
+* [Android 版](http://ksria.com/simpread/docs/#/Android) 详细 [请看这里](http://ksria.com/simpread/docs/#/Android)
+
+## 入门指南
-#### 主要功能一览:
-- [聚焦模式](http://ksria.com/simpread/docs/#/聚焦模式):
+* 简悦的内容较多,汇总到了一个页面 [新闻页](https://simp.red/news)
+
+* 喜欢简悦,但不会用,对新手极度舒适的 [新手入门](http://ksria.com/simpread/guide)
+
+* 参与讨论请加入 [Telegram 群](https://t.me/simpread)
+
+* 想知道简悦的高级玩法,请看简悦的 [文档中心](http://ksria.com/simpread/docs/#)
+
+* 更多联系方式请看 [相关链接](#相关链接)
+
+## 主要功能一览
+- [聚焦模式](http://ksria.com/simpread/docs/#/聚焦模式)
不改变当前页面的结构,仅仅高亮需要阅读的部分,不分散用户的注意力;适合 `临时阅读` 或者 `未适配阅读模式` 的网站
-- [阅读模式](http://ksria.com/simpread/docs/#/阅读模式):
+- [阅读模式](http://ksria.com/simpread/docs/#/阅读模式)
简悦 `原创` 功能,逐一适配了 [数百种类型](https://simpread.ksria.cn/sites/) 的网站,自动提取 `标题` `描述` `正文` `媒体资源( 图片/ 视频 )` 等,生成 `符合中文阅读` 的页面
- * 支持 `自动生成目录`
-
- * 支持 [TXT 阅读器](http://ksria.com/simpread/docs/#/TXT-阅读器)
+ * 支持 [自动生成目录](http://ksria.com/simpread/docs/#/目录)
* 支持 [论坛类页面及分页](http://ksria.com/simpread/docs/#/论坛类页面及分页) 如:知乎 · 百度贴吧等
* ![new纯色.png](https://i.loli.net/2018/09/05/5b8f718046acb.png) 支持 [代码段的高亮](http://ksria.com/simpread/docs/#/代码段的高亮),包含了大部分常见的网站
- * ![new纯色.png](https://i.loli.net/2018/09/05/5b8f718046acb.png) 支持 [LaTeX 解析](http://ksria.com/simpread/docs/#/LaTeX-阅读器) · [Markdown 阅读器](http://ksria.com/simpread/docs/#/Markdown-阅读器)
+ * 支持 [TXT 阅读器](http://ksria.com/simpread/docs/#/TXT-阅读器) · 支持 [LaTeX 解析](http://ksria.com/simpread/docs/#/LaTeX-阅读器) · [Markdown 阅读器](http://ksria.com/simpread/docs/#/Markdown-阅读器)
* 更符合 `中文阅读` 习惯的设置,包括:`字间距` `行间距` 等 以及 `自定义 CSS` ,详细请看 [自定义样式](http://ksria.com/simpread/docs/#/自定义样式)
-- 临时阅读模式:
- 将 `非适配阅读模式的页面` 生成 `阅读模式` 一样的排版,支持任意页面,详细请看 [临时阅读模式](http://ksria.com/simpread/docs/#/临时阅读模式) 以及 [操作](http://ksria.com/simpread/welcome/version_1.0.5.html#temp-read-mode)
-
-- 主动适配:
+- 主动适配
通过简单的一个步骤,就可以让 `非适配页面` 支持阅读模式,详细请看 [主动适配](http://ksria.com/simpread/docs/#/主动适配阅读模式) 以及 [操作](http://ksria.com/simpread/welcome/version_1.0.5.html#mate-read-mode)
-- 智能适配:
+- ![new纯色.png](https://i.loli.net/2018/09/05/5b8f718046acb.png) 智能适配
- * ![new纯色.png](https://i.loli.net/2018/09/05/5b8f718046acb.png) 全新的 `词法分析引擎`,更智能、更精准的提取正文,辅以精准适配,任意网页均「不在话下」,不仅能自动识别出 Wordpress · Hexo · Ghost · Discuz 等博客 / 论坛的页面,甚至于只要是结构良好的页面,(无需适配)自动生成阅读模式,详细请看 [词法分析引擎](http://ksria.com/simpread/docs/#/词法分析引擎)
+ 全新的 `词法分析引擎`,更智能、更精准的提取正文,辅以精准适配,任意网页均「不在话下」,不仅能自动识别出 Wordpress · Hexo · Ghost · Discuz 等博客 / 论坛的页面,甚至于只要是结构良好的页面,(无需适配)自动生成阅读模式,详细请看 [词法分析引擎](http://ksria.com/simpread/docs/#/词法分析引擎)
-- 站点适配源:
- 包括:`官方(主)适配源` `第三方适配源` `站点集市适配源` `自定义适配源`,详细请看 [站点适配源](http://ksria.com/simpread/docs/#/站点适配源)
+- ![new纯色.png](https://i.loli.net/2018/09/05/5b8f718046acb.png) 智能感知
-- 站点编辑器:
+ 当生成的阅读模式出现问题时,简悦会自动重新获取正文,详细说明请看 [智能感知](http://ksria.com/simpread/docs/#/智能感知)
+
+- ![new纯色.png](https://i.loli.net/2018/09/05/5b8f718046acb.png) 手动框选适配
+ 针对 `未适配` 或 `智能识别` 失败的情况,简悦可以使用手动框选的方式,生成阅读模式,详细请看 [手动框选](http://ksria.com/simpread/docs/#/手动框选)
+
+- 站点适配源
+ 包括:`官方适配源` `第三方适配源` `站点集市适配源` `自定义适配源`,详细请看 [站点适配源](http://ksria.com/simpread/docs/#/站点适配源)
+
+- 站点编辑器
页面任意元素,均可隐藏,`可编程,定制化`,详细请看 [站点编辑器](http://ksria.com/simpread/docs/#/站点编辑器)
-- 站点管理器:
+- 站点管理器
可管理全部的适配站点,详细请看 [站点管理器](http://ksria.com/simpread/docs/#/站点管理器)
-- ![new纯色.png](https://i.loli.net/2018/09/05/5b8f718046acb.png) 站点集市:
+- 站点集市
上传并共享自己的适配站点,一键分享临时阅读模式,适配失败的站一键提交,详细请看 [站点集市](https://simpread.ksria.cn/sites)
-- ![new纯色.png](https://i.loli.net/2018/09/05/5b8f718046acb.png) 插件系统:
+- 插件系统
现在开始可以使用 JavaScript 编写基于 `简悦` 的插件了,更上线了 [插件中心](https://simpread.ksria.cn/plugins/) ,如何编写插件请看 → [说明文档](http://ksria.com/simpread/docs/#/插件系统)
-- 多种主题:
+- 多种主题
`白练、白磁、卯之花色、丁子色、娟鼠、月白、百合、紺鼠、黒鸢` 等
-- 丰富的导出功能,包括:
+- 丰富的导出功能
- 导出 [Markdown](https://github.com/Kenshin/simpread#感谢) · `HTML` · `PNG` · `PDF` · [epub](http://ksria.com/simpread/docs/#/发送到-Epub)
@@ -80,30 +130,40 @@
- 导出到 `Pocket` `Linnk` `Instapaper` 的功能,包括:`当前页面的链接` `稍后读`
- - 导出到生产力工具,包括:`Dropbox` `Onenote` `Google Drive` `印象笔记 / Evernote`,详细请看 [授权服务](http://ksria.com/simpread/docs/#/授权服务)
+ - 导出到生产力工具,包括:`坚果云` `语雀` `Dropbox` `Onenote` `Google Drive` `印象笔记 / Evernote`,详细请看 [导出到生产力](http://ksria.com/simpread/docs/#/导出到生产力工具)
- 同步 · 上传/下载 配置 · 同步适配列表 · [快捷键支持](http://ksria.com/simpread/docs/#/快捷键) 等;
- 高级定制,包括:`右键菜单` `控制栏可隐藏` `阅读进度可隐藏` `自动进入阅读模式` [白名单](http://ksria.com/simpread/docs/#/FAQ?id=白名单) 以及 [排除列表](http://ksria.com/simpread/docs/#/FAQ?id=排除列表) 等
-- 稍后读;
+- 稍后读
+
+## 全部功能
-#### 截图:
+
+
+
+
+## 截图
![简单阅读,愉悦心情!](http://sr.ksria.cn/welcome-readme-1.png)
-![多种导出方式](http://sr.ksria.cn/welcome-readme-3.png)
-![定制化,可编程](http://sr.ksria.cn/welcome-readme-4.png)
-#### 照片集:
-> 包含了 `稍后读` `阅读模式 · 设置界面` `导出到生产力工具` `发送到 Kindle` `自定义样式` `同步配置` `论坛类页面 · 分页` 等功能的截图(动图)
+更多截图
+
+
+
+
+
+
+
+
-*
+## 如何使用
-#### 全部功能:
-![功能一览](http://sr.ksria.cn/feature%201.1.2.png)
+> 简悦虽然拥有众多功能,但它支持 **开箱即用**,新手(不想折腾党)来说,只需要看懂下面两种操作即可。
-#### 如何使用(阅读模式):
+### 阅读模式
-`简悦`会自动检测当前页面是否已经适配,如适配则在浏览器右上角显示 ![Imgur](http://i.imgur.com/dyROEBi.png) ,使用以下三种方式启动:
+> `简悦`会自动检测当前页面是否已经适配,如适配则在浏览器右上角显示 ![Imgur](http://i.imgur.com/dyROEBi.png) ,使用以下三种方式启动:
- 点击浏览器右上角 `红色icon`;
@@ -111,15 +171,21 @@
- 快捷键;(默认为 双击 A )
+- 简悦支持自动进入阅读模式,详细请看 [自动进入阅读模式](http://ksria.com/simpread/docs/#/自动进入阅读模式)
+
+### 聚焦模式
-#### 如何使用(聚焦模式):
-`聚焦模式` 会自动获取当前鼠标所在的段落并高亮,适合任意页面。
+> `聚焦模式` 会自动获取当前鼠标所在的段落并高亮,适合任意页面。
- 在需要高亮的区域,右键选择 `简悦 - SimpRead` → `聚焦模式`;
- 快捷键;(默认为 A S )
-#### 提交新站:
+## 简悦各平台版本之间的差异
+
+> 包括:Chrome / Firefox / 轻阅版(UserScript)/ JSBox ,请访问 [简悦 · 新闻页](https://www.notion.so/9c109ec145134297ab461f5b52dbadc7?v=ce94e37d8a794cfbbd39bf9dfaf9017a)
+
+## 提交新站
* 方式1:通过 **提交到 站点集市** 的方式,详细请看 [站点管理器 · 上传](http://ksria.com/simpread/docs/#/站点管理器?id=上传)
@@ -128,37 +194,52 @@
* 方式3:通过 **新增站点编辑器** 的方式(适合逐一添加单个新站),详细说明 [请看这里](http://ksria.com/simpread/docs/#/站点编辑器?id=如何新增修改);
-* 方式4:通过 **提交适配源** 的方式(适合同时添加多个新站),详细说明请看 [使用自定义适配源](http://ksria.com/simpread/docs/#/站点适配源?id=如何提交到简悦的官方(次)适配源)
+* 方式4:通过 **提交适配源** 的方式(适合同时添加多个新站),详细说明请看 [使用自定义适配源](http://ksria.com/simpread/docs/#/如何提交第三方适配源);
* 更多说明请看 [站点编辑器](http://ksria.com/simpread/docs/#/站点编辑器) [站点管理](http://ksria.com/simpread/docs/#/站点管理器) [站点适配源](http://ksria.com/simpread/docs/#/站点适配源);
-#### Chrome / Firefox / 轻阅版(UserScript)功能差别:
-![Chrome / Firefox / 轻阅版(UserScript)功能差别](https://i.imgur.com/z4WI7uK.png)
-
-#### 投票:
+## 投票
简悦是一个免费并开源的项目。如果觉得不错,请给我 [投票](https://chrome.google.com/webstore/detail/%E7%AE%80%E6%82%A6-simpread/ijllcpnolfcooahcekpamkbidhejabll/reviews) 。这样让更多人了解并受用与 `简悦` 带来的便利,你的认可是对我最大的鼓励。
-#### 相关链接:
+## 相关链接
* [更新日志](http://ksria.com/simpread/changelog.html)
+
* [帮助中心](http://ksria.com/simpread/docs/#)
-* [新手入门](http://ksria.com/simpread/docs/#/入门指南(-操作指引-))
+
+* [新手入门](http://ksria.com/simpread/guide)
+
* [常见问题](http://ksria.com/simpread/docs/#/FAQ)
+
* [反馈](https://github.com/kenshin/simpread/issues)
+
* [联系](http://kenshin.wang) · [邮件](kenshin@ksria.com) · [微博](http://weibo.com/23784148) · [Telegram 群](https://t.me/simpread)
-* 想了解简悦背后的故事? [猛击这里](https://sspai.com/post/39491)
-#### 感谢:
-- [ksky521](https://github.com/ksky521) 提供 `minimatch` 和 `markdown转换功能` ,解决了 [Fix 11](https://github.com/kenshin/simpread/issues/11),详细请看 Pull requests [#16](https://github.com/kenshin/simpread/pull/16);
-- [airycanon](https://github.com/airycanon) Pull requests 详细请看 [#23](https://github.com/kenshin/simpread/pull/23) [#44](https://github.com/kenshin/simpread/pull/44) [#124](https://github.com/kenshin/simpread/pull/124);
-- [mikelei8291](https://github.com/mikelei8291) 详细请看 Pull requests [#114](https://github.com/kenshin/simpread/pull/114);
+## 感谢
-#### 简悦的诞生离不开它们:
+[ksky521](https://github.com/ksky521) · [airycanon](https://github.com/airycanon) · [mikelei8291](https://github.com/mikelei8291) · [chenhbc](https://github.com/chenhbc) · [Nihility](https://github.com/NihilityT) · [WangLeto](https://github.com/WangLeto) · [SevenSteven](https://github.com/Seven-Steven) · [Leo](https://github.com/clinyong) · [Jonas · Gao](https://github.com/JonasGao) · [Cologler](https://github.com/Cologler) · [bgh](https://github.com/bldght) · [Ronglong Pu](https://github.com/PuRonglong)
+
+## 协作开发
+
+> Pull requests 方式:
+
+* 请务必从 **develop** 分支开始;( **注意:非 develop 分支的 pr 将不会被合并** )
+
+* Pull requests
+
+* 如果需要合并的话,合并后我会通知你;(在下个版本发布时一起发布)
+
+## 请杯咖啡 ☕
+如果简悦可以解决你在阅读上痛点,提升 Web 端的阅读体验,可以请我喝杯咖啡,想必也是非常愉悦的事情。 :smile:
+_如发现下图显示不全,请直接访问 http://sr.ksria.cn/zhifu_m2.png_
+![支付](http://sr.ksria.cn/zhifu_m2.png)
+
+## 简悦的诞生离不开它们
- [Node.js](https://nodejs.org/) · [NPM](https://www.npmjs.com)
- [Webpack](https://webpack.github.io/)
- [React](https://facebook.github.io/react)
- [ES6](http://es6-features.org/) · [Babel](https://babeljs.io)
- [PostCSS](http://postcss.org/) · [cssnext](http://cssnext.io/)
-- [jQuery](https://jquery.com/) · [Mousetrap](https://craig.is/killing/mice) · [pangu.js](https://github.com/vinta/pangu.js) · [ProgressBar.js](https://kimmobrunfeldt.github.io/progressbar.js/) · [timego.js](http://timeago.org/) · [Velocity.js](http://velocityjs.org/) · [minimatch](https://github.com/isaacs/minimatch) · [to-markdown](https://github.com/domchristie/to-markdown) · [FileSaver.js](https://github.com/eligrey/FileSaver.js) · [dom-to-image](https://github.com/tsayen/dom-to-image)
+- [jQuery](https://jquery.com/) · [Mousetrap](https://craig.is/killing/mice) · [pangu.js](https://github.com/vinta/pangu.js) · [ProgressBar.js](https://kimmobrunfeldt.github.io/progressbar.js/) · [timego.js](http://timeago.org/) · [Velocity.js](http://velocityjs.org/) · [minimatch](https://github.com/isaacs/minimatch) · [to-markdown](https://github.com/domchristie/to-markdown) · [FileSaver.js](https://github.com/eligrey/FileSaver.js) · [dom-to-image](https://github.com/tsayen/dom-to-image) · [WebDAV]( https://github.com/aslakhellesoy/webdavjs)
- [Visual Studio Code](https://code.visualstudio.com/)
- [Sketch](https://www.sketchapp.com/) · [Pixelmator](http://www.pixelmator.com/)
- Icon from
@@ -168,37 +249,17 @@
- Mind Maps
- 咖啡 · 网易音乐 · Google Chrome · rMBP
-#### 协作开发:
-- Pull requests 方式:
- * 请从 `develop` 分支开始;( 注意:非 develop 分支的 pr 将不会合并;)
- * Pull requests
- * 如果需要合并的话,合并后我会通知你;(在下个版本发布时一起发布)
-
-- 源代码编译:
- * git clone https://github.com/Kenshin/simpread.git
- * cd simpread
- * npm install
- * npm run develop ( for Mac ) 用于开发
- * npm run publish ( for Mac ) 用于发布
- * npmw run develop ( for Win ) 用于开发
- * npmw run publish ( for Win ) 用于发布
-
-#### 请杯咖啡:
-如果简悦可以解决你在阅读上痛点,提升 Web 端的阅读体验,可以请我喝杯咖啡,想必也是非常愉悦的事情。 :smile:
-_如发现下图显示不全,请直接访问 http://sr.ksria.cn/zhifu_m2.png_
-![支付](http://sr.ksria.cn/zhifu_m2.png)
-
-#### 许可:
+## 许可
[![license-badge]][license-link]
[www-badge]: https://img.shields.io/badge/website-_simpread.ksria.com-1DBA90.svg
[www-link]: http://ksria.com/simpread
-[version-badge]: https://img.shields.io/badge/lastest_version-1.1.2-blue.svg
+[version-badge]: https://img.shields.io/badge/lastest_version-1.1.3-blue.svg
[version-link]: https://github.com/kenshin/simpread/releases
[chrome-badge]: https://img.shields.io/badge/download-_chrome_webstore-brightgreen.svg
[chrome-link]: https://chrome.google.com/webstore/detail/%E7%AE%80%E6%82%A6-simpread/ijllcpnolfcooahcekpamkbidhejabll
[offline-badge]: https://img.shields.io/badge/download-_crx-brightgreen.svg
-[offline-link]: http://ksria.com/simpread/crx/1.1.2/simpread.crx
+[offline-link]: http://ksria.com/simpread/crx/1.1.3/simpread.crx
[license-badge]: https://img.shields.io/github/license/mashape/apistatus.svg
[license-link]: https://opensource.org/licenses/MIT
diff --git a/package.json b/package.json
index 7e0fda073..d83cd6f28 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
"node": ">= 0.10.0"
},
"scripts": {
- "develop": "cross-env NODE_ENV=development webpack --devtool=source-map --progress --colors --watch",
+ "develop": "cross-env NODE_ENV=development webpack --devtool=eval-source-map --progress --colors --watch",
"publish": "cross-env NODE_ENV=production webpack -p --progress --colors",
"ext_dev": "cross-env NODE_ENV=development webpack --devtool=source-map --progress --colors --watch --config webpack.config.ext.js",
"ext_pub": "cross-env NODE_ENV=production webpack -p --progress --color --config webpack.config.ext.js",
diff --git a/src/assets/css/options_notice.css b/src/assets/css/options_notice.css
new file mode 100644
index 000000000..e5f8ac421
--- /dev/null
+++ b/src/assets/css/options_notice.css
@@ -0,0 +1,196 @@
+.header {
+ background-color: #16666f;
+ opacity: 1;
+ visibility: visible;
+}
+
+.notice {
+ margin-top: 65px;
+ width: 100%;
+}
+
+.notice notice {
+ display: flex;
+ flex-direction: row;
+
+ width: 100%;
+}
+
+notice .loading,
+notice .failed {
+ position: fixed;
+
+ top: 0;
+ left: 0;
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ width: 100%;
+ height: 100%;
+
+ background-color: #fff;
+}
+
+notice .loading svg {
+ transform: scale(.8);
+}
+
+notice .failed {
+ flex-direction: column;
+}
+
+notice .failed span {
+ color: #9b9b9b;
+ font-size: 2.5rem;
+}
+
+notice .list {
+ margin: 20px 20px 0;
+ width: 300px;
+ min-height: 589px;
+}
+
+notice .list.controlbar {
+ min-height: initial;
+}
+
+notice .detail {
+ display: flex;
+ justify-content: center;
+
+ margin: 20px 20px 0 0;
+ padding: 39px 24px 0px;
+
+ width: 100%;
+ background-color: #fff;
+ border-radius: 2px;
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+}
+
+notice .detail img {
+ width: 60%;
+}
+
+notice .detail .empty {
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ align-items: center;
+
+ padding-bottom: 39px;
+ min-height: 550px;
+
+ color: #9b9b9b;
+ font-size: 2.6rem;
+ font-weight: 400;
+}
+
+notice .detail .empty .icon {
+ width: 80px;
+ height: 80px;
+ background-position: center;
+ background-repeat: no-repeat;
+ background-image: url( data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAHdElNRQfhBA0LLBOn/NkLAAABtklEQVRYw+2YPyxDURTGf5WOGCwiETH7s4kaDJo2FokYMBglZ66lOtGEqWIQm9zdoJouGERIEwNlE4NE4i0iBoO0CxIMvW1f26evvJY86Tfdc3LP99137vvuTa6HqlAwzxI9X064ISrxagweE5mfOXp18CHjoCDJFHbYlBCAOiywGWzLSYmAauUIn6koI+2g/Bzb0gMMyDWoZ9pNuTQByUKLbkSyhD6PyZroYcwiN0xSoQUYJGhZ+FKjwKtlNsggeAEIFJIbnJqm7BKpSeAIgHkdjbKgRwGucgIdOrEuYXOdXKo1Fm3pF+QOQBI6Tqg3wnleb8nUVHmtRNQBQueX5AZbclmRTVFYqBcbSKpS9jtocVLcFGgK/I6AhQ/UEPHCsf09GMyU287KaBc/Xm4vF+YbBv5oDzYd8FXUWrRIQoQa+wV1hfsFmj6whTt9IPvFRv3L39Q51AR7AKzKctMHtnCnD2wE6oAbpgF4bJCA3HKbH7vcaCsSdf9ZVCrQVyfW/uIwtwdZHcXUEzuSccKt2pglpoOsfkpQPs4a0p8ROc+1KI3RAHqDdPExpIv78nPQId7plgf4BCjPbVayklPeAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA0LTEzVDExOjQ0OjE5KzA4OjAwPYuVdQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNC0xM1QxMTo0NDoxOSswODowMEzWLckAAAAASUVORK5CYII= );
+}
+
+notice .detail .preview {
+ width: 100%;
+}
+
+notice .detail .preview .title {
+ margin-bottom: 20px;
+
+ font-family: PingFang SC,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;
+ font-size: 3.4rem;
+ font-weight: 400;
+ line-height: 1.2;
+
+ overflow: hidden;
+ text-overflow: ellipsis;
+ text-rendering: optimizelegibility;
+ -webkit-line-clamp: 3;
+ -webkit-box-orient: vertical;
+}
+
+notice .detail .preview .desc {
+ margin-bottom: 20px;
+ padding-bottom: 20px;
+
+ border-bottom: 1px solid #E0E0E0;
+}
+
+notice .list {
+ background-color: #fff;
+ border-radius: 2px;
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
+}
+
+notice list {
+ display: flex!important;
+ flex-direction: column;
+
+ padding: 16px;
+ min-height: 72px;
+
+ border-bottom: 1px solid #E0E0E0;
+ transition : all 1s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
+}
+
+notice list:hover {
+ background-color: #f5f5f5;
+ transition : all 1s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
+}
+
+notice list:hover .meta {
+ opacity: 1;
+}
+
+notice list.active {
+ opacity: .5;
+}
+
+notice list.selected {
+ background-color: #e1f5fe;
+ border-left: 4px solid #29b6f6;
+}
+
+notice list.active .title {
+ text-decoration: line-through;
+}
+
+notice list .title {
+ margin-bottom: 4px;
+ padding-right: 25px;
+
+ font-size: 1.5rem;
+ font-weight: 500;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+}
+
+notice list .category,
+notice .detail .preview .category {
+ margin-right: 4px;
+ padding: 2px 7px;
+ padding: 2px 4px;
+
+ color: #fff;
+
+ font-weight: 400;
+ font-size: 0.8rem;
+ border-radius: 2px;
+}
+
+notice list .meta {
+ position: absolute;
+ right: 0;
+ opacity: 0;
+ transition : all 1s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
+}
+
+notice .date {
+ color: #9e9e9e;
+}
\ No newline at end of file
diff --git a/src/assets/css/options_page.css b/src/assets/css/options_page.css
index 8fca02ce9..fc6e68198 100644
--- a/src/assets/css/options_page.css
+++ b/src/assets/css/options_page.css
@@ -1,3 +1,6 @@
+/**
+ * Options page style
+ */
:root {
--text-color: #333;
@@ -217,7 +220,6 @@ a {
/*line-height: 37px;*/
user-select: none;
- cursor: pointer;
}
#labs .more .desc {
@@ -239,6 +241,10 @@ a {
background-repeat: no-repeat;
}
+/**
+ * Plugins & sites Card
+ */
+
cards {
display: flex;
flex-flow: row wrap;
@@ -364,6 +370,9 @@ card-empty a {
font-weight: 500;
}
+/**
+ * Account
+ */
.avatar {
margin: 10px;
padding: 5px;
@@ -382,3 +391,273 @@ card-empty a {
border: 5px solid #fff;
box-shadow: 0 10px 20px 0 rgba(168,182,191,0.6);
}
+
+/**
+ * Notice bubbles
+ */
+ .bubbles {
+ position: fixed;
+ bottom: 20px;
+
+ display: flex;
+ justify-content: center;
+ align-content: center;
+
+ padding: 10px;
+
+ width: 55px;
+ height: 56px;
+
+ border-radius: 50%;
+
+ box-shadow: 0 2px 6px 0 rgba(0,0,0,.4);
+
+ cursor: pointer;
+ transition: all 500ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
+}
+
+.bubbles.notice {
+ right: 94px;
+ background-color: #16666f;
+}
+
+.bubbles.notice:hover {
+ background-color: rgba(22, 102, 111, .8);
+}
+
+.bubbles i {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.bubbles em {
+ position: absolute;
+ top: 6px;
+ right: 11px;
+
+ width: 18px;
+ height: 18px;
+ line-height: 18px;
+
+ color: #fff;
+ background-color: #e54545;
+
+ font-weight: bold;
+ text-align: center;
+ font-style: initial;
+ border-radius: 50%;
+}
+
+.bubbles em.init {
+ line-height: 9px;
+}
+
+.bubbles.effect {
+ animation-name: popup;
+ animation-duration: 1s;
+}
+
+/**
+ * Help bubbles
+ */
+.bubbles.help {
+ right: 24px;
+ background-color: #607D8B;
+}
+
+.help:hover {
+ background-color: rgba(96, 125, 139, .8);
+}
+
+@keyframes popup {
+ 0% {
+ opacity: 0;
+ -webkit-transform: translateY(20px);
+ transform: translateY(20px)
+ }
+
+ 100% {
+ opacity: 1;
+ -webkit-transform: translateY(0);
+ transform: translateY(0)
+ }
+}
+
+@keyframes popdown {
+ 0% {
+ opacity: 0;
+ transform: translateY(-20px)
+ }
+
+ 100% {
+ opacity: 1;
+ transform: translateY(0)
+ }
+}
+
+@keyframes popclose {
+ 0% {
+ opacity: 1;
+ transform: translateY(0px)
+ }
+
+ 100% {
+ opacity: 0;
+ transform: translateY(20px)
+ }
+}
+
+/**
+ * Guide
+ */
+.guide-bg {
+ position: fixed;
+ right: 10px;
+ bottom: 90px;
+
+ animation-name: popup;
+ animation-duration: 1s;
+
+ z-index: 2147483647;
+}
+
+.guide {
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-content: center;
+
+ width: 350px;
+ height: 400px;
+
+ background-color: #F5F6F6;
+
+ border-radius: 2px;
+ box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .26);
+
+ overflow-x: hidden;
+ overflow-y: auto;
+}
+
+.guide .title,
+.guide .subtitle {
+ height: 48px;
+ line-height: 48px;
+
+ color: #fff;
+ background-color: #26d07c;
+
+ font-size: 17px;
+ text-align: center;
+
+ border-top-left-radius: 2px;
+ border-top-right-radius: 2px;
+}
+
+.guide .title {
+ position: absolute;
+
+ left: 0;
+ right: 15px;
+
+ display: flex;
+ justify-content: center;
+ font-weight: bold;
+
+ z-index: 2;
+}
+
+.guide .title span {
+ animation: .1s reverse fadein,235ms cubic-bezier(.4,0,.2,1) popdown;
+}
+
+.guide .subtitle {
+ display: flex;
+ justify-content: center;
+ align-items: flex-start;
+
+ margin-top: 48px;
+
+ min-height: 55px;
+ line-height: initial;
+
+ font-size: 15px;
+}
+
+.guide .loading {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ margin-bottom: 20px;
+
+ font-weight: 500;
+ font-size: 13px;
+
+ transition : opacity 1s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
+}
+
+.guide .loading span {
+ padding: 5px;
+}
+
+.guide .group {
+ margin-top: -30px;
+ padding: 10px;
+}
+
+guid-card {
+ display: flex;
+
+ margin-bottom: 10px;
+ padding: 20px;
+
+ width: 100%;
+
+ background-color: #ffffff;
+
+ border-radius: 4px;
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(193, 203, 212, 0.7) 0px 0px 0px 1px inset, rgb(193, 203, 212) 0px -1px 0px 0px inset;
+ transition: all 550ms cubic-bezier(0.23, 1, 0.32, 1) 0s;
+
+ cursor: pointer;
+}
+
+guid-card:hover {
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(193, 203, 212, 0.7) 0px 0px 0px 1px inset, rgb(193, 203, 212) 0px -1px 0px 0px inset;
+ transform: translate(0px, -2px);
+}
+
+guid-card-tips span {
+ margin-left: 5px;
+ font-size: 14px;
+ color: #0B242F;
+}
+
+.guide hr {
+ margin: 0;
+ border: 0;
+
+ text-align: center;
+ overflow: visible;
+}
+
+.guide hr:before {
+ content: '...';
+
+ position: relative;
+ top: -10px;
+
+ display: inline-block;
+
+ margin-left: .6em;
+
+ color: rgba(0,0,0,.68);
+
+ font-family: medium-content-slab-serif-font,Georgia,Cambria,"Times New Roman",Times,serif;
+ font-weight: 400;
+ font-style: italic;
+ font-size: 30px;
+ letter-spacing: .6em;
+}
diff --git a/src/assets/css/option.css b/src/assets/css/setting.css
similarity index 50%
rename from src/assets/css/option.css
rename to src/assets/css/setting.css
index ff47ba824..56f28c610 100644
--- a/src/assets/css/option.css
+++ b/src/assets/css/setting.css
@@ -1,14 +1,14 @@
/**
- * Option: Focus/Read mode
- */
+ * Setting: Focus/Read setting dailog
+*/
+
sr-opt-focus,
sr-opt-read {
display: -webkit-flex;
flex-direction:column;
width: 100%;
- /*height: 100%;*/
}
sr-opt-gp {
@@ -81,73 +81,3 @@ sr-opt-theme:not(:first-child) {
sr-opt-theme[sr-type="active"] {
box-shadow: 0 3px 3px 0 rgba(0,0,0,0.14),0 2px 20px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.7);
}
-
-/*
-opacity {
- margin: 8px 0 0 0;
-
- width: 100%;
- height: 37px;
-}
-
-opacity input[type=range] {
- width: 100%;
-
- margin: 6px 0;
- padding: 0;
-
- border: none;
- background-color: transparent;
- -webkit-appearance: none;
-}
-
-opacity input[type=range]:focus {
- outline: none;
-}
-
-opacity input[type=range]::-webkit-slider-runnable-track {
- width: 100%;
- height: 1px;
-
- background: #9e9e9e;
-
- box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.5), 0px 0px 0px rgba(13, 13, 13, 0.5);
- border-radius: 1.3px;
-
- transition: all 0.3s;
- cursor: pointer;
-}
-
-opacity input[type=range]::-webkit-slider-runnable-track:hover {
- background: #00897B;
-}
-
-opacity input[type=range]::-webkit-slider-thumb {
- height: 20px;
- width: 20px;
-
- margin-top: -9px;
-
- background: rgba(0, 137, 123, 1);
-
- box-shadow: 1px 1px 1px rgba(0, 0, 0, 0), 0px 0px 1px rgba(13, 13, 13, 0);
- border: 1px solid rgba(0, 0, 0, 0);
- border-radius: 50px;
-
- cursor: pointer;
- -webkit-appearance: none;
- transition: all .5s ease-in-out .1s;
-}
-
-opacity input[type=range]:focus::-webkit-slider-thumb {
- background: #00897B;
-}
-
-opacity input[type=range]:focus::-webkit-slider-thumb:hover {
- background: #00695C;
-}
-
-opacity input[type=range]:focus::-webkit-slider-runnable-track {
- background: #00897B;
-}
-*/
\ No newline at end of file
diff --git a/src/assets/css/simpread.css b/src/assets/css/simpread.css
index b620305d2..4a0cfa213 100644
--- a/src/assets/css/simpread.css
+++ b/src/assets/css/simpread.css
@@ -1,5 +1,5 @@
/**
- * Golbal style
+ * SimpRead
*/
.simpread-font {
@@ -189,7 +189,8 @@ sr-rd-footer-copywrite .sr-icon:hover {
}
sr-rd-footer-copywrite a,
-sr-rd-footer-copywrite a:link {
+sr-rd-footer-copywrite a:link,
+sr-rd-footer-copywrite a:visited {
margin: 0;
padding: 0;
@@ -262,11 +263,59 @@ sr-rd-crlbar.controlbar:hover {
* Highlight
*/
.simpread-highlight-selector {
- background-color: #fafafa;
- outline: 3px dashed #1976d2;
- opacity: .8;
+ background-color: #fafafa !important;
+ outline: 3px dashed #1976d2 !important;
+ opacity: .8 !important;
+ cursor: pointer !important;
+ transition: opacity .5s ease !important;
+}
+
+.simpread-highlight-controlbar {
+ position: relative !important;
+ background-color: #fafafa !important;
+ outline: 3px dashed #1976d2 !important;
+ opacity: .8 !important;
+ transition: opacity .5s ease !important;
+}
+
+
+simpread-highlight {
+ position: fixed;
+
+ top: 0;
+ left: 0;
+ right: 0;
+
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ padding: 15px;
+
+ height: 50px;
+
+ background-color: rgba(50, 50, 50, .9);
+ box-shadow: 0 2px 5px rgba(0, 0, 0, .26);
+
+ z-index: 2147483640;
+}
+
+sr-highlight-ctl {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ margin: 0 5px;
+
+ width: 50px;
+ height: 20px;
+
+ color: #fff;
+ background-color: #1976d2;
+
+ border-radius: 4px;
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0,0,0,.12);
cursor: pointer;
- transition: opacity .5s ease;
}
/**
@@ -276,8 +325,8 @@ toc-bg {
position: fixed;
left: 0;
top: 0;
- width: 200px;
- height: 500px;
+ width: 50px;
+ height: 200px;
font-size: initial;
}
@@ -296,6 +345,10 @@ toc-bg:hover {
z-index: 3;
}
+.toc-bg-hidden:hover toc {
+ width: 180px;
+}
+
toc * {
all: unset;
}
@@ -311,15 +364,31 @@ toc {
padding: 10px;
+ width: 0;
max-width: 200px;
max-height: 500px;
overflow-x: hidden;
+ overflow-y: hidden;
cursor: pointer;
border: 1px solid rgba(158, 158, 158, 0.22);
- transition: width 1.5s;
+ transition: width .5s;
+}
+
+toc:hover {
+ overflow-y: auto;
+}
+
+toc::-webkit-scrollbar {
+ width: 3px;
+}
+
+toc::-webkit-scrollbar-thumb {
+ border-radius: 10px;
+ background-color: rgba(139,137,134,0.5);
}
+
toc outline {
position: relative;
display: -webkit-box;
@@ -328,7 +397,7 @@ toc outline {
overflow: hidden;
text-overflow: ellipsis;
- margin: 2px 0;
+ padding: 2px 0;
min-height: 21px;
line-height: 21px;
@@ -340,14 +409,21 @@ toc outline a:active,
toc outline a:visited,
toc outline a:focus
{
+ display: block;
+
+ width: 100%;
+
color: inherit;
font-size: 11px;
text-decoration: none!important;
+
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
toc outline a:hover {
font-weight: bold!important;
- text-decoration: underline!important;
}
toc outline a.toc-outline-theme-dark,
@@ -355,8 +431,11 @@ toc outline a.toc-outline-theme-night {
color: #fff!important;
}
+.toc-level-h1 {
+ padding-left: 5px;
+}
.toc-level-h2 {
- padding-left: 10px;
+ padding-left: 15px;
}
.toc-level-h3 {
padding-left: 25px;
@@ -366,17 +445,20 @@ toc outline a.toc-outline-theme-night {
}
.toc-outline-active {
- background-color: rgb(244, 67, 54);
+ border-left: 2px solid rgb(244, 67, 54);
}
toc outline active {
position: absolute;
- right: 0;
+ left: 0;
top: 0;
bottom: 0;
padding: 0 0 0 3px;
+
+ border-left: 2px solid #e8e8e8;
+
}
/**
@@ -415,7 +497,7 @@ kbd-mapping {
flex-flow: row;
width: 500px;
- height: 550px;
+ height: 590px;
background-color: #fff;
diff --git a/src/assets/css/theme_common.css b/src/assets/css/theme_common.css
index 430be3b97..0d8601f43 100644
--- a/src/assets/css/theme_common.css
+++ b/src/assets/css/theme_common.css
@@ -4,7 +4,7 @@
* sr-rd-title, sr-rd-desc, sr-rd-content, p, div, a, img, pre, code, sr-blockquote, ul ol
*/
- .simpread-theme-root {
+.simpread-theme-root {
font-size: 62.5%!important;
}
@@ -264,12 +264,11 @@ sr-rd-mult {
padding: 16px 0 24px;
width: 100%;
- min-width: 840.72px;
- background-color: #fafafa;
+ background-color: #fff;
- border-radius: 2px;
- box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
+ border-radius: 4px;
+ box-shadow: 0px 1px 2px 0px rgba(60,64,67,0.3), 0px 2px 6px 2px rgba(60,64,67,0.15);
}
sr-rd-mult:hover {
diff --git a/src/assets/css/theme_dark.css b/src/assets/css/theme_dark.css
index f1cda3347..0b059d2ec 100644
--- a/src/assets/css/theme_dark.css
+++ b/src/assets/css/theme_dark.css
@@ -23,7 +23,7 @@ sr-rd-content sr-blockquote {
* Custom style, include: background; title; desc; sr-rd-content; p,div; a; pre
*/
-.simpread-theme-root {
+.simpread-theme-root, .simpread-multi-root {
color: rgb(235, 235, 235);
background: rgb(34, 34, 34);
}
diff --git a/src/assets/css/theme_engwrite.css b/src/assets/css/theme_engwrite.css
index f921b5bd8..fe31e4c06 100644
--- a/src/assets/css/theme_engwrite.css
+++ b/src/assets/css/theme_engwrite.css
@@ -31,7 +31,7 @@ sr-blockquote >:last-child {
* Custom style, include: background; title; desc; sr-rd-content; p,div; a; pre
*/
-.simpread-theme-root {
+.simpread-theme-root, .simpread-multi-root {
background-color: rgb(252, 245, 237);
color: rgb(51, 51, 51);
}
diff --git a/src/assets/css/theme_github.css b/src/assets/css/theme_github.css
index 2368be8e0..86367ccda 100644
--- a/src/assets/css/theme_github.css
+++ b/src/assets/css/theme_github.css
@@ -89,4 +89,12 @@ sr-rd-content li code,
sr-rd-content p code {
background-color: rgba(0,0,0,0.04);
border-radius: 3px;
+}
+
+/**
+ * Multiple page
+ */
+
+.simpread-multi-root {
+ background: #F8F9FA;
}
\ No newline at end of file
diff --git a/src/assets/css/theme_gothic.css b/src/assets/css/theme_gothic.css
index c76584835..e220e3005 100644
--- a/src/assets/css/theme_gothic.css
+++ b/src/assets/css/theme_gothic.css
@@ -26,7 +26,7 @@ sr-rd-content sr-blockquote p {
* Custom style, include: background; title; desc; sr-rd-content; p,div; a; pre
*/
-.simpread-theme-root {
+.simpread-theme-root, .simpread-multi-root {
background: rgb(252, 252, 252);
color: #333;
}
diff --git a/src/assets/css/theme_monospace.css b/src/assets/css/theme_monospace.css
index b3dbe0dcb..5655cccfb 100644
--- a/src/assets/css/theme_monospace.css
+++ b/src/assets/css/theme_monospace.css
@@ -84,4 +84,12 @@ sr-rd-content li code,
sr-rd-content p code {
color: #949415;
background-color: transparent;
+}
+
+/**
+ * Multiple page
+ */
+
+.simpread-multi-root {
+ background: #F8F9FA;
}
\ No newline at end of file
diff --git a/src/assets/css/theme_newsprint.css b/src/assets/css/theme_newsprint.css
index 974f7f407..96ccfc9a5 100644
--- a/src/assets/css/theme_newsprint.css
+++ b/src/assets/css/theme_newsprint.css
@@ -28,7 +28,7 @@ sr-rd-content sr-blockquote:before {
* Custom style, include: background; title; desc; sr-rd-content; p,div; a; pre
*/
-.simpread-theme-root {
+.simpread-theme-root, .simpread-multi-root {
background-color: #f3f2ee;
color: #2C3E50;
}
diff --git a/src/assets/css/theme_night.css b/src/assets/css/theme_night.css
index eeaa0b2b3..90a969ba2 100644
--- a/src/assets/css/theme_night.css
+++ b/src/assets/css/theme_night.css
@@ -23,7 +23,7 @@ sr-rd-content sr-blockquote {
* Custom style, include: background; title; desc; sr-rd-content; p,div; a; pre
*/
-.simpread-theme-root {
+.simpread-theme-root, .simpread-multi-root {
background: rgb(54, 59, 64);
color: #b8bfc6;
}
diff --git a/src/assets/css/theme_octopress.css b/src/assets/css/theme_octopress.css
index c9133adfc..eebcf2ece 100644
--- a/src/assets/css/theme_octopress.css
+++ b/src/assets/css/theme_octopress.css
@@ -23,7 +23,7 @@ sr-rd-content sr-blockquote {
* Custom style, include: background; title; desc; sr-rd-content; p,div; a; pre
*/
-.simpread-theme-root {
+.simpread-theme-root, .simpread-multi-root {
background: #f8f8f8 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+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SL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC') top left;
color: #333;
}
diff --git a/src/assets/css/theme_pixyii.css b/src/assets/css/theme_pixyii.css
index f7cd2c7d3..551b3ff6f 100644
--- a/src/assets/css/theme_pixyii.css
+++ b/src/assets/css/theme_pixyii.css
@@ -92,4 +92,12 @@ sr-rd-content li code,
sr-rd-content p code {
color: rgb(122, 122, 122);
background-color: transparent;
+}
+
+/**
+ * Multiple page
+ */
+
+ .simpread-multi-root {
+ background: #F8F9FA;
}
\ No newline at end of file
diff --git a/src/assets/images/sync_icon.png b/src/assets/images/dropbox_icon.png
similarity index 100%
rename from src/assets/images/sync_icon.png
rename to src/assets/images/dropbox_icon.png
diff --git a/src/assets/images/jianguo_icon.png b/src/assets/images/jianguo_icon.png
new file mode 100644
index 000000000..497993df6
Binary files /dev/null and b/src/assets/images/jianguo_icon.png differ
diff --git a/src/assets/images/plugin_icon.png b/src/assets/images/plugin_icon.png
new file mode 100644
index 000000000..8b0e18a0e
Binary files /dev/null and b/src/assets/images/plugin_icon.png differ
diff --git a/src/assets/images/read_icon.png b/src/assets/images/read_icon.png
new file mode 100644
index 000000000..ea27184ae
Binary files /dev/null and b/src/assets/images/read_icon.png differ
diff --git a/src/assets/images/webdav_icon.png b/src/assets/images/webdav_icon.png
new file mode 100644
index 000000000..f533f7988
Binary files /dev/null and b/src/assets/images/webdav_icon.png differ
diff --git a/src/assets/images/yuque_icon.png b/src/assets/images/yuque_icon.png
new file mode 100644
index 000000000..696ac1f3b
Binary files /dev/null and b/src/assets/images/yuque_icon.png differ
diff --git a/src/background.js b/src/background.js
index 269cc1926..1f2c315fb 100644
--- a/src/background.js
+++ b/src/background.js
@@ -7,6 +7,7 @@ import {browser} from 'browser';
import * as ver from 'version';
import * as menu from 'menu';
import * as watch from 'watch';
+import * as WebDAV from 'webdav';
import PureRead from 'puread';
@@ -47,6 +48,7 @@ storage.Read( () => {
}, ver.FixSubver( ver.patch, storage.simpread ));
}
menu.CreateAll();
+ setTimeout( ()=>uninstall(), 100 );
});
/**
@@ -83,18 +85,63 @@ menu.OnClicked( ( info, tab ) => {
* Listen runtime message, include: `corb`
*/
browser.runtime.onMessage.addListener( function( request, sender, sendResponse ) {
- if ( request.type == msg.MESSAGE_ACTION.CORB ) {
- $.ajax( request.value.settings )
- .done( result => {
- sendResponse({ done: result });
- })
- .fail( ( jqXHR, textStatus, errorThrown ) => {
- sendResponse({ fail: { jqXHR, textStatus, errorThrown }});
+ if ( request.type == msg.MESSAGE_ACTION.CORB ) {
+ $.ajax( request.value.settings )
+ .done( result => {
+ sendResponse({ done: result });
+ })
+ .fail( ( jqXHR, textStatus, errorThrown ) => {
+ sendResponse({ fail: { jqXHR, textStatus, errorThrown }});
+ });
+ }
+ return true;
+});
+
+/**
+ * Listen runtime message, include: `jianguo`
+ */
+browser.runtime.onMessage.addListener( function( request, sender, sendResponse ) {
+ if ( request.type == msg.MESSAGE_ACTION.jianguo ) {
+ const { url, user, password, method } = request.value;
+ const dav = new WebDAV.Fs( url, user, password );
+ if ( method.type == "folder" ) {
+ dav.dir( method.root ).mkdir( result => {
+ dav.dir( method.root + "/" + method.folder ).mkdir( result => {
+ sendResponse({ done: result, status: result.status });
});
+ })
+ } else if ( method.type == "file" ) {
+ dav.file( method.path ).write( method.content, result => {
+ sendResponse({ done: result, status: result.status });
+ });
+ } else if ( method.type == "read" ) {
+ dav.file( method.path ).read( result => {
+ sendResponse({ done: result.response, status: result.status });
+ });
+ }
+ }
+ //return true;
+});
+
+/**
+ * Listen runtime message, include: `webdav`
+ */
+browser.runtime.onMessage.addListener( function( request, sender, sendResponse ) {
+ if ( request.type == msg.MESSAGE_ACTION.WebDAV ) {
+ const { url, user, password, method } = request.value;
+ const dav = new WebDAV.Fs( url, user, password );
+ if ( method.type == "folder" ) {
+ dav.dir( method.root ).mkdir( result => {
+ sendResponse({ done: result, status: result.status });
+ })
+ } else if ( method.type == "file" ) {
+ dav.file( method.root + "/" + method.name ).write( method.content, result => {
+ sendResponse({ done: result, status: result.status });
+ });
}
- return true;
}
-);
+ //return true;
+});
/**
* Listen runtime message, include: `shortcuts` `browser_action`
@@ -307,4 +354,11 @@ function analytics() {
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-405976-12', 'auto');
ga('send', 'pageview');
+}
+
+/**
+ * Uninstall
+ */
+function uninstall() {
+ browser.runtime.setUninstallURL( storage.option.uninstall ? storage.service + "/uninstall" : "" );
}
\ No newline at end of file
diff --git a/src/contentscripts.js b/src/contentscripts.js
index 47d8ee619..278cc7420 100644
--- a/src/contentscripts.js
+++ b/src/contentscripts.js
@@ -1,26 +1,27 @@
console.log( "=== simpread contentscripts load ===" )
import './assets/css/simpread.css';
-import './assets/css/option.css';
+import './assets/css/setting.css';
import 'notify_css';
import 'mintooltip';
-import Velocity from 'velocity';
-import Notify from 'notify';
+import Velocity from 'velocity';
+import Notify from 'notify';
-import {focus} from 'focus';
-import * as read from 'read';
-import * as modals from 'modals';
-import * as kbd from 'keyboard';
+import {focus} from 'focus';
+import * as read from 'read';
+import * as setting from 'setting';
+import * as kbd from 'keyboard';
+import * as highlight from 'highlight';
-import * as util from 'util';
+import * as util from 'util';
import { storage, STORAGE_MODE as mode } from 'storage';
-import * as msg from 'message';
-import {browser} from 'browser';
-import * as watch from 'watch';
+import * as msg from 'message';
+import {browser} from 'browser';
+import * as watch from 'watch';
-import PureRead from 'puread';
-import * as puplugin from 'puplugin';
+import PureRead from 'puread';
+import * as puplugin from 'puplugin';
let pr, // pure read object
is_blacklist = false,
@@ -45,7 +46,7 @@ storage.Read( () => {
});
} else {
bindShortcuts();
- autoOpen();
+ preload() && autoOpen();
}
});
@@ -72,6 +73,34 @@ function blacklist() {
return is_blacklist;
}
+/**
+ * Preload verify
+ *
+ * @return {boolen}
+ */
+
+function preload() {
+ let is_proload = true;
+ if ( storage.option.preload == false ) {
+ is_proload = false;
+ } else if ( storage.option.preload ) {
+ for ( const item of storage.option.lazyload ) {
+ if ( item.trim() != "" && !item.startsWith( "http" ) ) {
+ if ( location.hostname.includes( item ) ) {
+ is_proload = false;
+ break;
+ }
+ } else {
+ if ( location.href == item ) {
+ is_proload = false;
+ break;
+ }
+ }
+ }
+ }
+ return is_proload;
+}
+
/**
* Listen runtime message, include: `focus` `read` `shortcuts` `tab_selected`
*/
@@ -87,7 +116,9 @@ browser.runtime.onMessage.addListener( function( request, sender, sendResponse )
bindShortcuts();
break;
case msg.MESSAGE_ACTION.tab_selected:
- browserAction( request.value.is_update );
+ if ( preload() == false ) {
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.browser_action, { code: 0 , url: window.location.href } ));
+ } else browserAction( request.value.is_update );
break;
case msg.MESSAGE_ACTION.read_mode:
case msg.MESSAGE_ACTION.browser_click:
@@ -97,19 +128,18 @@ browser.runtime.onMessage.addListener( function( request, sender, sendResponse )
new Notify().Render( "配置文件已更新,刷新当前页面后才能生效。", "刷新", ()=>window.location.reload() );
} else {
if ( storage.option.br_exit ) {
- modals.Exist() && modals.Exit();
- !modals.Exist() && read.Exist( false ) ? read.Exit() : readMode();
+ setting.Exist() && setting.Exit();
+ !setting.Exist() && read.Exist( false ) ? read.Exit() : readMode();
}
else readMode();
}
});
break;
case msg.MESSAGE_ACTION.pending_site:
- new Notify().Render({ content: "是否提交,以便更好的适配此页面?", action: "是的", cancel: "取消", callback: type => {
+ new Notify().Render({ content: "是否提交,以便更好地适配此页面?", action: "是的", cancel: "取消", callback: type => {
if ( type == "cancel" ) return;
browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.save_site, { url: location.href, site: storage.pr.current.site, uid: storage.user.uid, type: "failed" }));
}});
- localStorage.removeItem( "sr-update-site" );
break;
case msg.MESSAGE_ACTION.menu_whitelist:
case msg.MESSAGE_ACTION.menu_exclusion:
@@ -145,9 +175,9 @@ function bindShortcuts() {
kbd.Bind( [ storage.read.shortcuts.toLowerCase() ], readMode );
kbd.ListenESC( combo => {
if ( combo == "esc" && storage.option.esc ) {
- modals.Exist() && modals.Exit();
- !modals.Exist() && focus.Exist() && focus.Exit();
- !modals.Exist() && read.Exist() && read.Exit();
+ setting.Exist() && setting.Exit();
+ !setting.Exist() && focus.Exist() && focus.Exit();
+ !setting.Exist() && read.Exist() && read.Exit();
}
});
}
@@ -203,10 +233,16 @@ function readMode() {
} else if ( pr.state == "temp" && pr.dom ) {
read.Render();
} else {
- new Notify().Render( "当前并未适配阅读模式,请移动鼠标手动生成 临时阅读模式 。" );
+ new Notify().Render( "智能感知 正文失败,请移动鼠标,并通过 手动框选 的方式生成正文。" );
read.Highlight().done( dom => {
- pr.TempMode( mode.read, dom );
- read.Render();
+ const rerender = element => {
+ pr.TempMode( mode.read, dom );
+ read.Render();
+ };
+ storage.current.highlight ?
+ highlight.Control( dom ).done( newDom => {
+ rerender( newDom );
+ }) : rerender( dom );
});
}
}
diff --git a/src/focus/controlbar.jsx b/src/focus/controlbar.jsx
index a147f5965..a6cdf1dd4 100644
--- a/src/focus/controlbar.jsx
+++ b/src/focus/controlbar.jsx
@@ -1,18 +1,19 @@
console.log( "=== simpread focus controlbar load ===" )
-import * as modals from 'modals';
-import * as se from 'siteeditor';
-import * as conf from 'config';
-import { storage } from 'storage';
-import * as output from 'output';
-import * as watch from 'watch';
-import {browser,br}from 'browser';
-import * as msg from 'message';
+import * as setting from 'setting';
+import * as se from 'siteeditor';
+
+import * as conf from 'config';
+import { storage } from 'storage';
+import * as output from 'output';
+import * as watch from 'watch';
+import {browser,br} from 'browser';
+import * as msg from 'message';
import * as highlight from 'highlight';
import Fab from 'fab';
-let timer, $root, selector, callback;
+let focusItems, $root, selector, callback;
const tooltip_options = {
target : "name",
@@ -44,7 +45,7 @@ class FControl extends React.Component {
$( "html, body" ).animate({ scrollTop: 0 }, "normal" );
break;
case "setting":
- modals.Render( ()=>setTimeout( ()=>se.Render(), 500 ));
+ setting.Render( ()=>setTimeout( ()=>se.Render(), 500 ));
break;
case "siteeditor":
se.Render();
@@ -80,8 +81,9 @@ class FControl extends React.Component {
}
componentWillMount() {
+ focusItems = $.extend( true, {}, conf.focusItems );
if ( storage.current.site.name.startsWith( "metaread::" ) || storage.current.site.name.startsWith( "txtread::" ) ) {
- delete conf.focusItems.option;
+ delete focusItems.option;
}
}
@@ -93,7 +95,7 @@ class FControl extends React.Component {
render() {
return (
- this.onAction(event, type ) } />
+ this.onAction(event, type ) } />
)
}
diff --git a/src/help_tips.json b/src/help_tips.json
new file mode 100644
index 000000000..7e07d1fba
--- /dev/null
+++ b/src/help_tips.json
@@ -0,0 +1,64 @@
+{
+ "tips": [
+ {
+ "idx": 0,
+ "name": "文档中心",
+ "icon": " ",
+ "url": "http://ksria.com/simpread/docs"
+ },
+ {
+ "idx": 1,
+ "name": "新手入门可以看这篇文章",
+ "icon": " ",
+ "url": "http://ksria.com/simpread/guide/"
+ },
+ {
+ "idx": 2,
+ "name": "查看当前版本新增功能",
+ "icon": " ",
+ "url": "#"
+ },
+ {
+ "idx": 3,
+ "name": "查看当前页的功能描述",
+ "icon": " ",
+ "url": "#"
+ },
+ {
+ "idx": 4,
+ "name": "简悦的汇总(新闻页)",
+ "icon": " ",
+ "url": "https://simp.red/news"
+ },
+ {
+ "idx": 5,
+ "name": "请通过 Github issues 提问",
+ "icon": " ",
+ "url": "https://github.com/Kenshin/simpread/issues/new"
+ },
+ {
+ "idx": 6,
+ "name": "如果简悦暂时未支持你使用的导出服务",
+ "icon": " ",
+ "url": "https://github.com/Kenshin/simpread/issues/473"
+ },
+ {
+ "idx": 7,
+ "name": "YouTube 加载出错的朋友请看这里",
+ "icon": " ",
+ "url": "https://github.com/Kenshin/simpread/issues/487"
+ },
+ {
+ "idx": 8,
+ "name": "当使用简悦疑似页面变慢的处理方式",
+ "icon": " ",
+ "url": "@performance"
+ },
+ {
+ "idx": 9,
+ "name": "当阅读模式并未符合你的期望时,如何进一步优化?",
+ "icon": " ",
+ "url": "https://github.com/Kenshin/simpread/issues/522"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/manifest.json b/src/manifest.json
index 76d124af2..8e4501556 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -1,7 +1,7 @@
{
"name" : "__MSG_extension_name__",
"default_locale" : "en",
- "version" : "1.1.2.5005",
+ "version" : "1.1.3",
"short_name" : "SimpRead",
"description" : "__MSG_extension_desc__",
"homepage_url" : "http://ksria.com/simpread",
@@ -44,6 +44,6 @@
],
"offline_enabled" : true,
"update_url" : "https://clients2.google.com/service/update2/crx",
- "content_security_policy" : "script-src 'self' https://www.google-analytics.com; object-src 'self'",
+ "content_security_policy" : "script-src 'self' 'unsafe-eval' https://www.google-analytics.com; object-src 'self'",
"manifest_version": 2
}
\ No newline at end of file
diff --git a/src/module/about.jsx b/src/module/about.jsx
index 228559ae4..6007968f1 100644
--- a/src/module/about.jsx
+++ b/src/module/about.jsx
@@ -58,7 +58,7 @@ ur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aKGIzS+XHtwdLJrOS7nzJmD9vZ2GX/0kWCOTOo6MQS7ngTr6507dwrB+ppy+vRp0dmJ7HYS4FiH4ITgqD106JBh27t3r3zynC8tLZUfIddZWVlCMHXeDVpaWuSHxDWPDxLs+HzEWxfzDPzky6/R0t2DyYo0rvky31PnIHWKfSyJGpuQh3kZxciua8RbX2WLPbqmEelc/y/uRXm/jElBq9rrfXOx2D+6WiPk6HEkmHE/jzajracXv0srEfuHpdUosN1V+11+aQ1HaBxp9uBL5BlI8LJ08uRJOYfpI8EcfdQpeg5HNAnW1zrB+poSGRkpNdmBe/bskY50rEPQzts6xzNH8927d43Ru2DBAqSlpaGkpAQ5OTlykSLBep6/v7/sy/P/7NmzQrDj8xEecbnPoEbotIgYFLZ1olJdaK51PcLM7DLxUexjSdSY+Fx4fZ6M6IrbMDd/g2hbK0KLrwnBetyL8jzUyF19Lhm31D5l6oL0N2sl2hWRehwJHorLxMKzcSjveICqBz3IbGqVs1ziXlLDERq7wR5z587FlClTDPBipPsmTpwoL1LXdTtH5qRJk4z1/PnzZazqawrrsN7kyZNlMtjXdPwOej5jCY5j3UedFzl+8mI2bdo0w8e6zKOP+z2vNuF+IWc4FGGmw/+CKfCfMB36GO5nksQ+am/wsDjTX47CXXWtu+ok07EImILDhz6PR8KkLkN63AvzlD5WnZmmvx6Xff6UakHyzZpncf7P4txPxUuMKfD4UO2oVCPu/9VwhEbCXjco38Y+zsJEgt4QgirrYVX/JGP3pTe24Deffvlaa2gcv68bEyZMwLexj7MYdT77zUF1u5uaFG6qM92CTmDUF+bXWoMEt3DEuhLczmW5Br7KbibBoby8uBK+py4xrgC381kh/EOHh3poktzGy40rQIvJ+G4jNrNNO5ch/2XnvyqleyAtV3GuAAAAAElFTkSuQmCC",
@@ -74,7 +74,7 @@ export default class About extends React.Component {
简悦 SimpRead
-
让你瞬间进入沉浸式阅读的扩展
+
为你提供「如杂志般沉浸式阅读体验」的扩展
@@ -91,7 +91,7 @@ export default class About extends React.Component {
帮助
-
+
简悦是一个免费且开源的项目
@@ -111,20 +111,20 @@ export default class About extends React.Component {
其它平台的简悦
-
+
包括但不限于:Chrome · Firefox · Safari · Apple Safari · Microsoft Edge · Opera · iPhone · iPad
@@ -145,8 +145,8 @@ export default class About extends React.Component {
-
diff --git a/src/module/account.jsx b/src/module/account.jsx
index 65318de0e..edf389fab 100644
--- a/src/module/account.jsx
+++ b/src/module/account.jsx
@@ -121,7 +121,7 @@ export default class AccountOpt extends React.Component {
this.onChangeEmail(e) } disable={false} />
diff --git a/src/module/actionbar.jsx b/src/module/actionbar.jsx
index 3aad9143b..f0abdfc46 100644
--- a/src/module/actionbar.jsx
+++ b/src/module/actionbar.jsx
@@ -32,7 +32,7 @@ export default class Actionbar extends React.Component {
const obj = this.props.items[key].items[item];
return (
{action.name}
- { items }
+ { items }
);
});
diff --git a/src/module/authorize.jsx b/src/module/authorize.jsx
index 292f7e10b..103f806bf 100644
--- a/src/module/authorize.jsx
+++ b/src/module/authorize.jsx
@@ -20,6 +20,10 @@ export default class Auth extends React.Component {
instapaper: {
username: "",
password: "",
+ },
+ jianguo: {
+ username: "",
+ password: "",
}
}
@@ -27,11 +31,12 @@ export default class Auth extends React.Component {
secret : undefined,
linnk : undefined,
instapaper : undefined,
+ jianguo: undefined,
}
onChange( state, value, flag ) {
let notify;
- const { dropbox, pocket, instapaper, linnk, evernote, onenote, gdrive } = exp,
+ const { dropbox, pocket, instapaper, linnk, evernote, onenote, gdrive, jianguo, yuque } = exp,
clear = ( id, name ) => {
Object.keys( storage.secret[id] ).forEach( item => storage.secret[id][item] = "" );
storage.Safe( ()=> {
@@ -42,10 +47,12 @@ export default class Auth extends React.Component {
success = ( id, name, data ) => {
notify && notify.complete();
Object.keys( data ).forEach( item => storage.secret[id][item] = data[item] );
+ id == "jianguo" && ( storage.secret[id]["access_token"] = { username: data.username, password: data.password });
storage.Safe( () => {
new Notify().Render( `已成功授权 ${name} 。` );
id == "linnk" && this.setState({ secret: storage.secret, linnk: false });
id == "instapaper" && this.setState({ secret: storage.secret, instapaper: false });
+ id == "jianguo" && this.setState({ secret: storage.secret, jianguo: false });
if ( location.hash.startsWith( "#labs?auth=" ) ) {
new Notify().Render( "3 秒钟将会关闭此页面..." );
setTimeout( () => {
@@ -72,6 +79,11 @@ export default class Auth extends React.Component {
return;
}
+ if ( state == "jianguo" && !flag && !storage.secret.jianguo.username ) {
+ this.setState({ jianguo: !this.state.jianguo });
+ return;
+ }
+
if ( !value ) {
state == "pocket" && $( this.refs.pocket_tags ).velocity( value ? "slideDown" : "slideUp" );
if ( state == "linnk" ) {
@@ -82,6 +94,10 @@ export default class Auth extends React.Component {
this.props.instapaper.username = "";
this.props.instapaper.password = "";
}
+ if ( state == "jianguo" ) {
+ this.props.jianguo.username = "";
+ this.props.jianguo.password = "";
+ }
clear( state, exp.Name( state ));
return;
}
@@ -170,6 +186,39 @@ export default class Auth extends React.Component {
});
}).fail( error => failed( error, gdrive.id, gdrive.name ));
break;
+ case "yuque":
+ yuque.New().Login();
+ yuque.dtd.done( ()=> {
+ yuque.Auth( ( result, error ) => {
+ if ( error ) failed( error, yuque.id, yuque.name );
+ else {
+ yuque.GetUser( ( result, error ) => {
+ if ( error ) failed( error, yuque.id, yuque.name );
+ else {
+ yuque.GetRepos( ( result, error ) => {
+ if ( error ) failed( error, yuque.id, yuque.name );
+ else if ( yuque.repos_id != "" ) {
+ success( yuque.id, yuque.name, { access_token: yuque.access_token, repos_id: yuque.repos_id });
+ } else {
+ yuque.CreateRepo( ( result, error ) => {
+ if ( error ) failed( error, yuque.id, yuque.name );
+ else success( yuque.id, yuque.name, { access_token: yuque.access_token, repos_id: yuque.repos_id });
+ });
+ }
+ });
+ }
+ });
+ }
+ });
+ }).fail( error => failed( error, yuque.id, yuque.name ));
+ break;
+ case "jianguo":
+ jianguo.Auth( this.props.jianguo.username, this.props.jianguo.password, result => {
+ if ( result && result.status == 401 ) {
+ failed( "授权错误,请重新授权。", jianguo.id, jianguo.name );
+ } else success( "jianguo", "坚果云", { username: this.props.jianguo.username, password: this.props.jianguo.password } );
+ });
+ break;
}
}
@@ -187,6 +236,35 @@ export default class Auth extends React.Component {
this.props.instapaper[state] = value;
}
+ jianguoOnChange( state, value ) {
+ this.props.jianguo[state] = value;
+ }
+
+ webdavOnChange() {
+ this.state.secret.webdav = event.target.value.split("\n");
+ storage.Safe( () => this.setState({ secret: storage.secret }), storage.secret );
+ }
+
+ webdavAuth() {
+ this.state.secret.webdav.forEach( ( item, idx ) => {
+ try {
+ item = JSON.parse( item );
+ if ( Object.keys( item ).join( "" ).replace( /url|name|password|user/ig, "" ) != "" ) {
+ throw "error";
+ }
+ exp.webdav.Auth( item.url, item.user, item.password, result => {
+ if ( result && ( result.status == 201 || result.status == 405 )) {
+ new Notify().Render( `${item.name} 验证成功。` );
+ } else {
+ new Notify().Render( 2, `${item.name} 授权失败,请确认用户名和密码。` );
+ }
+ });
+ } catch( error ) {
+ new Notify().Render( 2, `第 ${idx+1} 条数据格式错误,请重新输入。` );
+ }
+ });
+ }
+
componentWillReceiveProps( nextProps ) {
this.setState({ secret: storage.secret })
}
@@ -305,6 +383,57 @@ export default class Auth extends React.Component {
label={ this.state.secret.gdrive.access_token ? "已授权 Google 云端硬盘,是否取消授权?" : "是否连接并授权 Google 云端硬盘 ?" }
onChange={ (s)=>this.onChange( "gdrive", s ) } />
+
+ this.onChange( "jianguo", s ) } />
+
+ { this.state.jianguo &&
+
+
+ this.jianguoOnChange( "username", evt.target.value ) }
+ />
+ this.jianguoOnChange( "password", evt.target.value ) }
+ />
+
+
+
this.onChange( "jianguo", s, "login" ) } />
+
+ }
+
+
+ this.onChange( "yuque", s ) } />
+
+
+
+
WebDAV
+
简悦支持任意 WebDAV 的服务,包括:Box · TeraCLOUD 等
+
this.webdavOnChange(e) }
+ />
+ this.webdavAuth() } />
+
+
;
}
diff --git a/src/module/common.jsx b/src/module/common.jsx
index 7c290d1c3..32f7aff27 100644
--- a/src/module/common.jsx
+++ b/src/module/common.jsx
@@ -10,6 +10,7 @@ import * as menu from 'menu';
import * as watch from 'watch';
import * as exp from 'export';
import {br} from 'browser';
+import * as msg from 'message';
export default class CommonOpt extends React.Component {
@@ -23,20 +24,43 @@ export default class CommonOpt extends React.Component {
sync() {
let notify;
- const dbx = exp.dropbox,
- read = () => {
+ const dbx = exp.dropbox,
+ jianguo = exp.jianguo,
+ write = () => {
+ storage.option.sync = Now();
+ storage.Write( () => {
+ writeConfig();
+ });
+ },
+ readDropbox = () => {
notify = new Notify().Render({ content: "数据同步中,请稍等...", state: "loading" });
dbx.Exist( dbx.config_name, ( result, error ) => {
if ( result == -1 ) {
- storage.option.sync = Now();
- storage.Write( () => {
- dbx.Write( dbx.config_name, storage.Export(), callback );
- });
+ write();
} else {
dbx.Read( dbx.config_name, callback );
}
});
},
+ readJianguo = ( obj ) => {
+ notify = new Notify().Render({ content: "数据同步中,请稍等...", state: "loading" });
+ jianguo.Read( obj.username, obj.password, jianguo.config_name, result => {
+ if ( result && result.status == 404 ) {
+ write();
+ } else if ( result && result.status == 200 ) {
+ callback( "read", result.done );
+ }
+ });
+ },
+ writeConfig = () => {
+ if ( storage.option.save_at == "dropbox" ) {
+ dbx.Write( dbx.config_name, storage.Export(), callback );
+ } else {
+ jianguo.Add( storage.secret.jianguo.username, storage.secret.jianguo.password, jianguo.root + "/" + jianguo.config_name, storage.Export(), result => {
+ callback( "write", undefined, result && [ 201, 204 ].includes( result.status ) ? undefined : "error" );
+ });
+ }
+ },
callback = ( type, result, error ) => {
notify.complete();
switch ( type ) {
@@ -50,11 +74,8 @@ export default class CommonOpt extends React.Component {
remote = new Date( json.option.update.replace( /年|月/ig, "-" ).replace( "日", "" ));
if ( ver.Compare( json.version ) == 1 ) {
new Notify().Render( "本地版本与远程版本不一致,且本地版本较新,是否覆盖远程版本?", "覆盖", () => {
- storage.option.sync = Now();
- storage.Write( () => {
- watch.SendMessage( "import", true );
- dbx.Write( dbx.config_name, storage.Export(), callback );
- }, storage.simpread );
+ watch.SendMessage( "import", true );
+ write();
});
}
else if ( local < remote ) {
@@ -69,11 +90,8 @@ export default class CommonOpt extends React.Component {
});
} else if ( local > remote ) {
new Notify().Render( "本地配置文件较新,是否覆盖远程备份文件?", "覆盖", () => {
- storage.option.sync = Now();
- storage.Write( () => {
- watch.SendMessage( "import", true );
- dbx.Write( dbx.config_name, storage.Export(), callback );
- }, storage.simpread );
+ watch.SendMessage( "import", true );
+ write();
});
} else {
new Notify().Render( "本地与远程数据相同,无需重复同步。" );
@@ -83,26 +101,31 @@ export default class CommonOpt extends React.Component {
};
storage.Safe( ()=> {
- const sec_dbx = storage.secret.dropbox;
- !sec_dbx.access_token ?
- new Notify().Render( `未对 ${ dbx.name } 授权,请先进行授权操作。`, "授权", () => {
- dbx.New().Auth();
- dbx.dtd
- .done( () => {
- sec_dbx.access_token = dbx.access_token;
- storage.Safe( () => {
- new Notify().Render( "授权成功!" );
- read();
- }, storage.secret );
- })
- .fail( error => {
- console.error( error )
- new Notify().Render( 2, `获取 ${ dbx.name } 授权失败,请重新获取。` );
- });
- }) : ( () => {
- dbx.access_token = sec_dbx.access_token;
- read();
- })();
+ if ( storage.option.save_at == "dropbox" ) {
+ const sec_dbx = storage.secret.dropbox;
+ !sec_dbx.access_token ?
+ new Notify().Render( `未对 ${ dbx.name } 授权,请先进行授权操作。`, "授权", () => {
+ dbx.New().Auth();
+ dbx.dtd
+ .done( () => {
+ sec_dbx.access_token = dbx.access_token;
+ storage.Safe( () => {
+ new Notify().Render( "授权成功!" );
+ readDropbox();
+ }, storage.secret );
+ })
+ .fail( error => {
+ console.error( error )
+ new Notify().Render( 2, `获取 ${ dbx.name } 授权失败,请重新获取。` );
+ });
+ }) : ( () => {
+ dbx.access_token = sec_dbx.access_token;
+ readDropbox();
+ })();
+ } else {
+ const jianguo = storage.secret.jianguo;
+ !jianguo.access_token ? new Notify().Render( 2, `坚果云
授权 后才能使用此功能,如何授权
请看这里 。` ) : readJianguo( storage.secret.jianguo );
+ }
});
}
@@ -128,13 +151,14 @@ export default class CommonOpt extends React.Component {
storage.version != json.version &&
storage.Fix( json.read.sites, json.version, storage.version, json.focus.sites );
json = ver.Verify( json.version, json );
- new Notify().Render( "上传版本太低,已自动转换为最新版本。" );
+ new Notify().Render({ type: 2, content: `上传版本太低,已自动转换为最新版本。`, state: "holdon" });
}
menu.Refresh( json.option.menu );
+ ver.Incompatible( json.version, json );
json.option.origins && json.option.origins.length > 0 &&
- new Notify().Render( "导入的配置文件包含了第三方源,请通过手动导入。" );
+ new Notify().Render({ content: `导入的配置文件包含了第三方源,刷新后请重新
手动导入 。`, state: "holdon" });
json.option.plugins && json.option.plugins.length > 0 &&
- new Notify().Render( "导入的配置文件包含了插件,请通过手动导入。" );
+ new Notify().Render({ content: `导入的配置文件包含了插件,刷新后请重新
手动导入 。`, state: "holdon" });
this.importsecret( json.option.secret, { ...json.secret }, () => {
delete json.secret;
storage.Write( ()=> {
@@ -170,6 +194,14 @@ export default class CommonOpt extends React.Component {
}
}
+ oldnewsites() {
+ new Notify().Render( "此功能转移到
站点管理 选项卡里面,3 秒钟后自动切换到此选项卡。" );
+ setTimeout( ()=> {
+ location.href = location.origin + "/options/options.html#labs";
+ window.dispatchEvent( new CustomEvent( msg.MESSAGE_ACTION.turn_tab, { detail: { page: 3 }}));
+ }, 3000 );
+ }
+
newsites() {
const notify = new Notify().Render({ content: "数据同步中,请稍等...", state: "loading" });
storage.GetRemote( "remote", ( result, error ) => {
@@ -223,12 +255,15 @@ export default class CommonOpt extends React.Component {
render() {
return(
-
+ this.sync() } />
+
+
this.export() } />
-
+
+
this.newsites() } />
+ onClick={ ()=>this.oldnewsites() } />
+
+
` );
+ const ajax = () => {
+ $.ajax({
+ url : storage.help_service + "?=" + Math.round(+new Date()),
+ method: "GET",
+ }).done( ( result, textStatus, jqXHR ) => {
+ if ( result && result.tips.length == 0 ) {
+ $( ".guide .loading" ).html( '没有新的消息 ' ).css({"animation": ".1s reverse fadein,235ms cubic-bezier(.4,0,.2,1) popup"});
+ } else {
+ $( ".guide" ).find( "hr" ).remove();
+ this.setState({tips: this.state.tips.concat( result.tips ) });
+ $( ".guide .loading" ).remove();
+ }
+ }).fail( error => {
+ $( ".guide .loading" ).html( `发生了一些错误,请稍后再试。 ` )
+ });
+ };
+ setTimeout( ajax, 1000 );
+ }
+
+ componentWillMount() {
+ storage.GetRemote( "help_tips", ( result, error ) => {
+ result && result.tips && this.setState({ tips: result.tips });
+ });
+ }
+
+ componentDidUpdate() {
+ $( "guid-card[id='3']" ).after( " " );
+ }
+
+ componentDidMount() {
+ $( ".guide" ).scroll( event => {
+ if ( $( event.target ).scrollTop() > 35 ) {
+ $( ".guide .title" )
+ .css({"box-shadow": "2px 4px 10px rgba(0,0,0,.2)" })
+ .find( "span" ).text( "帮助中心 > 快捷答案" ).css({"font-weight": "normal", "animation": ".1s reverse fadein,235ms cubic-bezier(.4,0,.2,1) popup" });
+ } else {
+ $( ".guide .title" )
+ .removeAttr( "style" )
+ .find( "span" ).text( "帮助中心" ).removeAttr( "style" );
+ }
+ });
+ }
+
+ render() {
+ const tips = this.state.tips.map( item => {
+ return (
+ this.onClick( e, item.idx, item.url, item.detail ) }>
+
+
+ { item.name }
+
+
+ )
+ });
+ return (
+
+
帮助中心
+
快捷答案
+
+ { tips }
+
+
this.onLoadingClick() }>加载更多
+
+ )
+ }
+}
+
+/**
+ * Show current version intro
+ *
+ * @param {string} id include: version id | hash id, e,g. 1.1.3, common, simple
+ * @param {boolean} verify current url and intros.start()
+ * @param {boolean} detail @see ver.tips data structure
+ */
+function start( id, verify = true, detail = {} ) {
+ const [ rm_idx, rm_target, rm_steps ] = [ detail.idx, detail.target, detail.steps ],
+ target = rm_target ? rm_target : ver.tips[ id ].target,
+ idx = rm_idx ? rm_idx : ver.tips[ id ].idx,
+ steps = (() => {
+ const items = rm_steps ? rm_steps : ver.tips[ id ].items;
+ return items.map( item => { return { element: $( ver.tips.root( item.id ) )[0], intro: item.intro }})
+ })(),
+ intros = intro(),
+ start = () => {
+ intros.setOptions({
+ hintButtonLabel: "确认",
+ nextLabel: "下一条 →",
+ prevLabel: "← 上一条",
+ skipLabel: "",
+ doneLabel: "完成",
+ hidePrev: true,
+ hideNext: true,
+ steps
+ });
+ intros.start();
+ };
+ if ( verify && location.hash != `#${ target }` ) {
+ location.href = location.origin + "/options/options.html#labs";
+ window.dispatchEvent( new CustomEvent( msg.MESSAGE_ACTION.turn_tab, { detail: { page: idx }}));
+ setTimeout( start, 500 );
+ } else {
+ start();
+ }
+}
+
+export {
+ Guide,
+ start as Start
+}
\ No newline at end of file
diff --git a/src/module/labs.jsx b/src/module/labs.jsx
index 7d8a69d36..b42ac60d0 100644
--- a/src/module/labs.jsx
+++ b/src/module/labs.jsx
@@ -29,10 +29,14 @@ export default class LabsOpt extends React.Component {
!child && ( this.props[model][state]=value );
child && ( this.props[model][state][child]=value );
child && menu.Refresh( this.props[model][state] );
+ if ( model == "option" && state == "save_at" ) {
+ this.props[model][state] = value ? "dropbox" : "jianguo";
+ }
this.props.onChange && this.props.onChange( true );
model == "read" && state == "auto" && this.exclusionState( value );
model == "read" && state == "toc" && this.tocState( value );
model == "read" && state == "cleanup" && this.cleanupState( value );
+ model == "option" && state == "preload" && this.lazyloadState( value );
}
changeExclusion( event ) {
@@ -45,6 +49,11 @@ export default class LabsOpt extends React.Component {
this.props.onChange && this.props.onChange( false );
}
+ changeLazyload( event ) {
+ this.props.option.lazyload = event.target.value.split("\n");
+ this.props.onChange && this.props.onChange( false );
+ }
+
tocState( value ) {
$( this.refs.toc ).velocity( value ? "slideDown" : "slideUp" );
}
@@ -53,6 +62,10 @@ export default class LabsOpt extends React.Component {
$( this.refs.cleanup ).velocity( value ? "slideDown" : "slideUp" );
}
+ lazyloadState( value ) {
+ $( this.refs.lazyload ).velocity( value ? "slideDown" : "slideUp" );
+ }
+
exclusionState( value ) {
$( this.refs.exclusion ).velocity( value ? "slideDown" : "slideUp" );
$( this.refs.whitelist ).velocity( !value ? "slideDown" : "slideUp" );
@@ -67,10 +80,12 @@ export default class LabsOpt extends React.Component {
this.exclusionState( this.props.read.auto );
this.tocState( this.props.read.toc );
this.cleanupState( this.props.read.cleanup == undefined ? true : this.props.read.cleanup );
+ this.lazyloadState( this.props.option.preload );
}
onClick( state ) {
state == "custom" && ( location.href = location.origin + "/options/custom.html" );
+ state == "notice" && ( location.href = location.origin + "/options/notice.html?is_update=" + sessionStorage.getItem( "is_update" ));
}
render() {
@@ -78,16 +93,21 @@ export default class LabsOpt extends React.Component {
全局
+
this.onChange(s, "option", "esc") } />
+
+
this.onChange(s, "option", "br_exit") } />
+
+
黑名单
加入其中后,不再启动简悦,有别于白名单和排除列表,黑名单则彻底不加载。
@@ -98,13 +118,29 @@ export default class LabsOpt extends React.Component {
onChange={ (e)=>this.blacklist(e) }
/>
+
+
this.onChange(s, "option", "secret") } />
+
+
+ this.onChange(s, "option", "save_at") } />
+
+
this.onChange(s, "option", "uninstall") } />
+
右键菜单
this.onChange(s, "option", "menu", "unrdist" ) } />
+
+
聚焦模式
this.onChange(s, "focus", "highlight") } />
+
+
阅读模式
+
this.onChange(s, "read", "progress") } />
+
+
this.onChange(s, "read", "controlbar") } />
+
+
this.onChange(s, "read", "fap") } />
+
+
this.onChange(s, "read", "highlight") } />
+
+
this.onChange(s, "read", "toc_hide") } />
+
+
this.onChange(s, "read", "auto") } />
+
+
排除列表
加入其中后将不会自动进入阅读模式,仅当启用「自动进入阅读模式」有效。
@@ -219,8 +272,11 @@ export default class LabsOpt extends React.Component {
onChange={ (e)=>this.changeWhitelist(e) }
/>
+
+
+
this.onChange(s, "read", "cleanup") } />
+
this.onChange(s, "read", "pure") } />
+ 如果经常阅读代码的话,请安装
代码段增强 包括:高亮,去重,支持 CSDN 等特殊情况的代码段
+
+
+
+
this.onChange(s, "option", "preload") } />
+ 2. 关闭此功能后,只有进入阅读模式时才会对页面进行解析,所以经常使用简悦的用户请勿关闭它。
+ 3. 此功能的优先级比「自动进入阅读模式」高;当关闭此功能时,自动进入阅读模式将不会工作。
+
+
+
+
延迟加载列表
+
加入其中后的网址将不会启用预加载功能。
+
此功能适合「经常使用简悦但又性能不够」的用户、需要动态加载及支持 Mathjax 解析的页面等。
+
this.changeLazyload(e) }
+ />
+
+
+
+
自定义样式
this.onClick('custom') }>
-
+
增强「中文阅读体验」设置
包括:标题、描述、正文的字间距、行间距、首行缩进等及自定义 CSS。
+
+
+
+
消息中心
+
+ this.onChange(s, "option", "notice") } />
+
+
this.onClick('notice') }>
+
+
查看全部消息
+
简悦会不定期发送一些消息,包括:新的插件上线、新的适配站点上线、修复 Bug 等
+
+
+
+
)
diff --git a/src/module/notice.jsx b/src/module/notice.jsx
new file mode 100644
index 000000000..b8d8f56fc
--- /dev/null
+++ b/src/module/notice.jsx
@@ -0,0 +1,205 @@
+console.log( "=== simpread notice load ===" )
+
+import {storage} from 'storage';
+import th from 'theme';
+import * as ss from 'stylesheet';
+import * as puplugin from 'puplugin';
+import * as watch from 'watch';
+import Button from 'button';
+
+/**
+ * Write storage
+ *
+ * @param {func} callback
+ */
+const write = ( callback ) => {
+ storage.Write( () => {
+ console.log( "current notice is ", storage.notice )
+ watch.SendMessage( "option", true );
+ callback && callback();
+ });
+}
+
+export default class Notice extends React.Component {
+
+ static defaultProps = {
+ is_update: false,
+ step: 20,
+ };
+
+ static propsType = {
+ step: React.PropTypes.number,
+ is_update: React.PropTypes.bool,
+ };
+
+ state = {
+ items: [],
+ detail: "",
+ failed: false,
+
+ total: 0,
+ page : 1,
+ }
+
+ onClick( event, id ) {
+ const markdown = puplugin.Plugin( "markdown" ),
+ converter = new markdown.default.Converter(),
+ obj = this.state.items.filter( item => item.id == id ),
+ item = obj[0],
+ html = converter.makeHtml( item.content ),
+ tmpl = `
+
${item.title}
+
+ ${item.category.name}
+ 发布于 ${item.date}
+
+
${html}
+
`;
+ $( "notice .detail" ).addClass( "simpread-theme-root" ).html( tmpl );
+ }
+
+ onReadallClick() {
+ new Notify().Render( "snackbar", "是否将全部消息标记为已读?", "确认", () => {
+ storage.notice.read = [];
+ this.state.items.forEach( ( item, idx ) => { storage.notice.read.push( idx + 1 ) });
+ write( ()=> {
+ new Notify().Render( "已全部设置为已读,3 秒后自动刷新本页..." );
+ setTimeout( ()=>location.reload(), 3000 )
+ });
+ });
+ }
+
+ onLoadmoreClick() {
+ this.setState({ page: this.state.page + 1 });
+ }
+
+ componentWillMount() {
+ if ( this.props.is_update ) {
+ $.ajax( storage.notice_service.message )
+ .done( result => {
+ storage.Notice( undefined, result.notice );
+ storage.notice.latest = result.notice.length;
+ write();
+ this.setState({ items: result.notice, total: Math.ceil( result.notice.length / this.props.step ) });
+ })
+ .fail( ( jqXHR, textStatus, errorThrown ) => {
+ this.setState({ failed: true });
+ });
+ } else {
+ storage.Notice( result => {
+ this.setState({ items: result.notice, total: Math.ceil( result.notice.length / this.props.step ) });
+ });
+ }
+ }
+
+ componentDidMount() {
+ th.Change( "pixyii" );
+ }
+
+ render() {
+ let dom;
+ const items = this.state.items.slice( 0, this.state.page * this.props.step );
+ if ( this.state.failed ) {
+ dom =
+
+
+ ;
+ } else if ( this.state.items.length == 0 ) {
+ dom =
+
+
+ ;
+ } else if ( this.state.items.length > 0 ) {
+ dom =
+
+
+
+ this.onReadallClick() } />
+
+
this.onClick( e, id ) } />
+ { this.state.page < this.state.total &&
+
+ this.onLoadmoreClick() } />
+
+ }
+
+
+ ;
+ }
+ return (
+ { dom }
+ )
+ }
+}
+
+class List extends React.Component {
+
+ static defaultProps = {
+ list: [],
+ onClick: undefined,
+ };
+
+ static propTypes = {
+ list : React.PropTypes.array,
+ onClick: React.PropTypes.func,
+ }
+
+ onClick( event, id ) {
+ $( "list" ).removeClass( "selected" );
+ $( `list[id="${id}"]` ).addClass( "selected" );
+ this.props.onClick( event, id );
+ }
+
+ onActive( event, id ) {
+ $( `list[id="${id}"]` ).addClass( "active" );
+ storage.notice.read.push( id );
+ write( () => new Notify().Render( "已设置为已读。" ) );
+ }
+
+ render() {
+ const list = this.props.list.map( item => {
+ const active = storage.notice.read.findIndex( value=>value==item.id ) != -1 ? " active" : "";
+ return (
+ this.onClick( e, item.id ) }>
+ { item.title }
+
+ { item.category.name }
+ { item.date }
+
+ { active == "" &&
+
+ this.onActive( e, item.id ) }
+ />
+
+ }
+
+ )
+ });
+ return (
+
+ { list }
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/src/module/plugins.jsx b/src/module/plugins.jsx
index ee59dc7b5..60c0ef46f 100644
--- a/src/module/plugins.jsx
+++ b/src/module/plugins.jsx
@@ -1,4 +1,4 @@
-console.log( "===== simpread option labs load =====" )
+console.log( "===== simpread option plugins load =====" )
import {storage} from 'storage';
import * as run from 'runtime';
@@ -180,14 +180,13 @@ export default class PluginsOpt extends React.Component {
storage.option.plugins.forEach( id => {
run.Install( id, undefined, result => {
if ( !result ) {
- new Notify().Render( 2, id + "获取失败,请稍后再试。" );
- return;
+ new Notify().Render( 2, id + " 获取失败,请稍后再试。" );
}
count++;
- if ( storage.plugins[id].version != result.version ) {
- storage.plugins[result.id] = result;
- is_update = true;
- }
+ if ( storage.plugins[id].version != result.version ) {
+ storage.plugins[result.id] = result;
+ is_update = true;
+ }
count == storage.option.plugins.length && complete();
});
});
@@ -204,6 +203,7 @@ export default class PluginsOpt extends React.Component {
}
import() {
+ let newPlugins = {};
if ( storage.option.plugins.length == 0 ) {
new Notify().Render( "当前配置文件没有任何插件。" );
return;
@@ -214,23 +214,20 @@ export default class PluginsOpt extends React.Component {
storage.option.plugins.forEach( id => {
run.Install( id, undefined, result => {
if ( !result ) {
- new Notify().Render( 2, id + "获取失败,请稍后再试。" );
- return;
- }
+ new Notify().Render( 2, id + " 获取失败,请稍后再试。" );
+ } else newPlugins[result.id] = result;
count++;
- storage.plugins[result.id] = result;
count == storage.option.plugins.length && complete();
});
});
}});
const complete = () => {
storage.Plugins( result => {
- storage.option.plugins = Object.keys( storage.plugins );
storage.Write( () => {
new Notify().Render( "已从配置文件导入完毕。" );
this.setState({ plugins: Object.values( storage.plugins ) });
});
- }, storage.plugins );
+ }, newPlugins );
}
}
@@ -259,36 +256,49 @@ export default class PluginsOpt extends React.Component {
管理
+
this.import() } />
+
+
`}
color="#fff" backgroundColor="#00BCD4"
waves="md-waves-effect md-waves-button"
onClick={ ()=>this.addmore() } />
+
+
this.update() } />
+
+
this.clear() } />
+
- 已安装
+
+
{ this.state.plugins.length == 0 ? "" : "已安装 " + this.state.plugins.length + " 个插件 " }
+ { this.state.plugins.length > 5 &&
过多的插件会使进入阅读模式变慢,建议不要超过 6 个 }
+
+
)
diff --git a/src/module/modals.jsx b/src/module/setting.jsx
similarity index 92%
rename from src/module/modals.jsx
rename to src/module/setting.jsx
index 62d16a735..6e91dde02 100644
--- a/src/module/modals.jsx
+++ b/src/module/setting.jsx
@@ -1,4 +1,4 @@
-console.log( "=== simpread option modals ===" )
+console.log( "=== simpread option setting ===" )
import FocusOpt from 'focusopt';
import ReadOpt from 'readopt';
@@ -25,14 +25,14 @@ let callback;
*/
class Modals extends React.Component {
- // close modals
+ // close setting
close( restore = rollback() ) {
dia.Close();
}
- // save modals focus option
+ // save setting focus option
save() {
- console.log( "modals click submit button.", storage.current )
+ console.log( "setting click submit button.", storage.current )
watch.Verify( ( state, result ) => {
if ( state ) {
console.log( "watch.Lock()", result );
diff --git a/src/module/siteeditor.jsx b/src/module/siteeditor.jsx
index 49ba6320d..c95caf630 100644
--- a/src/module/siteeditor.jsx
+++ b/src/module/siteeditor.jsx
@@ -1,4 +1,4 @@
-console.log( "=== simpread option siteeditor ===" )
+console.log( "=== simpread option siteeditor load ===" )
import { storage } from 'storage';
import * as watch from 'watch';
@@ -39,14 +39,7 @@ class SiteEditor extends React.Component {
delete() {
console.log( "siteeditor click delete button.", storage.current.site )
- /*
- if ( site.target != "local" ) {
- new Notify().Render( 2, `只能删除
本地站点 ,如需要请使用 站点管理器 删除。` );
- return;
- }
- */
new Notify().Render( "是否删除当前适配站点?", "删除", () => {
- //site.target != "local" ? new Notify().Render( 3, `
无法删除 当前站点,如不想显示请加入黑名单。` ) :
site.name.startsWith( "tempread::" ) ? new Notify().Render( 2, `当前站点为自动识别,无误删除。` ) :
storage.pr.Deletesite( storage.current.site.target, site.url, result => {
if ( result == -1 ) new Notify().Render( 2, `此站已被删除,请勿重复操作。` );
@@ -80,7 +73,8 @@ class SiteEditor extends React.Component {
} else if ( site.include.trim() == "" ) {
new Notify().Render( 2, "高亮区域不能为空。" );
} else {
- storage.pr.Updatesite( storage.current.site.target, storage.current.url, [ site.url, storage.pr.Cleansite(site) ]);
+ // changed storage.current.site.target to 'local'
+ storage.pr.Updatesite( 'local', storage.current.url, [ site.url, storage.pr.Cleansite(site) ]);
storage.Writesite( storage.pr.sites, () => {
new Notify().Render( 0, "更新成功,页面刷新后生效!" );
watch.SendMessage( "site", true );
@@ -101,8 +95,12 @@ class SiteEditor extends React.Component {
render() {
site = { ...storage.pr.current.site };
- if ( storage.pr.state == "temp" ) {
- storage.pr.dom && ( site.include = storage.pr.dom.outerHTML.replace( storage.pr.dom.innerHTML, "" ).replace( /<\/\S+>$/i, "" ));
+ if ( storage.pr.state == "temp" && storage.pr.dom ) {
+ site.name = site.name.replace( "tempread::", "" );
+ let include = storage.pr.Utils().dom2Xpath( storage.pr.dom );
+ if ( include != "" ) {
+ site.include = `[[\`${include}\`]]`;
+ } else site.include = storage.pr.dom.outerHTML.replace( storage.pr.dom.innerHTML, "" ).replace( /<\/\S+>$/i, "" )
}
return (
diff --git a/src/module/sites.jsx b/src/module/sites.jsx
index ca31c9696..bea1fd7dd 100644
--- a/src/module/sites.jsx
+++ b/src/module/sites.jsx
@@ -1,13 +1,13 @@
console.log( "===== simpread option sites load =====" )
-import {storage} from 'storage';
-import {browser} from 'browser';
-import * as msg from 'message';
+import {storage} from 'storage';
+import {browser} from 'browser';
+import * as msg from 'message';
import * as watch from 'watch';
-import * as ss from 'stylesheet';
+import * as ss from 'stylesheet';
-import TextField from 'textfield';
-import Button from 'button';
+import TextField from 'textfield';
+import Button from 'button';
class Card extends React.Component {
@@ -103,6 +103,23 @@ class Cards extends React.Component {
export default class SitesOpts extends React.Component {
+ newsites() {
+ const notify = new Notify().Render({ content: "数据同步中,请稍等...", state: "loading" });
+ storage.GetRemote( "remote", ( result, error ) => {
+ notify.complete();
+ if ( !error ) {
+ const count = storage.pr.Addsites( result );
+ storage.Writesite( storage.pr.sites, () => {
+ watch.SendMessage( "site", true );
+ count == 0 ? new Notify().Render( "适配列表已同步至最新版本。" ) : new Notify().Render( 0, `适配列表已同步成功,本次新增 ${ count } 个站点,2 秒后自动自动刷新。` );
+ count > 0 && setTimeout( ()=>location.reload(), 2000 );
+ });
+ } else {
+ new Notify().Render( 3, `同步时发生了一些问题,并不会影响本地配置文件,请稍后再试!` );
+ }
+ });
+ }
+
onClick( state ) {
state == "sitemgr" && ( location.href = location.origin + "/options/sitemgr.html" );
}
@@ -114,6 +131,7 @@ export default class SitesOpts extends React.Component {
}
origins( type ) {
+ /*
if ( type == "origins" ) {
storage.GetRemote( "origins", ( result, error ) => {
if ( error ) new Notify().Render( 2, "获取失败,请稍后重新加载。" );
@@ -124,7 +142,9 @@ export default class SitesOpts extends React.Component {
new Notify().Render( "官方源加载成功。" );
}
});
- } else if ( type == "import" ) {
+ } else
+ */
+ if ( type == "import" ) {
new Notify().Render( "snackbar", "导入后会覆盖掉原来的第三方适配列表,请问是否覆盖?", "确认", () => {
const urls = this.props.option.origins.filter( item => {
return item.trim() != "" && item.trim().startsWith( "http" ) && item.trim().endsWith( ".json" )
@@ -305,17 +325,29 @@ export default class SitesOpts extends React.Component {
render() {
return (
+
+
+
+ this.newsites() } />
+
+
+
第三方适配源
+
this.changeOrigins() }
/>
this.origins( "origins" ) } />
@@ -330,16 +362,11 @@ export default class SitesOpts extends React.Component {
waves="md-waves-effect md-waves-button"
onClick={ ()=>this.origins( "clear" ) } />
- this.onClick('sitemgr') }>
-
-
站点管理器
-
可以编辑全部的适配站点,包括:官方适配源、站点集市适配源、第三方适配源、自定义适配源。
-
-
-
管理
+
+
this.clear() } />
+
+
+ this.onChange(t) } />
+
+
-
已安装
-
-
this.onChange(t) } />
+
+
站点管理器
+
this.onClick('sitemgr') }>
+
+
可以管理全部的适配站点
+
包括:官方适配源、第三方适配源、站点集市适配源、自定义适配源。
+
+
+
)
diff --git a/src/module/unrdist.jsx b/src/module/unrdist.jsx
index a780e8a59..ebfd426f3 100644
--- a/src/module/unrdist.jsx
+++ b/src/module/unrdist.jsx
@@ -104,17 +104,21 @@ export default class Unrdist extends React.Component {
items = this.state.items.slice( 0, this.state.page * this.props.step ),
content = this.state.items && this.state.items.length > 0 ?
+
this.onAction(e,i,t,d) } />
+
+
this.onClick() } />
+
:
diff --git a/src/module/welcome.jsx b/src/module/welcome.jsx
index fc3677066..269557a73 100644
--- a/src/module/welcome.jsx
+++ b/src/module/welcome.jsx
@@ -3,10 +3,11 @@ console.log( "===== simpread option welcome page load =====" )
import 'carous_css';
import 'carousel';
-import Button from 'button';
+import Button from 'button';
-import * as ss from 'stylesheet';
-import {br} from 'browser';
+import * as ss from 'stylesheet';
+import {br} from 'browser';
+import * as msg from 'message';
const welcbgcls = "welcome",
welcbgclsjq = `.${welcbgcls}`,
@@ -110,12 +111,11 @@ class Welcome extends React.Component {
nextClick() {
if ( curidx != max ) {
$( '.carousel.carousel-slider' ).carousel( "next" );
- } else {
- exit();
- }
+ } else this.closeClick();
}
closeClick() {
+ window.dispatchEvent( new CustomEvent( msg.MESSAGE_ACTION.welcome_close, { detail: { first: this.props.first, version: this.props.version }}));
exit();
}
@@ -167,9 +167,9 @@ class Welcome extends React.Component {
{ this.props.first ? "欢迎使用 简悦": "简悦 已升至最新版" }
- { br.isFirefox() ? "Chrome 好评率超过 99% 的阅读模式现已来到 Firefox。" : "让你瞬间进入沉浸式阅读的 Chrome 扩展,类似 Safari 的阅读模式。" }
- 去掉干扰元素,提升阅读体验,
「简」 单阅读,愉
「悦」 心情。
- 为了达到
「完美」 的阅读模式,简悦适配了
数百种类型 的网站。
+ { br.isFirefox() ? "Chrome 好评率超过 99% 的阅读模式现已来到 Firefox" : "让你瞬间进入沉浸式阅读的 Chrome 扩展,类似 Safari 的阅读模式" }
+ 去掉干扰元素,提升阅读体验,
「简」 单阅读,愉
「悦」 心情
+ 为了达到
「完美」 的阅读模式,简悦适配了
数百种类型 的网站
@@ -180,10 +180,10 @@ class Welcome extends React.Component {
阅读模式 与 聚焦模式
}
@@ -196,7 +196,7 @@ class Welcome extends React.Component {
全新的
词法分析引擎 2.0 ,简悦可以识别出
TXT ·
Markdown ·
LaTeX ·
代码段
Wordpress · Hexo · Ghost · Discuz 等博客 / 论坛的页面了!
- 甚至,只要是结构良好的页面,(无需适配)自动生成阅读模式,详细
请看这里 。
+ 甚至,只要是结构良好的页面,(无需适配)自动生成阅读模式,详细
请看这里
}
@@ -207,9 +207,9 @@ class Welcome extends React.Component {
连接你的生产力工具
- 支持下载 HTML · PDF · Markdown · PNG ·
Epub 到本地 以及 发送到
Kindle 。
- 支持输出到 Dropbox · 印象笔记 · Evernote · Onenote · Google 云端硬盘。
- 发送页面链接到 Pocket · Instapaper · Linnk,详细
请看这里 。
+ 支持下载 HTML · PDF · Markdown · PNG ·
Epub 到本地 以及 发送到
Kindle
+ 支持输出到 坚果云 · 语雀 · Dropbox · 印象笔记 · Evernote · Onenote · Google 云端硬盘
+ 发送页面链接到
稍后读 · Pocket · Instapaper · Linnk,详细
请看这里
}
@@ -220,9 +220,9 @@ class Welcome extends React.Component {
站点编辑器 · 站点适配源 · 站点管理器
}
@@ -234,7 +234,7 @@ class Welcome extends React.Component {
全新的控制栏面板
「告别」传统、单一的控制栏,全部功能「一览无余」
- 主题、字体样式、大小、版面布局更改一键完成。
+ 主题、字体样式、大小、版面布局更改一键完成
}
@@ -245,9 +245,9 @@ class Welcome extends React.Component {
插件系统
}
@@ -260,12 +260,12 @@ class Welcome extends React.Component {
方便提交,让你的站点为数以万计的简悦用户使用
官方主适配源、第三方适配源、站点集市适配源、自定义适配源一站式浏览
- 现在就访问
站点集市 吧,看看有什么增加的新适配站点。
+ 现在就访问
站点集市 吧,看看有什么增加的新适配站点
}
- { !first &&
+ { !first &&
@@ -278,6 +278,32 @@ class Welcome extends React.Component {
}
+ { !first && version == "1.1.3" &&
+
+
+
+ 导出服务又添新成员,更支持 WebDAV
+
+
+
}
+
+ { (( !first && version == "1.1.3" ) || version == "all" ) &&
+
+
+
+ 消息中心 · 帮助中心 · 新手入门
+
+
消息中心 让沟通更加便利
+ 内置常用的文档说明、常见问题、及选项页全部功能说明的
帮助中心
+ 功能太多,无从下手?
新手入门 不再让新手望而却步
+
+
+
}
+
@@ -286,6 +312,10 @@ class Welcome extends React.Component {
分享卡,右键菜单添加 「白名单 / 排除列表 / 黑名单」等
详细说明请看 更新日志
}
+ { !first && version == "1.1.3" &&
}
@@ -316,10 +346,10 @@ class Welcome extends React.Component {
}
/**
- * Exit()
+ * Exit
*/
function exit() {
- $( welcbgclsjq ).velocity({ opacity: 0 }, { complete: ()=>{
+ $( welcbgclsjq ).velocity({ opacity: 0 }, { complete: () => {
ReactDOM.unmountComponentAtNode( $(welcbgclsjq)[0] );
}});
}
diff --git a/src/options/custom.html b/src/options/custom.html
index 1362d4909..319afafa2 100644
--- a/src/options/custom.html
+++ b/src/options/custom.html
@@ -11,7 +11,7 @@
Property
- 简悦 - 让你瞬间进入沉浸式阅读的扩展
+ 简悦 SimpRead - 为你提供「如杂志般沉浸式阅读体验」的扩展
为了达到完美的阅读模式这个小目标 ,我适配了 数百种类型 的网站,因此诞生了简悦。
@@ -82,7 +82,7 @@ 表格样式:
diff --git a/src/options/custom.js b/src/options/custom.js
index 9080327e9..b7b7879b3 100644
--- a/src/options/custom.js
+++ b/src/options/custom.js
@@ -123,7 +123,7 @@ function propertyRender() {
帮助
- 如何自定义样式,详细 请看这里
+
如何自定义样式,详细 请看这里
独乐乐不如众乐乐! 分享你的主题
diff --git a/src/options/notice.html b/src/options/notice.html
new file mode 100644
index 000000000..7700873ec
--- /dev/null
+++ b/src/options/notice.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+ 消息中心 - 简悦 · 选项页
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/options/notice.js b/src/options/notice.js
new file mode 100644
index 000000000..c78dae839
--- /dev/null
+++ b/src/options/notice.js
@@ -0,0 +1,50 @@
+console.log( "==== simpread options page: notice load ====" )
+
+import '../assets/css/simpread.css';
+import '../assets/css/options_page.css';
+import '../assets/css/options_notice.css';
+import 'notify_css';
+
+import Velocity from 'velocity';
+import Button from 'button';
+import * as waves from 'waves';
+import * as tt from 'tooltip';
+
+import Notice from 'notice';
+
+import {storage} from 'storage';
+import * as ss from 'stylesheet';
+
+/**
+ * Entry
+ */
+storage.Read( () => {
+ console.log( "simpread storage get success!", storage );
+ navRender();
+ noticeRender();
+ tt.Render( "body" );
+ waves.Render({ root: "body" });
+ $( "body" ).velocity({ opacity: 1 }, { duration: 1000, complete: ()=> {
+ $( "body" ).removeAttr( "style" );
+ }});
+});
+
+/**
+ * navigation Render
+ */
+function navRender() {
+ const navClick = () => {
+ location.href = location.origin + "/options/options.html";
+ };
+ const button = navClick() } />;
+ ReactDOM.render( button, $( ".header .nav" )[0] );
+}
+
+/**
+ * notice Render
+ */
+function noticeRender() {
+ let is_update = location.search == "?is_update=true" ? true : false;
+ ReactDOM.render( , $( ".notice" )[0] );
+ history.pushState( "", "", "/options/notice.html" );
+}
\ No newline at end of file
diff --git a/src/options/options.html b/src/options/options.html
index dc8541052..20a8e74e4 100644
--- a/src/options/options.html
+++ b/src/options/options.html
@@ -3,7 +3,7 @@
- 选项页 - 简悦(SimpRead)
+ 选项页 - 简悦 SimpRead
@@ -13,7 +13,7 @@
diff --git a/src/options/options.js b/src/options/options.js
index c614d82e4..2f4ecf41e 100644
--- a/src/options/options.js
+++ b/src/options/options.js
@@ -1,8 +1,9 @@
console.log( "==== simpread options page load ====" )
import '../assets/css/options_page.css';
-import '../assets/css/option.css';
+import '../assets/css/setting.css';
import 'notify_css';
+import 'intro_css';
import Velocity from 'velocity';
import Notify from 'notify';
@@ -32,6 +33,7 @@ import AccountOps from 'accountopt';
import About from 'about';
import Unrdist from 'unrdist';
import * as welc from 'welcome';
+import * as guide from 'guide';
import PureRead from 'puread';
@@ -51,6 +53,21 @@ $( window ).scroll( (event) => {
$( ".top" ).css( "transform", `translate3d(0px, ${offset}px, 0px)` );
});
+/**
+ * Add event listenr
+ */
+window.addEventListener( msg.MESSAGE_ACTION.turn_tab, event => {
+ const idx = event.detail.page;
+ tabChange( idx );
+});
+
+window.addEventListener( msg.MESSAGE_ACTION.welcome_close, event => {
+ const { first, version } = event.detail;
+ !first && new Notify().Render({ content: "是否查看新版本的入门指引?", action: "确认", cancel: "取消", callback: type => {
+ type == "action" && guide.Start( version );
+ }});
+});
+
/**
* Get tabsItemID from window.location.hash exist
*/
@@ -67,6 +84,8 @@ browser.runtime.onMessage.addListener( function( request, sender, sendResponse )
exp[id].Accesstoken( uri );
} else if ( id == "yinxiang" ) {
exp.evernote.Accesstoken( uri );
+ } else if ( uri.indexOf( "state=yuque_authorize" ) > 0 ) {
+ exp.yuque.Accesstoken( uri );
} else {
id.startsWith( "http://ksria.com/simpread/auth.html?" ) &&
exp.onenote.Accesstoken( uri );
@@ -75,10 +94,17 @@ browser.runtime.onMessage.addListener( function( request, sender, sendResponse )
});
/**
- * Entry:
- * - storage get data form chrome storage
- * - waves.Render()
- * - tooltip.Render()
+ * Change tab
+ *
+ * @param {number} tab index
+ */
+function tabChange( idx ) {
+ conf.tabsItem.forEach( ( item, index ) => item.active = idx == index ? true : false );
+ mainRender( idx );
+}
+
+/**
+ * Entry
*/
storage.Read( first => {
console.log( "simpread storage get success!", storage.focus, storage.read, first );
@@ -89,15 +115,31 @@ storage.Read( first => {
navRender();
vernotify( first );
mainRender( tabsItemID );
+ setTimeout(() => noticeRender(), 500 );
+ helpRender();
tt.Render( "body" );
waves.Render({ root: "body" });
- // only firefox and only usage 1.1.0.3024
- //if ( br.isFirefox() && ver.sub_ver == "3024" && !localStorage["opt-3024"] ) {
- // welcomeRender( true );
- // localStorage["opt-3024"] = ver.sub_ver;
- //}
});
+/**
+ * Pure Read
+*/
+function pRead() {
+ storage.puread = new PureRead( storage.sites );
+ storage.pr.origins = storage.option.origins;
+ console.log( "current puread object is ", storage.pr )
+}
+
+/**
+ * Incompatible and update
+ */
+function updateData() {
+ ver.Incompatible( storage.version, storage.simpread ) && storage.Write( () => {
+ console.log( "current simpread is update ", storage.simpread )
+ watch.SendMessage( "option", true );
+ }, storage.simpread );
+}
+
/**
* Hash notify
*/
@@ -141,8 +183,9 @@ function vernotify( first ) {
watch.SendMessage( "version", true );
loadState = { first: true, update: true };
welcomeRender( false, version );
+ updateData();
}
- website_sync = true;
+ // website_sync = true; when version is 1.1.3 website_list is newer
browser.runtime.sendMessage({ type: "track", value: { eventAction: hash.startsWith( "#firstload?ver=" ) ? "install" : "update" , eventCategory: "install", eventLabel: "install && update" } });
history.pushState( "", "", "/options/options.html" );
} else if ( hash.startsWith( "#update?patch=" ) ) {
@@ -176,7 +219,6 @@ function firstLoad( first ) {
* @param {string} version
*/
function welcomeRender( first, version ) {
- //!( !first && version == "1.0.4" ) && welc.Render( "body", first, version );
welc.Render( "body", first, version );
}
@@ -208,6 +250,7 @@ function tabsRender( color ) {
+
聚焦模式
@@ -217,6 +260,8 @@ function tabsRender( color ) {
waves="md-waves-effect md-waves-button"
onClick={ ()=>save( true ) } />
+
+
阅读模式
@@ -226,6 +271,7 @@ function tabsRender( color ) {
waves="md-waves-effect md-waves-button"
onClick={ ()=>save( true ) } />
+
@@ -245,8 +291,7 @@ function tabsRender( color ) {
,
tabsOnChange = ( $prev, $target, event ) => {
const idx = $target.attr( "id" );
- mainRender( idx );
- conf.tabsItem.forEach( ( item, index ) => item.active = idx == index ? true : false );
+ tabChange( idx );
},
refresh = () => {
tt.Render( "body" );
@@ -277,8 +322,7 @@ function navRender() {
function sidebarRender() {
const sidebarClick = ( $target, items ) => {
const idx = conf.tabsItem.findIndex( item => item.value == items.value );
- conf.tabsItem.forEach( ( item, index ) => item.active = idx == index ? true : false );
- mainRender( idx );
+ tabChange( idx );
};
const sidebar =
+
+ ...
+
+ `;
+ storage.Notice( result => {
+ if ( $.isEmptyObject( result ) ) {
+ storage.notice.latest = 0;
+ }
+ $.get( storage.notice_service.latest, result => {
+ console.log( "notice latest id ", result )
+ if ( storage.notice.latest == 0 ) {
+ $( "body" ).append( tmpl );
+ sessionStorage.setItem( "is_update", true );
+ } else if ( storage.notice.latest < result ) {
+ $( "body" ).append( tmpl );
+ $( ".bubbles em" ).removeClass( "init" ).text( result - storage.notice.read.length );
+ sessionStorage.setItem( "is_update", true );
+ } else if ( storage.notice.latest > storage.notice.read.length ) {
+ $( "body" ).append( tmpl );
+ $( ".bubbles em" ).removeClass( "init" ).text( storage.notice.latest - storage.notice.read.length );
+ } else if ( storage.notice.latest == storage.notice.read.length && storage.option.notice ) {
+ $( "body" ).append( tmpl );
+ $( ".bubbles em" ).remove();
+ }
+ });
+ });
+ $( "body" ).on( "click", ".notice", event => {
+ location.href = location.origin + "/options/notice.html?is_update=" + sessionStorage.getItem( "is_update" );
+ });
+}
+
+/*
+ * Help bubbles
+ */
+function helpRender() {
+ const help_icon = ' ',
+ close_icon = ' ',
+ tmpl = `
+
+ ${help_icon}
+
+ `,
+ exit = () => {
+ ReactDOM.unmountComponentAtNode( $( ".guide-bg" )[0] );
+ $( ".help i" ).html( help_icon ).css({ "animation": ".1s reverse fadein,235ms cubic-bezier(.4,0,.2,1) popdown" });
+ $( ".guide-bg" ).remove();
+ };
+ $( "body" ).append( tmpl );
+ $( "body" ).on( "click", ".help", event => {
+ if ( $(".guide-bg").length == 0 ) {
+ $( "body" ).append( `
` );
+ ReactDOM.render( exit() } />, $( ".guide-bg" )[0] );
+ $( ".help i" ).html( close_icon ).css({ "animation": ".1s reverse fadein,235ms cubic-bezier(.4,0,.2,1) popup" });
+ } else {
+ exit();
+ }
+ });
}
diff --git a/src/options/sitemgr.html b/src/options/sitemgr.html
index c2881a693..7097812b6 100644
--- a/src/options/sitemgr.html
+++ b/src/options/sitemgr.html
@@ -21,7 +21,7 @@
diff --git a/src/options/sitemgr.js b/src/options/sitemgr.js
index 9adb30b4c..866c8e7a7 100644
--- a/src/options/sitemgr.js
+++ b/src/options/sitemgr.js
@@ -1,7 +1,7 @@
console.log( "==== simpread options page: sitemanager load ====" )
import '../assets/css/simpread.css';
-import '../assets/css/option.css';
+import '../assets/css/setting.css';
import '../assets/css/options_page.css';
import '../assets/css/options_custom.css';
import '../assets/css/options_sitemgr.css';
diff --git a/src/read/controlbar.jsx b/src/read/controlbar.jsx
index ca15935ff..9180e1d16 100644
--- a/src/read/controlbar.jsx
+++ b/src/read/controlbar.jsx
@@ -9,6 +9,7 @@ import * as output from 'output';
import * as watch from 'watch';
import * as kbd from 'keyboard';
import { storage } from 'storage';
+import * as run from 'runtime';
import ReadOpt from 'readopt';
import Actionbar from 'actionbar';
@@ -19,7 +20,7 @@ import Fab from 'fab';
import Fap from 'fap'
import * as ttips from 'tooltip';
-let notify;
+let notify, readItems;
const tooltip_options = {
target : "name",
position : "bottom",
@@ -54,6 +55,9 @@ export default class ReadCtlbar extends React.Component {
kbd.Listen( combo => {
this.onAction( undefined, combo )
});
+ run.Controlbar( undefined, event => {
+ this.onAction( undefined, event.detail.type );
+ });
}
onAction( event, type ) {
@@ -61,6 +65,8 @@ export default class ReadCtlbar extends React.Component {
this.verify( type.split( "_" )[0] );
+ run.Event( "export", type );
+
const action = ( event, type ) => {
this.props.multi &&
[ "markdown", "dropbox", "yinxiang","evernote", "onenote", "gdrive" ].includes( type ) &&
@@ -97,9 +103,13 @@ export default class ReadCtlbar extends React.Component {
delete news.html;
browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.temp_site, { url: location.href, site: news, uid: storage.user.uid, type: "temp" }));
break;
+ case type.startsWith( "webdav_" ) :
+ const [ title, desc, content ] = [ $( "sr-rd-title" ).text().trim(), $( "sr-rd-desc" ).text().trim(), $( "sr-rd-content" ).html().trim() ];
+ output.Action( type, title, desc, content );
+ break;
default:
if ( type.indexOf( "_" ) > 0 && type.startsWith( "share" ) ||
- [ "fullscreen", "save", "markdown", "png", "epub", "pdf", "kindle", "temp", "html", "dropbox", "pocket", "instapaper", "linnk", "yinxiang","evernote", "onenote", "gdrive" ].includes( type )) {
+ [ "fullscreen", "save", "markdown", "png", "epub", "pdf", "kindle", "temp", "html", "dropbox", "pocket", "instapaper", "linnk", "yinxiang","evernote", "onenote", "gdrive", "jianguo", "yuque" ].includes( type )) {
const [ title, desc, content ] = [ $( "sr-rd-title" ).text().trim(), $( "sr-rd-desc" ).text().trim(), $( "sr-rd-content" ).html().trim() ];
output.Action( type, title, desc, content );
}
@@ -117,6 +127,7 @@ export default class ReadCtlbar extends React.Component {
onChange( type, custom ) {
const [ key, value ] = [ type.split( "_" )[0], type.split( "_" )[1] ];
+ run.Event( "read_ui", { key, value, custom });
this.props.onAction && this.props.onAction( key, value, custom );
this.verify( key );
}
@@ -126,26 +137,61 @@ export default class ReadCtlbar extends React.Component {
}
componentWillMount() {
+ readItems = $.extend( true, {}, conf.readItems );
try {
if ( storage.current.fap ) {
- delete conf.readItems.exit;
- delete conf.readItems.option.items.setting;
+ delete readItems.exit;
+ delete readItems.option.items.setting;
+ delete readItems.fontfamily;
+ delete readItems.fontsize;
+ delete readItems.layout;
+ delete readItems.theme;
+ } else {
+ delete readItems.trigger;
}
if ( this.props.type.startsWith( "txtread::" ) && this.props.type.endsWith( "::local" )) {
- delete conf.readItems.download;
- delete conf.readItems.readlater;
- delete conf.readItems.send;
- delete conf.readItems.share;
- delete conf.readItems.option;
+ delete readItems.download;
+ delete readItems.readlater;
+ delete readItems.send;
+ delete readItems.share;
+ delete readItems.option;
}
if ( this.props.type.startsWith( "metaread::" ) || this.props.type.startsWith( "txtread::" ) ) {
- delete conf.readItems.option;
+ delete readItems.option;
}
+ storage.Safe( () => {
+ storage.secret.webdav.forEach( item => {
+ item = JSON.parse( item );
+ readItems.send.items[ "webdav_" + item.name ] = {
+ name: item.name,
+ icon: ss.IconPath("webdav_icon"),
+ "color": "#00BCD4",
+ };
+ });
+ })
+ // Add test source
+ storage.current.fap && storage.Plugins( () => {
+ !$.isEmptyObject( storage.plugins ) && storage.option.plugins.forEach( id => {
+ const plugin = storage.plugins[id];
+ // Add test source
+ if ( plugin.enable != false && ( plugin.trigger == true || plugin.trigger == "true" )) {
+ //if ( plugin.id == "Y7JxbP7B4H" ) {
+ readItems.trigger.items["plugin_" + plugin.id] = {
+ "name" : plugin.name,
+ "fontIcon" : plugin.icon.type,
+ "color" : plugin.icon.bgColor,
+ };
+ }
+ });
+ if ( readItems.trigger && $.isEmptyObject( readItems.trigger.items )) {
+ delete readItems.trigger;
+ }
+ });
} catch ( err ) {
// TO-DO
}
// hack code
- !/chrome/ig.test( navigator.userAgent ) && ( delete conf.readItems.dyslexia );
+ !/chrome/ig.test( navigator.userAgent ) && ( delete readItems.dyslexia );
}
constructor( props ) {
@@ -159,12 +205,12 @@ export default class ReadCtlbar extends React.Component {
onOpen={ ()=> this.onPop( "open" ) } onClose={ ()=> this.onPop( "close" ) }
onAction={ (event, type)=>this.onAction(event, type ) }>
this.onChange(t,c)}/>
- this.onAction(undefined, type ) }/>
+ this.onAction(undefined, type ) }/>
:
- this.onAction(event, type ) } />
+ this.onAction(event, type ) } />
return (
{ Controlbar }
diff --git a/src/read/read.jsx b/src/read/read.jsx
index bcb806da4..92c991aa9 100644
--- a/src/read/read.jsx
+++ b/src/read/read.jsx
@@ -1,12 +1,12 @@
console.log( "=== simpread read load ===" )
-import ProgressBar from 'schedule';
-import * as spec from 'special';
-import ReadCtlbar from 'readctlbar';
-import * as toc from 'toc';
-import * as modals from 'modals';
-import * as se from 'siteeditor';
-import * as kbd from 'keyboard';
+import ProgressBar from 'schedule';
+import * as spec from 'special';
+import ReadCtlbar from 'readctlbar';
+import * as toc from 'toc';
+import * as setting from 'setting';
+import * as se from 'siteeditor';
+import * as kbd from 'keyboard';
import { storage, Clone } from 'storage';
import th from 'theme';
@@ -25,6 +25,9 @@ const rdcls = "simpread-read-root",
$root = $( "html" ),
theme = "simpread-theme-root";
+// load count,.0: call Readability. 1: call highlight 2: all failed
+let load_count = 0;
+
const Footer = () => {
const good_icon = ' ',
bad_icon = ' ',
@@ -55,82 +58,104 @@ const Footer = () => {
class Read extends React.Component {
+ verifyContent() {
+ if ( $("sr-rd-content").text().length < 100 ) {
+ if ( load_count == 0 ) {
+ new Notify().Render({ content: "检测到正文获取异常,是否重新获取?", action: "是的", cancel: "取消", callback: type => {
+ if ( type == "cancel" ) return;
+ load_count++;
+ this.componentWillUnmount();
+ storage.pr.Readability();
+ Render();
+ }});
+ } else if ( load_count == 1 ) {
+ this.componentWillUnmount();
+ new Notify().Render({ content: '获取正文失败,是否使用 手动框选 高亮的方式获取?', action: "是的", cancel: "取消", callback: type => {
+ if ( type == "cancel" ) return;
+ setTimeout( () => {
+ Highlight().done( dom => {
+ const rerender = element => {
+ load_count++;
+ storage.pr.TempMode( "read", element );
+ Render();
+ };
+ storage.current.highlight ?
+ highlight.Control( dom ).done( newDom => {
+ rerender( newDom );
+ }) : rerender( dom );
+ });
+ }, 200 );
+ }});
+ } else if ( load_count >= 2 ) {
+ this.componentWillUnmount();
+ new Notify().Render({ content: "高亮无法仍无法适配此页面,是否提交?", action: "是的", cancel: "取消", callback: type => {
+ if ( type == "cancel" ) return;
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.save_site, { url: location.href, site: {}, uid: storage.user.uid, type: "failed" }));
+ }});
+ load_count = 0;
+ }
+ return false;
+ } else {
+ return true;
+ }
+ }
+
componentWillMount() {
- loadPlugins( "read_start" );
$( "body" ).addClass( "simpread-hidden" );
th.Change( this.props.read.theme );
- // hack code
- //storage.current.fap && $( "head" ).append( ' ' );
if ( storage.current.fap ) {
- $( "head" ).append( ' ' );
- $( "head" ).append( ' ' );
+ $( "head" ).append( ' ' );
+ $( "head" ).append( ' ' );
+ $( "head" ).append( ' ' );
}
}
async componentDidMount() {
- if ( $root.find( "sr-rd-content-error" ).length > 0 ) {
- // Puread level to III,can't work this flow.
- this.componentWillUnmount();
- if ( ! localStorage["sr-update-site"] ) {
- new Notify().Render({ content: "当前页面结构改变导致不匹配阅读模式,接下来请选择?", action: "更新", cancel: "高亮", callback: type => {
- if ( type == "action" ) {
- new Notify().Render( "2 秒钟后将会自动查找更新,请勿关闭此页面..." );
- localStorage["sr-update-site"] = true;
- setTimeout( ()=>browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.update_site, { url: location.href, site: storage.pr.current.site } )), 2000 );
- } else {
- this.props.read.highlight == true ? setTimeout( () => {
- Highlight().done( dom => {
- storage.pr.TempMode( "read", dom );
- Render();
- });
- }, 200 ) : new Notify().Render( `请先开启 临时阅读模式 选项!` );
- }
- }});
- } else {
- new Notify().Render({ content: "更新后仍无法适配此页面,是否提交?", action: "是的", cancel: "取消", callback: type => {
- if ( type == "cancel" ) return;
- browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.save_site, { url: location.href, site: storage.pr.current.site, uid: storage.user.uid, type: "failed" }));
- }});
- }
- localStorage.removeItem( "sr-update-site" );
- } else {
- $root
- .addClass( "simpread-font" )
- .addClass( theme )
- .find( rdclsjq )
- .addClass( theme )
- .sreffect( { opacity: 1 }, { delay: 100 })
- .addClass( "simpread-read-root-show" );
-
- this.props.read.fontfamily && ss.FontFamily( this.props.read.fontfamily );
- this.props.read.fontsize && ss.FontSize( this.props.read.fontsize );
- this.props.read.layout && ss.Layout( this.props.read.layout );
- this.props.read.site.css && this.props.read.site.css.length > 0
- && ss.SiteCSS( this.props.read.site.css );
- !this.props.wrapper.avatar && this.props.read.toc
- && toc.Render( "sr-read", $( "sr-rd-content" ), this.props.read.theme, this.props.read.toc_hide );
- ss.Preview( this.props.read.custom );
-
- storage.pr.state == "txt" && !location.href.endsWith( ".md" ) && $( "sr-rd-content" ).css({ "word-wrap": "break-word", "white-space": "pre-wrap" });
- storage.pr.current.site.desc == "" && $( "sr-rd-desc" ).addClass( "simpread-hidden" );
-
- excludes( $("sr-rd-content"), this.props.wrapper.exclude );
- storage.pr.Beautify( $( "sr-rd-content" ) );
- storage.pr.Format( rdcls );
-
- kbd.Render( $( "sr-rd-content" ));
- tooltip.Render( rdclsjq );
- waves.Render({ root: rdclsjq });
- storage.Statistics( "read" );
-
- loadPlugins( "read_complete" );
-
- // Puread level to III,can't work this flow.
- //localStorage.removeItem( "sr-update-site" );
+ if ( load_count > 0 && !this.verifyContent() ) {
+ return;
}
+
+ $root
+ .addClass( "simpread-font" )
+ .addClass( theme )
+ .find( rdclsjq )
+ .addClass( theme )
+ .sreffect( { opacity: 1 }, { delay: 100 })
+ .addClass( "simpread-read-root-show" );
+
+ this.props.read.fontfamily && ss.FontFamily( this.props.read.fontfamily );
+ this.props.read.fontsize && ss.FontSize( this.props.read.fontsize );
+ this.props.read.layout && ss.Layout( this.props.read.layout );
+ this.props.read.site.css && this.props.read.site.css.length > 0
+ && ss.SiteCSS( this.props.read.site.css );
+ ss.Preview( this.props.read.custom );
+
+ storage.pr.state == "txt" && !location.href.endsWith( ".md" ) && $( "sr-rd-content" ).css({ "word-wrap": "break-word", "white-space": "pre-wrap" });
+ $( "sr-rd-desc" ).text().trim() == "" && $( "sr-rd-desc" ).addClass( "simpread-hidden" );
+
+ excludes( $("sr-rd-content"), this.props.wrapper.exclude );
+ storage.pr.Beautify( $( "sr-rd-content" ) );
+ storage.pr.Format( rdcls );
+
+ kbd.Render( $( "sr-rd-content" ));
+ tooltip.Render( rdclsjq );
+ waves.Render({ root: rdclsjq });
+ storage.Statistics( "read" );
+
+ !this.props.wrapper.avatar && this.props.read.toc
+ && toc.Render( "sr-read", $( "sr-rd-content" ), this.props.read.theme, this.props.read.toc_hide );
+
+ this.props.wrapper.avatar && $( ".simpread-read-root" ).addClass( "simpread-multi-root" );
+
+ loadPlugins( "read_complete" );
+
+ setTimeout( ()=>{
+ this.verifyContent();
+ }, 50 );
}
componentWillUnmount() {
+ run.Event( "read_end" );
loadPlugins( "read_end" );
ss.FontSize( "" );
$root.removeClass( theme )
@@ -154,7 +179,7 @@ class Read extends React.Component {
this.exit();
break;
case "setting":
- modals.Render( ()=>setTimeout( ()=>se.Render(), 500 ));
+ setting.Render( ()=>setTimeout( ()=>se.Render(), 500 ));
break;
case "siteeditor":
$( "panel-bg" ).length > 0 && $( "panel-bg" )[0].click();
@@ -170,18 +195,37 @@ class Read extends React.Component {
storage.Setcur( storage.current.mode );
break;
case "remove":
- new Notify().Render( "移动鼠标选择不想显示的内容,只针对本次有效。" );
$( "panel-bg" ).length > 0 && $( "panel-bg" ).trigger( "click" );
- Highlight().done( dom => {
+ new Notify().Render({ content: "移动鼠标选择不想显示的内容,可多次选择,使用 ESC 退出。", delay: 5000 });
+ highlight.Multi( dom => {
+ const path = storage.pr.Utils().dom2Xpath( dom ),
+ site = { ...storage.pr.current.site };
+ site.exclude.push( `[[\`${path}\`]]` );
+ if ( storage.pr.state == "temp" ) {
+ const include = storage.pr.Utils().dom2Xpath( storage.pr.dom );
+ site.include = `[[\`${include}\`]]`;
+ site.name = site.name.replace( "tempread::", "" );
+ }
+ storage.pr.Updatesite( 'local', storage.current.url, [ site.url, storage.pr.Cleansite(site) ]);
+ storage.Writesite( storage.pr.sites, () => {
+ storage.pr.current.site.name = site.name;
+ storage.pr.current.site.include = site.include;
+ });
$(dom).remove();
});
break;
case "highlight":
- new Notify().Render( "移动鼠标选择高亮区域,以便生成阅读模式,将会在页面刷新后失效。" );
+ new Notify().Render( `移动鼠标选择高亮区域,以便生成阅读模式,此模式将会在页面刷新后失效,详细说明请看 重新高亮 ` );
this.exit();
Highlight().done( dom => {
- storage.pr.TempMode( "read", dom );
- Render();
+ const rerender = element => {
+ storage.pr.TempMode( "read", element );
+ Render();
+ };
+ storage.current.highlight ?
+ highlight.Control( dom ).done( newDom => {
+ rerender( newDom );
+ }) : rerender( dom );
});
break;
/*
@@ -198,11 +242,11 @@ class Read extends React.Component {
}
render() {
- const Article = this.props.wrapper.avatar ?
+ const Article = this.props.wrapper.avatar && this.props.wrapper.avatar.length > 0 ?
:
;
- const Page = this.props.wrapper.paging &&
+ const Page = this.props.wrapper.paging && this.props.wrapper.paging.length > 0 &&
;
return (
@@ -229,6 +273,7 @@ class Read extends React.Component {
* @param {boolean} true: call mathJaxMode(); false: @see mathJaxMode
*/
function Render( callMathjax = true ) {
+ loadPlugins( "read_start" );
callMathjax && mathJaxMode();
storage.pr.ReadMode();
if ( typeof storage.pr.html.include == "string" && storage.pr.html.include.startsWith( "" ) ) {
@@ -259,7 +304,7 @@ function Highlight() {
*/
function Exist( action ) {
if ( $root.find( rdclsjq ).length > 0 ) {
- action && modals.Render( ()=>setTimeout( ()=>se.Render(), 500 ));
+ action && setting.Render( ()=>setTimeout( ()=>se.Render(), 500 ));
return true;
} else {
return false;
@@ -287,10 +332,16 @@ function mathJaxMode() {
const dom = storage.pr.MathJaxMode();
console.log( 'current get dom is ', dom )
if ( typeof dom == "undefined" ) {
- new Notify().Render( "智能感知失败,请移动鼠标框选。" );
+ new Notify().Render( "智能感知 失败,请移动鼠标框选。" );
Highlight().done( dom => {
- storage.pr.TempMode( "read", dom );
- Render( false );
+ const rerender = element => {
+ storage.pr.TempMode( "read", element );
+ Render( false );
+ };
+ storage.current.highlight ?
+ highlight.Control( dom ).done( newDom => {
+ rerender( newDom );
+ }) : rerender( dom );
});
} else if ( typeof dom == "string" ) {
const html = storage.pr.GetDom( dom, "html" );
diff --git a/src/read/toc.jsx b/src/read/toc.jsx
index 8937324cc..bb9295df7 100644
--- a/src/read/toc.jsx
+++ b/src/read/toc.jsx
@@ -5,19 +5,29 @@ let is_click = false;
class TOC extends React.Component {
onClick( event ) {
- is_click = true;
- const $target = $( event.target ).parent();
- $target.parent().find( "active" ).removeClass( "toc-outline-active" );
- $target.find( "active" ).addClass( "toc-outline-active" );
-
- const href = $( event.target ).attr("href"),
- offsetTop = href === "#" ? 0 : $(href).offset().top - 5;
- $( "html" ).stop().animate({
- scrollTop: offsetTop
- }, 300, () => {
- setTimeout( ()=>is_click = false, 500 );
- });
- event.preventDefault();
+ try {
+ is_click = true;
+ let $target = $( event.target ).parent();
+
+ while ( $target.is( "a" ) ) { $target = $target.parent(); }
+ if ( $target.is( "toc" ) ){
+ return;
+ }
+
+ $target.parent().find( "active" ).removeClass( "toc-outline-active" );
+ $target.find( "active" ).addClass( "toc-outline-active" );
+
+ const href = $target.find( "a" ).attr( "href" ),
+ offsetTop = href === "#" ? 0 : $(href).offset().top - 5;
+ $( "html" ).stop().animate({
+ scrollTop: offsetTop
+ }, 300, () => {
+ setTimeout( ()=>is_click = false, 500 );
+ });
+ event.preventDefault();
+ } catch ( error ) {
+ console.error( "toc error ", error )
+ }
}
componentDidMount() {
@@ -28,36 +38,42 @@ class TOC extends React.Component {
scrollItems = menuItems.map( function() {
const item = $( $(this).attr("href") );
if ( item.length ) { return item; }
- });
-
- $( window ).scroll( function() {
- if ( is_click ) return;
- const fromTop = $(this).scrollTop() + topMenuHeight;
- let cur = scrollItems.map( function() {
- if ($(this).offset().top < fromTop)
- return this;
- });
- cur = cur[cur.length - 1];
- const id = cur && cur.length ? cur[0].id : "";
+ }),
+ setActive = function() {
+ if ( is_click ) return;
+ const fromTop = $(window).scrollTop() + topMenuHeight;
+ let cur = scrollItems.map( function() {
+ if ($(this).offset().top < fromTop)
+ return this;
+ });
+ cur = cur[cur.length - 1];
+ let id = cur && cur.length ? cur[0].id : "";
+
+ if ( lastId !== id ) {
+ lastId = id;
+ id == "" && ( id = "sr-toc-0" );
+ menuItems.parent().find( "active" ).removeClass( "toc-outline-active" );
+ menuItems.filter("[href='#"+id+"']").parent().find( "active" ).addClass( "toc-outline-active" );
+ }
+ };
- if ( lastId !== id ) {
- lastId = id;
- menuItems.parent().find( "active" ).removeClass( "toc-outline-active" );
- menuItems.filter("[href='#"+id+"']").parent().find( "active" ).addClass( "toc-outline-active" );
- }
- });
+ $( window ).scroll( setActive );
$( "outline" ).map( ( idx, item ) => {
$(item).width( 180 - parseInt( $(item).css("padding-left") ) );
})
+
+ this.props.hidden == false && $( "toc" ).css({ "width" : "initial" });
+
+ setActive();
}
render() {
const outline = this.props.table.map( item => {
return (
-
+ this.onClick(evt) }>
- this.onClick(evt) }>{ item.value }
+ { item.value }
)
});
@@ -101,7 +117,7 @@ function Render( root, $target, theme, hidden ) {
});
console.log( "current toc is ", table )
$( root ).append( `` );
- table.length > 1 && ReactDOM.render( , $( "toc-bg" )[0] );
+ table.length > 1 && ReactDOM.render( , $( "toc-bg" )[0] );
}
export {
diff --git a/src/service/config.js b/src/service/config.js
index 08ee4efd0..8dcbf47e1 100644
--- a/src/service/config.js
+++ b/src/service/config.js
@@ -83,6 +83,16 @@ const keyboard = {
"type" : "gdrive",
"desc" : "保存到 Google 云端硬盘",
},
+ jg: {
+ "kbd" : "jg",
+ "type" : "jianguo",
+ "desc" : "保存到 坚果云",
+ },
+ yq: {
+ "kbd" : "yq",
+ "type" : "yuque",
+ "desc" : "保存到 语雀",
+ },
kd: {
"kbd" : "kd",
"type" : "kindle",
@@ -300,7 +310,7 @@ const readItems = {
},
"dropbox" : {
"name" : "保存到 Dropbox",
- "icon" : ss.IconPath("sync_icon"),
+ "icon" : ss.IconPath("dropbox_icon"),
"color": "#00BCD4",
},
"onenote" : {
@@ -313,6 +323,16 @@ const readItems = {
"icon" : ss.IconPath("gdrive_icon"),
"color": "#00BCD4",
},
+ "jianguo" : {
+ "name" : "保存到 坚果云",
+ "icon" : ss.IconPath("jianguo_icon"),
+ "color": "#00BCD4",
+ },
+ "yuque" : {
+ "name" : "保存到 语雀",
+ "icon" : ss.IconPath("yuque_icon"),
+ "color": "#00BCD4",
+ },
"kindle" : {
"name" : "保存到 Kindle",
"icon" : ss.IconPath("kindle_icon"),
@@ -379,6 +399,12 @@ const readItems = {
},
},
},
+ "trigger" : {
+ "name" : "插件触发器",
+ "icon" : ss.IconPath("plugin_icon"),
+ "color": "#00bcd4",
+ "items": {}
+ },
/*
"down" : {
"name" : "向下滚动",
@@ -555,9 +581,11 @@ readLabels = [ "白练", "白磁", "卯之花色", "丁子色", "娟鼠", "月
* Focus controlbar items
*/
const focusItems = ( items => {
- const news = { ...items },
- dels = [ "theme", "fontfamily", "fontsize", "layout", "dyslexia" ];
+ const news = $.extend( true, {}, items ),
+ dels = [ "theme", "fontfamily", "fontsize", "layout", "dyslexia", "trigger" ];
dels.forEach( del => delete news[ del ] );
+ delete news.option.items.fullscreen;
+ delete news.option.items.tempread;
news.top = {
"name" : "返回顶部",
"icon" : ss.IconPath("top_icon"),
diff --git a/src/service/export.js b/src/service/export.js
index 8b230b928..cd3ff5e02 100644
--- a/src/service/export.js
+++ b/src/service/export.js
@@ -2,12 +2,14 @@ console.log( "=== simpread export load ===" )
import domtoimage from 'dom2image';
import FileSaver from 'filesaver';
-import toMarkdown from 'markdown';
+import Turndown from 'markdown';
+import mdgfm from 'mdgfm';
import EpubPress from 'epubpress';
import Instapaper from 'instapaper';
import * as msg from 'message';
import {browser} from 'browser';
+import * as puplugin from 'puplugin';
/**
* Create PNG
@@ -43,7 +45,19 @@ function pdf() {
*/
function markdown( data, name, callback ) {
try {
- const md = toMarkdown( data, { gfm: true }),
+ const turndownService = new Turndown(),
+ gfm = mdgfm.gfm,
+ tables = mdgfm.tables,
+ strikethrough = mdgfm.strikethrough,
+ codeBlock = mdgfm.highlightedCodeBlock;
+ turndownService.use([ gfm, tables, strikethrough, codeBlock ]);
+ turndownService.addRule( 'pre', {
+ filter: [ 'pre' ],
+ replacement: content => {
+ return '\n\n```\n' + content + '\n```\n\n'
+ }
+ });
+ const md = turndownService.turndown( data ),
base64 = "data:text/plain;charset=utf-8," + encodeURIComponent( md );
name ? download( base64, name ) : callback( md );
} catch( error ) {
@@ -115,6 +129,8 @@ function unlink( id ) {
"yinxiang": "https://app.yinxiang.com/AuthorizedServices.action",
"onenote" : "https://account.live.com/consent/Manage",
"gdrive" : "https://drive.google.com/drive/my-drive",
+ "yuque" : "https://www.yuque.com/yuque/developer/delete-oauth-apps",
+ "jianguo" : "http://help.jianguoyun.com/?p=2064",
"linnk" : "https://linnk.net/",
}
return content[id]
@@ -760,13 +776,13 @@ class Onenote {
status != "success" && callback( undefined, "error" );
}).fail( ( xhr, status, error ) => {
console.error( xhr, status, error )
- callback( undefined, error.toLowerCase() == "unauthorized" ? `${ this.name } 授权过期,请重新授权。` : "error" );
+ callback( undefined, xhr.status == 401 ? `${ this.name } 授权过期,请重新授权。` : "error" );
});
}
}
/**
- * Onenote
+ * GDrive
*
* @class
*/
@@ -927,6 +943,292 @@ class GDrive {
}
}
+/**
+ * Jianguo
+ *
+ * @class
+ */
+class Jianguo {
+
+ get id() { return "jianguo"; }
+ get name() { return name( this.id ); }
+
+ get url() {
+ return "https://dav.jianguoyun.com/dav/";
+ }
+
+ get root() {
+ return "SimpRead";
+ }
+
+ get folder() {
+ return "md";
+ }
+
+ get config_name() {
+ return "simpread_config.json";
+ }
+
+ Auth( user, password, callback ) {
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.jianguo, {
+ url: this.url,
+ user,
+ password,
+ method: {
+ type: "folder",
+ root: this.root,
+ folder: this.folder,
+ },
+ }), callback );
+ }
+
+ Add( user, password, path, content, callback ) {
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.jianguo, {
+ url: this.url,
+ user,
+ password,
+ method: {
+ type: "file",
+ path,
+ content
+ },
+ }), callback );
+ }
+
+ Read( user, password, name, callback ) {
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.jianguo, {
+ url: this.url,
+ user,
+ password,
+ method: {
+ type : "read",
+ path: this.root + "/" + name,
+ name,
+ },
+ }), callback );
+ }
+}
+
+/**
+ * WebDAV
+ *
+ * @class
+ */
+class WebDAV {
+
+ get id() { return "webdav"; }
+ get name() { return name( this.id ); }
+
+ get root() {
+ return "/SimpRead";
+ }
+
+ Auth( url, user, password, callback ) {
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.WebDAV, {
+ url,
+ user,
+ password,
+ method: {
+ type: "folder",
+ root: this.root,
+ },
+ }), callback );
+ }
+
+ Add( url, user, password, name, content, callback ) {
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.WebDAV, {
+ url,
+ user,
+ password,
+ method: {
+ type: "file",
+ root: this.root,
+ name,
+ content
+ },
+ }), callback );
+ }
+}
+
+/**
+ * Yuque
+ *
+ * @class
+ */
+class Yuque {
+
+ get id() { return "yuque"; }
+ get name() { return name( this.id ); }
+
+ get client_id() {
+ return "8p4PvTuP02UN7WhLlQrY";
+ }
+
+ get client_secret() {
+ return "kl0LpKR7Tu3EDEJJOjAPEwEAkxeVYrcY5cEEOPeG";
+ }
+
+ get redirect_uri() {
+ //return "https://simpread.herokuapp.com";
+ return "https://kenshin.github.io/simpread/auth.html";
+ }
+
+ get scopes() {
+ return "repo, doc";
+ }
+
+ New() {
+ this.dtd = $.Deferred();
+ this.code = "";
+ this.access_token = "";
+ this.token_type = "";
+ this.user_id = "";
+ this.repos_id = "";
+ return this;
+ }
+
+ Login() {
+ let url = "https://www.yuque.com/oauth2/authorize?";
+ const params = {
+ client_id : this.client_id,
+ redirect_uri : this.redirect_uri,
+ scope : this.scopes,
+ state : "yuque_authorize",
+ response_type: "code",
+ };
+ Object.keys( params ).forEach( key => {
+ url += `${key}=${params[key]}&`;
+ });
+ url = url.substr( 0, url.length )
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url } ));
+ }
+
+ Accesstoken( url ) {
+ url = url.replace( "http://ksria.com/simpread/auth.html?", "" );
+ if ( url.startsWith( "code" ) ) {
+ this.code = url.replace( "code=", "" ).replace( "&state=yuque_authorize", "" );
+ this.dtd.resolve();
+ } else {
+ this.dtd.reject();
+ }
+ }
+
+ Auth( callback ) {
+ $.ajax({
+ url : " https://www.yuque.com/oauth2/token",
+ type : "POST",
+ data : {
+ client_id : this.client_id,
+ client_secret : this.client_secret,
+ code : this.code,
+ grant_type : "authorization_code",
+ redirect_uri : this.redirect_uri,
+ }
+ }).done( ( result, textStatus, jqXHR ) => {
+ if ( result ) {
+ this.access_token = result.access_token;
+ this.token_type = result.token_type;
+ callback( result, undefined );
+ } else {
+ callback( undefined, "error" );
+ }
+ }).fail( ( jqXHR, textStatus, error ) => {
+ console.error( jqXHR, textStatus, error )
+ callback( undefined, textStatus );
+ });
+ }
+
+ GetUser( callback ) {
+ $.ajax({
+ url : "https://www.yuque.com/api/v2/user",
+ type : "GET",
+ headers : {
+ "Content-Type": "application/json",
+ "X-Auth-Token": this.access_token
+ },
+ }).done( ( result, status, xhr ) => {
+ if ( status == "success" ) {
+ this.user_id = result.data.id;
+ callback( result, undefined );
+ } else callback( result, "error" );
+ }).fail( ( xhr, status, error ) => {
+ callback( undefined, error );
+ });
+ }
+
+ GetRepos( callback ) {
+ $.ajax({
+ url : `https://www.yuque.com/api/v2/users/${this.user_id}/repos`,
+ type : "GET",
+ headers : {
+ "Content-Type": "application/json",
+ "X-Auth-Token": this.access_token
+ },
+ }).done( ( result, status, xhr ) => {
+ if ( status == "success" ) {
+ result.data.forEach( item => {
+ if ( item.slug == "simpread" ) {
+ this.repos_id = item.id;
+ }
+ });
+ callback( result, undefined );
+ } else callback( result, "error" );
+ }).fail( ( xhr, status, error ) => {
+ callback( undefined, xhr );
+ });
+ }
+
+ CreateRepo( callback ) {
+ const data = {
+ name: "SimpRead",
+ slug: "simpread",
+ description: "来自简悦的收藏",
+ public: 0,
+ type: "Book",
+ };
+ $.ajax({
+ url : `https://www.yuque.com/api/v2/users/${this.user_id}/repos`,
+ type : "POST",
+ headers : {
+ "Content-Type": "application/json",
+ "X-Auth-Token": this.access_token
+ },
+ data : JSON.stringify( data )
+ }).done( ( result, status, xhr ) => {
+ if ( status == "success" ) {
+ this.repos_id = result.data.id;
+ callback( result, undefined );
+ } else callback( result, "error" );
+ }).fail( ( xhr, status, error ) => {
+ callback( undefined, xhr );
+ });
+ }
+
+ Add( title, body, callback ) {
+ const data = {
+ title,
+ slug: Math.round(+new Date()),
+ public: 0,
+ body,
+ };
+ $.ajax({
+ url : `https://www.yuque.com/api/v2/repos/${this.repos_id}/docs`,
+ type : "POST",
+ headers : {
+ "Content-Type": "application/json",
+ "X-Auth-Token": `${this.access_token}`
+ },
+ data : JSON.stringify( data )
+ }).done( ( result, status, xhr ) => {
+ status == "success" && callback( result, undefined );
+ status != "success" && callback( undefined, "error" );
+ }).fail( ( xhr, status, error ) => {
+ console.error( xhr, status, error )
+ callback( undefined, error.toLowerCase() == "unauthorized" ? `${ this.name } 授权过期,请重新授权。` : "error" );
+ });
+ }
+}
+
/**
* Kindle
*
@@ -996,8 +1298,12 @@ function name( type ) {
return "印象笔记";
} else if ( type == "gdrive" ) {
return "Google 云端硬盘";
+ } else if ( type == "jianguo" ) {
+ return "坚果云";
+ } else if ( type == "yuque" ) {
+ return "语雀";
}
- return type;
+return type;
}
/**
@@ -1017,6 +1323,18 @@ function mdWrapper( content, name, notify ) {
return dtd;
}
+/**
+ * Markdown to HTML
+ *
+ * @param {string} content
+ */
+function md2HTML( content ) {
+ const markdown = puplugin.Plugin( "markdown" ),
+ converter = new markdown.default.Converter();
+ converter.setOption( 'noHeaderId', true );
+ return converter.makeHtml( content );
+}
+
let noti; // notify variable
/**
@@ -1029,7 +1347,7 @@ let noti; // notify variable
* @param {object} notify
*/
function serviceCallback( result, error, name, type, notify ) {
- noti.complete();
+ noti && noti.complete();
!error && notify.Render( `已成功保存到 ${name}!` );
![ "evernote", "yinxiang" ].includes( type ) && error && notify.Render( 2, error == "error" ? "保存失败,请稍后重新再试。" : error );
if ( error && error.includes( "重新授权" )) {
@@ -1074,6 +1392,9 @@ const dropbox = new Dropbox(),
evernote = new Evernote(),
onenote = new Onenote(),
gdrive = new GDrive(),
+ yuque = new Yuque(),
+ jianguo = new Jianguo(),
+ webdav = new WebDAV(),
kindle = new Kindle();
export {
@@ -1083,9 +1404,10 @@ export {
markdown as Markdown,
download as Download,
prueDownload as PrDownload,
+ md2HTML as MD2HTML,
unlink as Unlink,
name as Name,
- dropbox, pocket, instapaper, linnk, evernote, onenote, gdrive,
+ dropbox, pocket, instapaper, linnk, evernote, onenote, gdrive,yuque, jianguo, webdav,
kindle,
mdWrapper as MDWrapper,
serviceCallback as svcCbWrapper,
diff --git a/src/service/highlight.js b/src/service/highlight.js
index d4d956c76..8490c0d97 100644
--- a/src/service/highlight.js
+++ b/src/service/highlight.js
@@ -25,6 +25,7 @@ function start() {
$( "html" ).off( "mousemove", mousemoveEvent );
$prev = undefined;
dtd.resolve( event.target );
+ return false;
});
$( "html" ).one( "keydown", event => {
if ( event.keyCode == 27 && $prev ) {
@@ -39,6 +40,40 @@ function start() {
return dtd;
}
+/**
+ * Multi Highlight
+ *
+ * @return {func} callback
+ */
+function multi( callback ) {
+ let $prev;
+ const mousemoveEvent = event => {
+ if ( !$prev ) {
+ $( event.target ).addClass( highlight_class );
+ } else {
+ $prev.removeClass( highlight_class );
+ $( event.target ).addClass( highlight_class );
+ }
+ $prev = $( event.target );
+ },
+ removeDomHander = event => {
+ callback( event.target );
+ return false;
+ };
+ $( "html" ).on( "click", removeDomHander );
+ $( "html" ).on( "keydown", event => {
+ if ( event.keyCode == 27 && $prev ) {
+ $( "html" ).find( `.${highlight_class}` ).removeClass( highlight_class );
+ $( "html" ).off( "mousemove", mousemoveEvent );
+ $( "html" ).off( "click", removeDomHander );
+ $prev = undefined;
+ event.preventDefault();
+ return false;
+ }
+ });
+ $( "html" ).on( "mousemove", mousemoveEvent );
+}
+
function annotate() {
const dtd = $.Deferred();
$( "html" ).one( "mouseup", event => {
@@ -60,7 +95,52 @@ function annotate() {
return dtd;
}
+/**
+ * Highlight and controlbar
+ *
+ * @param {element} dom
+ */
+function controlbar( dom ) {
+ let $target = $( dom );
+ const dtd = $.Deferred(),
+ tmpl = `
+
+
+
+
+
+ `;
+ $target.addClass( "simpread-highlight-controlbar" )
+ $("html").append( tmpl );
+ $("html").find( "sr-highlight-ctl" ).on( "click", event => {
+ const cls = $( event.currentTarget ).attr( "class" );
+ if ( cls == "add" ) {
+ $target.removeClass( "simpread-highlight-controlbar" );
+ $target = $target.parent();
+ $target.addClass( "simpread-highlight-controlbar" );
+ } else if ( cls == "sub" ) {
+ $target.removeClass( "simpread-highlight-controlbar" );
+ $target = $($target.children()[0]);
+ $target.addClass( "simpread-highlight-controlbar" );
+ } else if ( cls == "none" ) {
+ $target.removeClass( "simpread-highlight-controlbar" );
+ $( "simpread-highlight" ).remove();
+ } else if ( cls == "help" ) {
+ const $a = $( ` ` ).appendTo( "body" );
+ $a[0].click();
+ $a.remove();
+ } else {
+ $target.removeClass( "simpread-highlight-controlbar" );
+ $( "simpread-highlight" ).remove();
+ dtd.resolve( $target[0] );
+ }
+ });
+ return dtd;
+}
+
export {
start as Start,
+ multi as Multi,
annotate as Annotate,
+ controlbar as Control,
}
\ No newline at end of file
diff --git a/src/service/message.js b/src/service/message.js
index 3e7be4139..86017ec87 100644
--- a/src/service/message.js
+++ b/src/service/message.js
@@ -34,6 +34,13 @@ const action = {
temp_site : "temp_site",
// corb
CORB : "corb",
+ // webdav
+ jianguo : "jianguo",
+ WebDAV : "webdav",
+ // event
+ turn_tab : "turn_tab",
+ welcome_close : "welcome_close",
+ "controlbar" : "simpread-plugin_controlbar",
};
/**
diff --git a/src/service/output.js b/src/service/output.js
index 1e5cfb9ce..39c167fed 100644
--- a/src/service/output.js
+++ b/src/service/output.js
@@ -1,4 +1,4 @@
-console.log( "=== simpread control:action load ===" )
+console.log( "=== simpread output load ===" )
import * as util from 'util';
import * as exp from 'export';
@@ -138,8 +138,8 @@ function action( type, title, desc, content ) {
}
break;
}
- } else if ( [ "dropbox", "pocket", "instapaper", "linnk", "yinxiang","evernote", "onenote", "gdrive" ].includes( type ) ) {
- const { dropbox, pocket, instapaper, linnk, evernote, onenote, gdrive } = exp,
+ } else if ( [ "dropbox", "pocket", "instapaper", "linnk", "yinxiang","evernote", "onenote", "gdrive", "jianguo", "yuque" ].includes( type ) ) {
+ const { dropbox, pocket, instapaper, linnk, evernote, onenote, gdrive, jianguo, yuque } = exp,
id = type == "yinxiang" ? "evernote" : type;
storage.Statistics( "service", type );
const service = type => {
@@ -174,18 +174,29 @@ function action( type, title, desc, content ) {
evernote.Add( title, util.HTML2ENML( content, window.location.href ), ( result, error ) => {
exp.svcCbWrapper( result, error, evernote.name, type, new Notify() );
if ( error == "error" ) {
- new Notify().Render({ content: "导出失败,是否以 Markdown 格式保存?", action: "是的", cancel: "取消", callback: action => {
- if ( action == "cancel" ) return;
- new Notify().Render({ content: "转换为 Markdown 并保存中,请稍等...", delay: 2000 } );
- exp.MDWrapper( util.ClearMD( content, false ), undefined, new Notify() ).done( result => {
- content = util.MD2ENML( result );
- service( type );
+ new Notify().Render( "保存失败,正在尝试优化结构再次保存,请稍等..." );
+ exp.MDWrapper( util.ClearMD( content, false ), undefined, new Notify() ).done( result => {
+ const md = util.MD2ENML( result ),
+ tmpl = util.ClearHTML( exp.MD2HTML( result ));
+ evernote.Add( title, tmpl, ( result, error ) => {
+ exp.svcCbWrapper( result, error, evernote.name, type, new Notify() );
+ if ( error == "error" ) {
+ new Notify().Render({ content: "导出失败,是否以 Markdown 格式保存?", action: "是的", cancel: "取消", callback: action => {
+ if ( action == "cancel" ) return;
+ new Notify().Render({ content: "转换为 Markdown 并保存中,请稍等...", delay: 2000 } );
+ evernote.Add( title, util.HTML2ENML( md, window.location.href ), ( result, error ) => {
+ exp.svcCbWrapper( result, error, evernote.name, type, new Notify() );
+ if ( error == "error" ) {
+ new Notify().Render({ content: `转换后保存失败,是否提交当前站点?`, action: "是的", cancel: "取消", callback: type => {
+ if ( type == "cancel" ) return;
+ browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.save_site, { url: location.href, site: {}, uid: storage.user.uid, type: "evernote" }));
+ }});
+ }
+ });
+ }});
+ }
});
- }});
- new Notify().Render({ content: `此功能为实验性功能,是否提交当前站点?`, action: "是的", cancel: "取消", callback: type => {
- if ( type == "cancel" ) return;
- browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.save_site, { url: location.href, site: storage.pr.current.site, uid: storage.user.uid, type: "evernote" }));
- }});
+ });
}
});
break;
@@ -194,10 +205,27 @@ function action( type, title, desc, content ) {
break;
case "gdrive":
storage.pr.current.site.avatar[0].name != "" && ( content = util.MULTI2ENML( content ) );
- exp.MDWrapper( util.ClearMD( content), undefined, new Notify() ).done( result => {
+ exp.MDWrapper( util.ClearMD( content ), undefined, new Notify() ).done( result => {
gdrive.Add( "file",( result, error ) => exp.svcCbWrapper( result, error, gdrive.name, type, new Notify() ), gdrive.CreateFile( `${title}.md`, result ));
});
break;
+ case "jianguo":
+ exp.MDWrapper( util.ClearMD( content ) , undefined, new Notify() ).done( markdown => {
+ title = title.replace( /[|@!#$%^&*()<>/,.+=\\]/ig, "-" );
+ jianguo.Add( storage.secret.jianguo.username, storage.secret.jianguo.password, `${jianguo.root}/${jianguo.folder}/${title}.md`, markdown, result => {
+ let error = undefined;
+ if ( result && ( result.status != 201 && result.status != 204 )) {
+ error = "导出到坚果云失败,请稍后再试。";
+ }
+ exp.svcCbWrapper( result, error, jianguo.name, type, new Notify() );
+ });
+ });
+ break;
+ case "yuque":
+ exp.MDWrapper( util.ClearMD( content ), undefined, new Notify() ).done( result => {
+ yuque.Add( title, result,( result, error ) => exp.svcCbWrapper( result, error, yuque.name, type, new Notify() ));
+ });
+ break;
}
};
@@ -212,6 +240,26 @@ function action( type, title, desc, content ) {
}
} else if ( type.startsWith( "fullscreen" ) ) {
document.documentElement.requestFullscreen();
+ } else if ( type.startsWith( "webdav_" ) ) {
+ const id = type.replace( "webdav_", "" );
+ storage.Safe( () => {
+ storage.secret.webdav.forEach( item => {
+ item = JSON.parse( item );
+ if ( item.name == id ) {
+ exp.MDWrapper( util.ClearMD( content ) , undefined, new Notify() ).done( markdown => {
+ title = title.replace( /[|@!#$%^&*()<>/,.+=\\]/ig, "-" );
+ new Notify().Render( `开始保存到 ${ item.name},请稍等...` );
+ exp.webdav.Add( item.url, item.user, item.password, `${title}.md`, markdown, result => {
+ let error = undefined;
+ if ( result && ( result.status != 201 && result.status != 204 )) {
+ error = `导出到 ${item.name} 失败,请稍后再试。`;
+ }
+ exp.svcCbWrapper( result, error, item.name, type, new Notify() );
+ });
+ });
+ }
+ });
+ })
}
else {
new Notify().Render( 2, "当前模式下,不支持此功能。" );
diff --git a/src/service/runtime.js b/src/service/runtime.js
index 4e5af33c8..2e2c44b60 100644
--- a/src/service/runtime.js
+++ b/src/service/runtime.js
@@ -1,8 +1,13 @@
console.log( "=== simpread runtime load ===" )
-import nanoid from 'nanoid';
-import {browser} from 'browser';
+import nanoid from 'nanoid';
+
+import {browser} from 'browser';
import {storage, Clone} from 'storage';
+import * as highlight from 'highlight';
+import * as watch from 'watch';
+
+let is_firstload = true;
/**
* Generate ID
@@ -40,6 +45,16 @@ function install( id, url, callback ) {
.fail( () => callback( undefined, "error" ));
}
+/**
+ * Dispatch event
+ *
+ * @param {string} type include: export, read_ui, read_start, read_end
+ * @param {string} value
+ */
+function dispatch( type, value ) {
+ window.dispatchEvent( new CustomEvent( "simpread-plugin", { detail: { type, value }}));
+}
+
/**
* Execute
*
@@ -48,12 +63,16 @@ function install( id, url, callback ) {
* @param {object} plugin object
*/
function exec( state, site, plugin ) {
- if ( plugin.enable == false ) return;
- if ( plugin.run_at != state ) return;
- if ( plugin.site != "" && !plugin.site.split(",").includes( site ) ) return;
- console.log( "current plugin is running", plugin )
- new Function( func( plugin.script ) )();
- plugin.style != "" && addStyle( plugin.style );
+ try {
+ if ( plugin.enable == false ) return;
+ if ( plugin.run_at != state ) return;
+ if ( plugin.site != "" && !plugin.site.split(",").includes( site ) ) return;
+ console.log( "current plugin is running", plugin )
+ new Function( func( plugin.script ) )();
+ plugin.style != "" && addStyle( plugin.style );
+ } catch ( error ) {
+ new Notify().Render( 2, `插件 ${ plugin.name } 运行时出错,可以的话,请 提交此问题 😁` );
+ }
}
/**
@@ -64,11 +83,71 @@ function exec( state, site, plugin ) {
function func( source ) {
window.Notify = Notify;
window.browser = browser;
- window.current = Clone( storage.pr.current );
+ window.current = Clone( storage.current );
window.read = Clone( storage.read );
- return `( function ( $$version, $title, $desc, $content, $footer, $process, $toc, Notify, browser, $$current, $$read ) {
+ window.highlight = highlight;
+ window.db = Storage;
+ window.control = Controlbar;
+ window.SRSave = Save;
+ return `( function ( $$version, $read, $title, $desc, $content, $footer, $process, $toc, Notify, $$highlight, browser, $$storage, $$current, $$read, $$control, $$save ) {
${ source }
- })( "0.0.1", $( "sr-rd-title" ), $( "sr-rd-desc" ), $( "sr-rd-content" ), $( "sr-rd-footer" ), $( "read-process" ), $( "toc" ), Notify, browser, current, read );`
+ })( "0.0.2", $( "sr-read" ), $( "sr-rd-title" ), $( "sr-rd-desc" ), $( "sr-rd-content" ), $( "sr-rd-footer" ), $( "read-process" ), $( "toc" ), Notify, highlight, browser, db, current, read, control, SRSave );`
+}
+
+/**
+ * Getter / Setter plugin config
+ *
+ * @param {string} plugin id
+ * @param {object} data
+ * @param {func} callback
+ */
+function Storage( id, data, callback ) {
+ if ( data ) {
+ browser.storage.local.set( { ["plugin-"+id] : data }, () => {
+ callback && callback();
+ });
+ } else {
+ browser.storage.local.get( ["plugin-"+id], result => {
+ callback && callback( result );
+ });
+ }
+}
+
+/**
+ * Contorlbar setting
+ *
+ * @param {string} controlbar type include: markdown
+ * @param {func} callback
+ */
+function Controlbar( type, callback ) {
+ if ( callback ) {
+ is_firstload && window.addEventListener( "simpread-plugin_controlbar", event => {
+ callback( event );
+ });
+ } else window.dispatchEvent( new CustomEvent( "simpread-plugin_controlbar", { detail: { type }}));
+ is_firstload = false;
+}
+
+/**
+ * Save adapter storage.Write
+ *
+ * @param {object} simpread data structure
+ * @param {func} callback
+ */
+function Save( data, callback ) {
+ if ( data ) {
+ storage.Write( ()=> {
+ watch.SendMessage( "option", true );
+ callback();
+ }, storage.simpread );
+ } else {
+ return {
+ focus : storage.focus,
+ read : storage.read,
+ option : storage.option,
+ version: storage.version
+ }
+ }
}
/**
@@ -80,15 +159,45 @@ function addStyle( str ) {
$( "head" ).append(``);
}
+/**
+ * Add trigger
+ *
+ * @param {string} add trigger to fap controlbar
+ */
+function addTrigger( str ) {
+ let is_found = false;
+ $( "fap action-bar" ).find( "sr-opt-label" ).map( ( idx, item ) => {
+ if ( $(item).text() == "插件触发器" ) {
+ is_found = true;
+ $(item).next().append( str );
+ }
+ });
+ if ( is_found == false ) {
+ const html = `
+ 插件触发器
+
+ ${str}
+
+ `;
+ $( "fap action-bar" ).append( html );
+ }
+}
+
/**
* Test Plugin
*
* @param {func} style func
* @param {func} plugin func
+ * @param {func} trigger func
*/
-function testPlugin( style, plugin ) {
+function testPlugin( style, plugin, trigger ) {
style && addStyle( style() );
- plugin && plugin( "0.0.1", $( "sr-rd-title" ), $( "sr-rd-desc" ), $( "sr-rd-content" ), $( "sr-rd-footer" ), $( "read-process" ), $( "toc" ), Notify, browser, storage.pr.current, storage.read );
+ plugin && plugin( "0.0.2",
+ $( "sr-read" ), $( "sr-rd-title" ), $( "sr-rd-desc" ), $( "sr-rd-content" ), $( "sr-rd-footer" ), $( "read-process" ), $( "toc" ),
+ Notify, highlight,
+ browser, Storage,
+ storage.current, storage.read, Controlbar, Save );
+ trigger && addTrigger( trigger() );
}
window.simpread = { testPlugin };
@@ -97,4 +206,6 @@ export {
install as Install,
exec as Exec,
generateID as ID,
+ dispatch as Event,
+ Controlbar,
}
\ No newline at end of file
diff --git a/src/service/storage.js b/src/service/storage.js
index 713bae1bb..742accae8 100644
--- a/src/service/storage.js
+++ b/src/service/storage.js
@@ -12,10 +12,11 @@ import {version,patch}from 'version';
*/
const name = "simpread",
- remote = "http://sr.ksria.cn/website_list_v3.json",
+ remote = "http://sr.ksria.cn/website_list_v4.json",
origins= "http://sr.ksria.cn/website_list_origins.json",
versions= "http://sr.ksria.cn/versions.json",
local = browser.extension.getURL( "website_list.json" ),
+ help = browser.extension.getURL( "help_tips.json" ),
mode = {
focus : "focus",
read : "read",
@@ -46,7 +47,7 @@ const name = "simpread",
},
read = {
version : "2017-03-16",
- progress : true,
+ progress : false,
auto : false,
controlbar: true,
fap : true,
@@ -107,11 +108,18 @@ const name = "simpread",
create : "",
update : "",
sync : "",
+ save_at : "dropbox", // include: dropbox | jianguo
+ notice : true,
//focus : 0,
//read : 0,
esc : true,
br_exit : false,
secret : false,
+ preload : true,
+ lazyload : [
+ "baidu.com", "weibo.com", "youtube.com"
+ ],
+ uninstall : true,
menu : {
focus : true,
read : true,
@@ -125,6 +133,11 @@ const name = "simpread",
origins : [],
blacklist : [
"google.com",
+ "youtube.com",
+ "simp.red",
+ "simpread.herokuapp.com",
+ "simpread-test.herokuapp.com",
+ "simpread.ksria.cn"
],
plugins : [], // plugin id, e.g. kw36BtjGu0
},
@@ -148,6 +161,8 @@ const name = "simpread",
"gdrive" : 0,
"kindle" : 0,
"temp" : 0,
+ "yuque" : 0,
+ "jianguo" : 0,
}
},
user = {
@@ -158,6 +173,10 @@ const name = "simpread",
avatar : "",
permission: "",
},
+ notice = {
+ latest: 0,
+ read : []
+ },
unread = {
idx : 0,
create : "",
@@ -184,11 +203,12 @@ let current = {},
local : [], // include focus.sites and read.sites
},
statistics,
+ notice,
user,
},
plugins = {},
secret = {
- version : "2017-11-22",
+ version : "2019-06-08",
"dropbox" : {
"access_token": ""
},
@@ -217,6 +237,16 @@ let current = {},
access_token : "",
folder_id : "",
},
+ "yuque" : {
+ access_token : "",
+ repos_id: "",
+ },
+ "jianguo" : {
+ username : "",
+ password : "",
+ access_token : "",
+ },
+ "webdav" : []
};
//stcode = -1;
@@ -278,6 +308,15 @@ class Storage {
return simpread[ mode.unrdist ];
}
+ /**
+ * Get notice
+ *
+ * @return {object} notice
+ */
+ get notice() {
+ return simpread.notice;
+ }
+
/**
* Get version
*
@@ -392,6 +431,27 @@ class Storage {
return "https://simpread.ksria.cn";
}
+ /**
+ * Get notice service url
+ *
+ * @return {string} url
+ */
+ get notice_service() {
+ return {
+ latest: "http://simp.red/notice/latest",
+ message: "http://simp.red/notice",
+ }
+ }
+
+ /**
+ * Get help service url
+ *
+ * @return {string} url
+ */
+ get help_service() {
+ return "http://sr.ksria.cn/help_tips.json";
+ }
+
/**
* Get simpread object from chrome storage
*
@@ -562,6 +622,9 @@ class Storage {
case "versions":
url = versions;
break;
+ case "help_tips":
+ url = help;
+ break;
default:
url = type;
}
@@ -700,6 +763,30 @@ class Storage {
}
}
+ /**
+ * Notice set/get
+ *
+ * @param {object} notice
+ * @param {function} callback
+ */
+ Notice( callback, data ) {
+ if ( data ) {
+ browser.storage.local.set( { ["notice"] : data }, () => {
+ console.log( "chrome storage notice set success!", data );
+ callback && callback();
+ });
+ } else {
+ if ( br.isFirefox() && window.location.protocol != "moz-extension:" ) {
+ callback && callback();
+ } else {
+ browser.storage.local.get( ["notice"], result => {
+ console.log( "chrome storage notice get success!", result );
+ callback && callback( result );
+ });
+ }
+ }
+ }
+
/**
* Plugins set/get, plugins not import/export
*
@@ -723,7 +810,7 @@ class Storage {
}
/**
- * Export, only include: version, option, focus, read, unrdist
+ * Export
*
* @return {string} object json stringify
*/
@@ -736,6 +823,7 @@ class Storage {
websites: { ...this.websites },
statistics: { ...this.statistics },
user : { ...this.user },
+ notice : { ...this.notice },
unrdist : this.unrdist,
};
this.option.secret && ( download.secret = { ...secret });
diff --git a/src/service/util.js b/src/service/util.js
index f82a593df..369ec8d5d 100644
--- a/src/service/util.js
+++ b/src/service/util.js
@@ -27,13 +27,14 @@ function verifyHtml( html ) {
- [['text']] // remove ''
- [[/regexp/]] // regexp e.g. $("sr-rd-content").find( "*[src='http://ifanr-cdn.b0.upaiyun.com/wp-content/uploads/2016/09/AppSo-qrcode-signature.jpg']" )
- [[[juqery code]]] // new Function, e.g. $("xxx").find() return jquery object
+ - [[`xpath`]] // /html[1]/div[1]/sr-read[1]/sr-rd-content[1]/p[1]
*
* @param {string} verify content
* @return {boolen} verify result
*/
function specTest( content ) {
- return /^(\[\[)[\[{'/]{1}[ \S]+[}'/\]]\]\]{1}($)/g.test( content );
+ return /^(\[\[)[\[{`'/]{1}[ \S]+[}`'/\]]\]\]{1}($)/g.test( content );
}
/**
@@ -79,8 +80,9 @@ function html2enml( html, url ) {
$target.remove();
try {
- str = `本文由 简悦 SimpRead 转码,原文地址 ${url} ` + str;
- str = str.replace( /(id|class|onclick|ondblclick|accesskey|data|dynsrc|tabindex|name)="[\S ][^"]+"/g, "" )
+ const href = url.indexOf("chksm") > 0 ? "" : `,原文地址 ${url} `;
+ str = `本文由 简悦 SimpRead 转码${href} ` + str;
+ str = str.replace( /(id|class|onclick|ondblclick|accesskey|data|dynsrc|tabindex|name)="[\S ][^"]*"/ig, "" )
//.replace( / style=[ \w="-:\/\/:#;]+/ig, "" ) // style="xxxx"
.replace( /label=[\u4e00-\u9fa5 \w="-:\/\/:#;]+"/ig, "" ) // label="xxxx"
.replace( / finallycleanhtml=[\u4e00-\u9fa5 \w="-:\/\/:#;]+"/ig, "" ) // finallycleanhtml="xxxx"
@@ -149,6 +151,21 @@ function clearMD( str, header = true ) {
return str;
}
+/**
+ * Clean HTML
+ *
+ * @param {string} str
+ * @return {string} optimze str
+ */
+function clearHTML( str ) {
+ const url = location.href,
+ href = url.indexOf("chksm") > 0 || url.indexOf("#") > 0 ? "" : `,原文地址 ${url} `;
+ str = `本文由 简悦 SimpRead 转码${href} ` + str;
+ str = str.replace( /(id|class|onclick|ondblclick|accesskey|data|dynsrc|tabindex|name)="[\S ][^"]*"/ig, "" )
+ .replace( /&/ig, "&" )
+ return str;
+}
+
/**
* Exclusion
*
@@ -185,6 +202,7 @@ export {
md2enml as MD2ENML,
multi2enml as MULTI2ENML,
clearMD as ClearMD,
+ clearHTML as ClearHTML,
exclusion as Exclusion,
whitelist as Whitelist,
}
\ No newline at end of file
diff --git a/src/service/version.js b/src/service/version.js
index 931a7a36f..a10fd1559 100644
--- a/src/service/version.js
+++ b/src/service/version.js
@@ -18,6 +18,7 @@ const version = browser.runtime.getManifest().version.replace( /.\d{2,}/, "" ),
[ "1.1.0", "Sat Dec 23 2017 15:09:30 GMT+0800 (CST)" ],
[ "1.1.1", "Mon Jun 11 2018 15:10:12 GMT+0800 (CST)" ],
[ "1.1.2", "Tue Jun 19 2018 14:15:12 GMT+0800 (CST)" ],
+ [ "1.1.3", "Thu Jun 06 2019 15:47:44 GMT+0800 (CST)" ],
]),
details = new Map([
[ "1.0.0", "" ],
@@ -30,7 +31,263 @@ const version = browser.runtime.getManifest().version.replace( /.\d{2,}/, "" ),
[ "1.1.0", "新增「站点编辑器,站点适配源,站点管理器等」," ],
[ "1.1.1", "新增「黑名单,全新的控制栏面板,更丰富的中文定制化,无障碍阅读等」," ],
[ "1.1.2", "新增「插件中心,站点集市等」," ],
- ]);
+ [ "1.1.3", "新增「消息中心,帮助中心,入门指引,支持导入语雀 / 坚果云,预加载机制,增强插件 API 等」," ],
+ ]),
+ tips = {
+ "root" : value => `.version-tips[data-hits='${value}']`,
+ "1.1.3" : {
+ target: 'labs',
+ idx: 2,
+ items: [
+ {
+ id: '',
+ intro: '简悦 1.1.3 功能描述: ' + details.get( "1.1.3" ) + '详细说明 请看这里 。' ,
+ },
+ {
+ id: 'save_at',
+ intro: '从现在开始可以将配置文件保存到坚果云了,详细说明 请看这里 。',
+ },
+ {
+ id: 'preload',
+ intro: '简悦的词法分析引擎采用了预加载机制,当系统性能吃紧时,可以选择关闭此功能,详细说明 请看这里 。',
+ },
+ {
+ id: 'lazyload',
+ intro: '此功能适合 经常使用简悦但又性能不够 的用户;需要动态加载的页面;支持 Mathjax 解析的页面等,详细说明 请看这里 。',
+ },
+ {
+ id: 'jianguo',
+ intro: '你可以在这里输入坚果云的用户名和授权的密码来绑定坚果云,详细说明 请看这里 。',
+ },
+ {
+ id: 'yuque',
+ intro: '连接你的语雀帐号后,就可使用导出到语雀的服务了,详细说明 请看这里 。',
+ },
+ {
+ id: 'webdav',
+ intro: '导出服务 任意支持 WebDAV 协议 了,从现在开始使用你熟悉的网盘吧,详细说明 请看这里 。',
+ },
+ {
+ id: 'notice',
+ intro: '简悦 1.1.3 版增加了消息中心,为了方便查看简悦的一些最新消息,详细说明 请看这里 。',
+ }
+ ]
+ },
+ "common" : {
+ target: 'common',
+ idx: 0,
+ items: [
+ {
+ id: 'sync',
+ intro: '简悦支持导出配置文件到 Dropbox 或 坚果云,详细说明 请看这里 。',
+ },
+ {
+ id: 'config',
+ intro: '从 本地导入配置文件 或 导出配置文件到本地 。 注意:简悦支持导入任意版本的配置文件,但请尽量上传匹配版本的配置文件。',
+ },
+ {
+ id: 'oldnewsites',
+ intro: '从 1.1.3 开始,此功能转移到 站点管理 选项卡里面,此功能已废除。',
+ },
+ {
+ id: 'clear',
+ intro: '清除简悦产生的全部数据,等同于重新安装,慎用!使用前 请先备份 。',
+ }
+ ]
+ },
+ "simple" : {
+ target: 'simple',
+ idx: 1,
+ items: [
+ {
+ id: 'focusmode',
+ intro: '使用 聚焦模式 时的选项 包括:遮罩的主题色,遮罩的透明度,以及进入聚焦模式的快捷键。 这些功能也可以在进入此模式后通过右下角控制栏调整。',
+ },
+ {
+ id: 'readmode',
+ intro: '使用 阅读模式 时的选项 包括:主题色,进入阅读模式的快捷键,字体类型,版面布局,甚至正文的字体细调(字间距,行间距等)。 这些功能也可以在进入此模式后通过右下角控制栏调整。',
+ }
+ ]
+ },
+ "labs" : {
+ target: 'labs',
+ idx: 2,
+ items: [
+ {
+ id: '',
+ intro: '本页的功能专门针对 不同需求、不同使用场景 的精细调整。 如果你是初级用户的话,完全可以无视这些调整,简悦支持 开箱即用 。 如果想让阅读模式更具个性化,建议花 1 ~ 2 分钟来看下这些功能点。 😊 ' ,
+ },
+ {
+ id: 'esc',
+ intro: '启用此功能后,进入阅读模式 & 聚焦模式,可通过点击 ESC 的方式退出。',
+ },
+ {
+ id: 'br_exit',
+ intro: '点击浏览器右上角 简悦 icon 后的动作,包括:退出当前模式 & 弹出设置对话框。',
+ },
+ {
+ id: 'blacklist',
+ intro: '加入到列表中的 URL 对应的页面将不会运行简悦,适合一些完全不需要简悦的场合,如:视频类的网站。 支持绝对地址或主域名,详细说明 请看这里 。',
+ },
+ {
+ id: 'save_at',
+ intro: '从现在开始可以将配置文件保存到坚果云了,详细说明 请看这里 。',
+ },
+ {
+ id: 'menu',
+ intro: '简悦支持右键菜单,如果你是个鼠标党的话,可以好好利用它们,详细说明 请看这里 。',
+ },
+ {
+ id: 'focusconfig',
+ intro: '与 基础设定 中不同,这里是关于聚焦模式细节的设定,同时这些选项也只能在选项页中修改。',
+ },
+ {
+ id: 'readconfig',
+ intro: '与 基础设定 中不同,这里是关于阅读模式细节的设定,同时这些选项也只能在选项页中修改。 阅读模式 是简悦重要的组成部分,除了常规的阅读模式外,简悦还支持多种类型,包括: - 论坛类页面及分页 - 主动适配 - 智能感知 - 手动框选 - TXT 阅读器 - Markdown 阅读器 - LaTeX 阅读器 ',
+ },
+ {
+ id: 'progress',
+ intro: '进入阅读模式后会在页面上方显示一个阅读进度条,从 1.1.3 版开始 默认为不启用 ,详细说明 请看这里 。',
+ },
+ {
+ id: 'readcontrolbar',
+ intro: '进入阅读模式后,会在页面的右下角显示一个 icon 点击可查看阅读模式的一些功能,你可以在这里选择隐藏(鼠标移上时才显示)它。',
+ },
+ {
+ id: 'fap',
+ intro: '1.1.1 版开始提供 控制栏浮动面板 用来替代原来的 控制栏浮动工具条 。 如果你并不经常使用简悦的一些高级功能,可以关闭此选项,使用更简洁的 控制栏浮动工具条 ,详细说明 请看这里 。',
+ },
+ {
+ id: 'highlight',
+ intro: '在 手动框选 方式的基础上增加了 二次确认模式 ,此模式专门针对页面极其复杂的情况,详细说明 请看这里 。',
+ },
+ {
+ id: 'toc',
+ intro: '进入阅读模式后,会自动生成当前页面的大纲,同时也可选择大纲的显示方式,详细说明 请看这里 。',
+ },
+ {
+ id: 'readauto',
+ intro: '如果当前 站点已适配 的话,启用此选项后会自动进入到阅读模式,详细说明 请看这里 。',
+ },
+ {
+ id: 'exclusion',
+ intro: '启用 自动进入阅读模式 后,可将不需要自动进入阅读模式的站加入到这个列表中,详细说明 请看这里 。 关闭 自动进入阅读模式 后,会有 白名单 功能,与 排除列表 相反,加入此的站会自动进入阅读模式。',
+ },
+ {
+ id: 'pured',
+ intro: '简悦从 1.1.2.5005 开始增加了此功能,目前还处于测试版。 词法分析引擎会对版面重新设计,包括:去除多余空格、优化版面结构等。 注意:经常解析失败时,请关闭此功能,详细说明 请看这里 。',
+ },
+ {
+ id: 'puredpure',
+ intro: '包括:字形、颜色、字号、代码段等,如:微信订阅号,CSDN 等。 注意:如果经常阅读代码的话,请安装 代码段增强 插件,功能包括:高亮,去重,支持 CSDN 等特殊情况的代码段。',
+ },
+ {
+ id: 'preload',
+ intro: '简悦的词法分析引擎采用了预加载机制,当系统性能吃紧时,可以选择关闭此功能,详细说明 请看这里 。 注意:建议无特殊情况下不要关闭此功能,可以 使用下一条的功能 来规避性能问题。',
+ },
+ {
+ id: 'lazyload',
+ intro: '为了更快的进入到阅读模式,简悦会主动分析每个页面,但加入此列表的 URL 不会被主动分析。 此功能适合: - 经常使用简悦但又性能不够 的用户; - 需要动态加载的页面; - 支持 Mathjax 解析的页面等; 详细说明 请看这里 。',
+ },
+ {
+ id: 'auth',
+ intro: '简悦支持常见的导出服务,你可以授权它们,导出 阅读模式(简悦优化后)的页面 到这些服务,详细说明 请看这里 。',
+ },
+ {
+ id: 'secret',
+ intro: '使用导出服务后,会产生授权码,简悦默认 不会在导出配置时包含它们 ,如果需要的话,请开启此功能,详细说明 请看这里 。',
+ },
+ {
+ id: 'custom',
+ intro: '简悦可以对 阅读模式生成的页面 更加精细的调整,甚至于 使用 CSS 来深度定制 ,详细说明 请看这里 。',
+ },
+ {
+ id: 'notice',
+ intro: '简悦 1.1.3 版增加了消息中心,为了方便查看简悦的一些最新消息,详细说明 请看这里 。',
+ }
+ ]
+ },
+ "sites" : {
+ target: 'sites',
+ idx: 2,
+ items: [
+ {
+ id: 'newsites',
+ intro: '简悦每隔一段时间会自动同步适配列表,你也可以手动同步。 什么是适配列表?详细说明 请看这里 。',
+ },
+ {
+ id: 'customsites',
+ intro: '从 1.1.3 开始,简悦调整了第三方适配的规则:仅针对个人的适配源,关于这部分的详细说明 请看这里 。注意: 如果你使用了自己的适配源,请先清除再导入。',
+ },
+ {
+ id: 'sitemgr',
+ intro: '用来管理全部的站点,详细说明 请看这里 。',
+ },
+ {
+ id: 'personsites',
+ intro: '简悦用户自行上传且未收录到 官方适配源 里面的适配站点,可以在这里对这些站点进行安装,删除,更新等操作,详细说明 请看这里 。',
+ }
+ ]
+ },
+ "plugins" : {
+ target: 'plugins',
+ idx: 4,
+ items: [
+ {
+ id: 'pluginsite',
+ intro: '为了让阅读模式更加的丰富,简悦从 1.1.2 版本开始支持插件系统,插件系统 仅支持阅读模式 。 点击这里打开到插件的官网,关于插件的详细说明 请看这里 。 注意:安装过多的插件会引起性能问题,建议 不要超过 6 个 。',
+ },
+ {
+ id: 'pluginconfig',
+ intro: '当用户上传了新的配置文件,需要手动从配置文件读取插件。 注意:上传配置文件后会清除当前环境的插件,所以请别忘记手动导入。',
+ },
+ {
+ id: 'pluginupdate',
+ intro: '更新已安装的全部插件到最新版本。',
+ },
+ {
+ id: 'pluginclear',
+ intro: '清除当前环境的全部插件。 注意:此操作并不能清除当前的配置文件,如果要清除配置文件,请前往 共通 → 清除数据 操作。',
+ },
+ {
+ id: 'pluginmange',
+ intro: '这是用户的已安装的全部插件,在这里进行管理,包括:禁用, 删除,更新,查看 等操作。 同样,在这里安装的插件可以在阅读模式下启用禁用操作,位置在 阅读模式 → 右下角控制栏 → 插件(选项卡) 查看。',
+ }
+ ]
+ },
+ "later" : {
+ target: 'later',
+ idx: 5,
+ items: [
+ {
+ id: 'laterlist',
+ intro: '简悦自带了一个未读列表,你可以把任意 URL 通过 右键菜单 / 控制栏 → 动作 发送到稍后读。 稍后读也支持发送这些链接到 Pocket · Instapaper · Linnk 里面,详细说明 请看这里 。',
+ },
+ {
+ id: 'latermore',
+ intro: '加载更多的稍后读。',
+ }
+ ]
+ },
+ "@performance" : {
+ target: 'labs',
+ idx: 2,
+ items: [
+ {
+ id: 'preload',
+ intro: '简悦的词法分析引擎采用了预加载机制,当系统性能吃紧时,可以选择关闭此功能,详细说明 请看这里 。 注意:建议无特殊情况下不要关闭此功能,可以 使用下一条的功能 来规避性能问题。',
+ },
+ {
+ id: 'lazyload',
+ intro: '为了更快的进入到阅读模式,简悦会主动分析每个页面,但加入此列表的 URL 不会被主动分析。 此功能适合: - 经常使用简悦但又性能不够 的用户; - 需要动态加载的页面; - 支持 Mathjax 解析的页面等; 详细说明 请看这里 。',
+ },
+ {
+ id: 'blacklist',
+ intro: '也可以将完全不需要的站点加入到黑名单中,详细说明 请看这里 。',
+ }
+ ]
+ }
+ };
/**
* Verify version
@@ -157,6 +414,26 @@ function Verify( curver, data ) {
data.patch != sub_ver && FixSubver( sub_ver, data );
}
+ if ( curver == "1.1.2" ) {
+ data.option.save_at = "dropbox";
+ data.option.notice = true;
+ data.option.preload = true;
+ data.option.lazyload = [
+ "baidu.com", "weibo.com", "youtube.com"
+ ];
+ data.option.uninstall = true;
+
+ data.statistics.service.yuque = 0;
+ data.statistics.service.jianguo = 0;
+
+ data.notice = { "latest": 0, "read": [] };
+
+ data.option.blacklist.findIndex( item => item.toLowerCase() == "youtube.com" ) < 0 && data.option.blacklist.push( "youtube.com" );
+
+ data.patch = 0;
+ curver = "1.1.3";
+ }
+
/*
if ( curver == "1.0.1" ) {
data.option.pocket = { "consumer": "", "access": "" };
@@ -169,6 +446,29 @@ function Verify( curver, data ) {
return data;
}
+/**
+ * Fix Incompatible simpread data structure
+ *
+ * @param {string} version
+ * @param {object} simpread data structure
+ * @return {boolean} true: changed false: not changed
+ */
+function Incompatible( ver, data ) {
+ let is_changed = false;
+ if ( ver == "1.1.3" ) {
+ data.option.origins = data.option.origins.filter( item => item != "http://sr.ksria.cn/origins/website_list_en.json" && item != "http://sr.ksria.cn/origins/website_list_tw.json" )
+ if ( data.option.origins.length > 0 ) {
+ is_changed = true;
+ new Notify().Render({ type: 2, content: `检测到你曾经修改过第三方适配源,务必刷新后重新导入 !详细说明 `, state: "holdon" });
+ }
+ if ( VerifyPlugins( ver, data.option )) {
+ is_changed = true;
+ new Notify().Render({ type: 2, content: `已清理失效的插件,务必刷新后重新导入 ,详细请看 删除失效的插件 `, state: "holdon" });
+ }
+ }
+ return is_changed;
+}
+
/**
* Notify with type and version
* 1.0.4 before usage http://ksria.com/simpread/changelog.html#{ver}
@@ -178,10 +478,10 @@ function Verify( curver, data ) {
* @param {string} type, include: firstload, update
* @param {string} ver, e.g. 1.0.0, 1.0.1
*/
-function Notify( first, type, ver ) {
+function Notify2( first, type, ver ) {
const str = type == "firstload" ? "安装" : "更新",
detail = type == "firstload" ? "" : details.get(ver),
- link = first ? `${detail}如何使用请看 文档中心 ` : `${detail}请看 更新说明 `;
+ link = first ? `${detail}如何使用请看 新手入门 及 文档中心 ` : `${detail}请看 更新说明 `;
return `${str} 到最新版本 ${ver} ,${ link }`;
}
@@ -223,11 +523,37 @@ function FixSubver( patch, target ) {
return target;
}
+/**
+ * Verify current version plugins
+ *
+ * @param {string} version
+ * @param {object} option
+ */
+function VerifyPlugins( ver, option ) {
+ try {
+ if ( option.plugins.length == 0 ) return false;
+ const str = option.plugins.join( "," );
+ if ( ver == "1.1.3" ) {
+ const newStr = str.replace( /(E0j1nYBmDD,?|SumEaxStWE,?|UsayAKSuwe,?)/g, "" );
+ if ( str != newStr ) {
+ option.plugins = newStr.replace( /,$/, "" ).split( "," );
+ return true;
+ }
+ } else return false;
+ } catch( error ) {
+ console.error( "version::VerifyPlugin catch", error )
+ return false;
+ }
+}
+
export {
version,
+ tips,
sub_ver as patch,
Verify,
- Notify,
+ Notify2 as Notify,
Compare,
FixSubver,
+ VerifyPlugins,
+ Incompatible,
}
\ No newline at end of file
diff --git a/src/service/watch.js b/src/service/watch.js
index 887ef36d4..eb3b77145 100644
--- a/src/service/watch.js
+++ b/src/service/watch.js
@@ -1,4 +1,4 @@
-console.log( "=== simpread storage load ===" )
+console.log( "=== simpread watch load ===" )
import * as msg from 'message';
import {br,browser}from 'browser';
diff --git a/src/vender/intro/intro.min.css b/src/vender/intro/intro.min.css
new file mode 100644
index 000000000..0bbde6542
--- /dev/null
+++ b/src/vender/intro/intro.min.css
@@ -0,0 +1,77 @@
+.introjs-overlay{position:absolute;box-sizing:content-box;z-index:999999;background-color:#000;opacity:0;background:-moz-radial-gradient(center,ellipse farthest-corner,rgba(0,0,0,.4) 0,rgba(0,0,0,.9) 100%);background:-webkit-gradient(radial,center center,0,center center,100%,color-stop(0,rgba(0,0,0,.4)),color-stop(100%,rgba(0,0,0,.9)));background:-webkit-radial-gradient(center,ellipse farthest-corner,rgba(0,0,0,.4) 0,rgba(0,0,0,.9) 100%);background:-o-radial-gradient(center,ellipse farthest-corner,rgba(0,0,0,.4) 0,rgba(0,0,0,.9) 100%);background:-ms-radial-gradient(center,ellipse farthest-corner,rgba(0,0,0,.4) 0,rgba(0,0,0,.9) 100%);background:radial-gradient(center,ellipse farthest-corner,rgba(0,0,0,.4) 0,rgba(0,0,0,.9) 100%);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-fixParent{z-index:auto!important;opacity:1!important;-webkit-transform:none!important;-moz-transform:none!important;-ms-transform:none!important;-o-transform:none!important;transform:none!important}.introjs-showElement,tr.introjs-showElement>td,tr.introjs-showElement>th{z-index:9999999!important}.introjs-disableInteraction{z-index:99999999!important;position:absolute;background-color:#fff;opacity:0}.introjs-relativePosition,tr.introjs-showElement>td,tr.introjs-showElement>th{position:relative}.introjs-helperLayer{box-sizing:content-box;position:absolute;z-index:9999998;background-color:#fff;background-color:rgba(255,255,255,.9);border:1px solid #777;border:1px solid rgba(0,0,0,.5);border-radius:4px;box-shadow:0 2px 15px rgba(0,0,0,.4);-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-tooltipReferenceLayer{box-sizing:content-box;position:absolute;visibility:hidden;z-index:100000000;background-color:transparent;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-ms-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.introjs-helperLayer *,.introjs-helperLayer :after,.introjs-helperLayer :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;-ms-box-sizing:content-box;-o-box-sizing:content-box;box-sizing:content-box}.introjs-helperNumberLayer{box-sizing:content-box;position:absolute;visibility:visible;top:-16px;left:-16px;z-index:9999999999!important;padding:2px;font-family:Arial,verdana,tahoma;font-size:13px;font-weight:700;color:#fff;text-align:center;text-shadow:1px 1px 1px rgba(0,0,0,.3);background:#ff3019;background:-webkit-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#ff3019),color-stop(100%,#cf0404));background:-moz-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-ms-linear-gradient(top,#ff3019 0,#cf0404 100%);background:-o-linear-gradient(top,#ff3019 0,#cf0404 100%);background:linear-gradient(to bottom,#ff3019 0,#cf0404 100%);width:20px;height:20px;line-height:20px;border:3px solid #fff;border-radius:50%;box-shadow:0 2px 5px rgba(0,0,0,.4)}.introjs-arrow{border:5px solid transparent;content:'';position:absolute}.introjs-arrow.top{top:-10px;border-bottom-color:#fff}.introjs-arrow.top-right{top:-10px;right:10px;border-bottom-color:#fff}.introjs-arrow.top-middle{top:-10px;left:50%;margin-left:-5px;border-bottom-color:#fff}.introjs-arrow.right{right:-10px;top:10px;border-left-color:#fff}.introjs-arrow.right-bottom{bottom:10px;right:-10px;border-left-color:#fff}.introjs-arrow.bottom{bottom:-10px;border-top-color:#fff}.introjs-arrow.bottom-right{bottom:-10px;right:10px;border-top-color:#fff}.introjs-arrow.bottom-middle{bottom:-10px;left:50%;margin-left:-5px;border-top-color:#fff}.introjs-arrow.left{left:-10px;top:10px;border-right-color:#fff}.introjs-arrow.left-bottom{left:-10px;bottom:10px;border-right-color:#fff}.introjs-tooltip{box-sizing:content-box;position:absolute;visibility:visible;padding:10px;background-color:#fff;min-width:200px;max-width:300px;border-radius:3px;box-shadow:0 1px 10px rgba(0,0,0,.4);-webkit-transition:opacity .1s ease-out;-moz-transition:opacity .1s ease-out;-ms-transition:opacity .1s ease-out;-o-transition:opacity .1s ease-out;transition:opacity .1s ease-out}.introjs-tooltipbuttons{text-align:right;white-space:nowrap}.introjs-button{box-sizing:content-box;position:relative;overflow:visible;display:inline-block;padding:.3em .8em;border:1px solid #d4d4d4;margin:0;text-decoration:none;text-shadow:1px 1px 0 #fff;font:11px/normal sans-serif;color:#333;white-space:nowrap;cursor:pointer;outline:0;background-color:#ececec;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f4f4f4),to(#ececec));background-image:-moz-linear-gradient(#f4f4f4,#ececec);background-image:-o-linear-gradient(#f4f4f4,#ececec);background-image:linear-gradient(#f4f4f4,#ececec);-webkit-background-clip:padding;-moz-background-clip:padding;-o-background-clip:padding-box;-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em;zoom:1;margin-top:10px}.introjs-button:hover{border-color:#bcbcbc;text-decoration:none;box-shadow:0 1px 1px #e3e3e3}.introjs-button:active,.introjs-button:focus{background-image:-webkit-gradient(linear,0 0,0 100%,from(#ececec),to(#f4f4f4));background-image:-moz-linear-gradient(#ececec,#f4f4f4);background-image:-o-linear-gradient(#ececec,#f4f4f4);background-image:linear-gradient(#ececec,#f4f4f4)}.introjs-button::-moz-focus-inner{padding:0;border:0}.introjs-skipbutton{box-sizing:content-box;margin-right:5px;color:#7a7a7a}.introjs-prevbutton{-webkit-border-radius:.2em 0 0 .2em;-moz-border-radius:.2em 0 0 .2em;border-radius:.2em 0 0 .2em;border-right:none}.introjs-prevbutton.introjs-fullbutton{border:1px solid #d4d4d4;-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em}.introjs-nextbutton{-webkit-border-radius:0 .2em .2em 0;-moz-border-radius:0 .2em .2em 0;border-radius:0 .2em .2em 0}.introjs-nextbutton.introjs-fullbutton{-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em}.introjs-disabled,.introjs-disabled:focus,.introjs-disabled:hover{color:#9a9a9a;border-color:#d4d4d4;box-shadow:none;cursor:default;background-color:#f4f4f4;background-image:none;text-decoration:none}.introjs-hidden{display:none}.introjs-bullets{text-align:center}.introjs-bullets ul{box-sizing:content-box;clear:both;margin:15px auto 0;padding:0;display:inline-block}.introjs-bullets ul li{box-sizing:content-box;list-style:none;float:left;margin:0 2px}.introjs-bullets ul li a{box-sizing:content-box;display:block;width:6px;height:6px;background:#ccc;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;text-decoration:none;cursor:pointer}.introjs-bullets ul li a:hover{background:#999}.introjs-bullets ul li a.active{background:#999}.introjs-progress{box-sizing:content-box;overflow:hidden;height:10px;margin:10px 0 5px 0;border-radius:4px;background-color:#ecf0f1}.introjs-progressbar{box-sizing:content-box;float:left;width:0%;height:100%;font-size:10px;line-height:10px;text-align:center;background-color:#08c}.introjsFloatingElement{position:absolute;height:0;width:0;left:50%;top:50%}.introjs-fixedTooltip{position:fixed}.introjs-hint{box-sizing:content-box;position:absolute;background:0 0;width:20px;height:15px;cursor:pointer}.introjs-hint:focus{border:0;outline:0}.introjs-hidehint{display:none}.introjs-fixedhint{position:fixed}.introjs-hint:hover>.introjs-hint-pulse{border:5px solid rgba(60,60,60,.57)}.introjs-hint-pulse{box-sizing:content-box;width:10px;height:10px;border:5px solid rgba(60,60,60,.27);-webkit-border-radius:30px;-moz-border-radius:30px;border-radius:30px;background-color:rgba(136,136,136,.24);z-index:10;position:absolute;-webkit-transition:all .2s ease-out;-moz-transition:all .2s ease-out;-ms-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out}.introjs-hint-no-anim .introjs-hint-dot{-webkit-animation:none;-moz-animation:none;animation:none}.introjs-hint-dot{box-sizing:content-box;border:10px solid rgba(146,146,146,.36);background:0 0;-webkit-border-radius:60px;-moz-border-radius:60px;border-radius:60px;height:50px;width:50px;-webkit-animation:introjspulse 3s ease-out;-moz-animation:introjspulse 3s ease-out;animation:introjspulse 3s ease-out;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;animation-iteration-count:infinite;position:absolute;top:-25px;left:-25px;z-index:1;opacity:0}@-webkit-keyframes introjspulse{0%{-webkit-transform:scale(0);opacity:0}25%{-webkit-transform:scale(0);opacity:.1}50%{-webkit-transform:scale(.1);opacity:.3}75%{-webkit-transform:scale(.5);opacity:.5}100%{-webkit-transform:scale(1);opacity:0}}@-moz-keyframes introjspulse{0%{-moz-transform:scale(0);opacity:0}25%{-moz-transform:scale(0);opacity:.1}50%{-moz-transform:scale(.1);opacity:.3}75%{-moz-transform:scale(.5);opacity:.5}100%{-moz-transform:scale(1);opacity:0}}@keyframes introjspulse{0%{transform:scale(0);opacity:0}25%{transform:scale(0);opacity:.1}50%{transform:scale(.1);opacity:.3}75%{transform:scale(.5);opacity:.5}100%{transform:scale(1);opacity:0}}
+
+.introjs-arrow {
+ pointer-events: none;
+}
+
+.introjs-arrow.top {
+ position: inherit;
+ top: inherit;
+ left: inherit;
+ width: inherit;
+ height: inherit;
+ background-color: transparent;
+ overflow: inherit;
+ transition: inherit;
+ border-bottom-color: transparent;
+}
+
+.introjs-arrow.bottom {
+ border-top-color: transparent;
+}
+
+.introjs-tooltip {
+ min-width: 350px;
+ color: #ffffff;
+ background: #4285f4;
+ border: none #4285f4;
+ box-shadow: 0 0 4px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.12);
+}
+
+.introjs-button {
+ color: #fff;
+ background-color: #4285f4;
+ background-image: initial;
+
+ font-size: 13px;
+ text-shadow: none;
+ text-decoration: none!important;
+
+ border: none;
+}
+
+.introjs-button:hover {
+ font-weight: bold;
+ border-color: none;
+ box-shadow: none;
+}
+
+.introjs-button:active, .introjs-button:focus {
+ background-image: initial;
+}
+
+.introjs-prevbutton.introjs-fullbutton {
+ border: none;
+}
+
+.introjs-tooltiptext {
+ font-size: 14px;
+}
+
+.introjs-tooltiptext a {
+ color: #fff;
+ font-weight: 400;
+ text-decoration: underline;
+}
+
+.introjs-bullets ul li a.active {
+ background-color: #fff;
+}
+
+.introjs-bullets ul li a {
+ background-color: #999;
+}
+
+.introjs-helperNumberLayer {
+ display: none;
+}
\ No newline at end of file
diff --git a/src/vender/intro/intro.min.js b/src/vender/intro/intro.min.js
new file mode 100644
index 000000000..ec140f409
--- /dev/null
+++ b/src/vender/intro/intro.min.js
@@ -0,0 +1 @@
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t(),module.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),t().apply(this,arguments)};else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).introJs=t()}}(function(){function n(t){this._targetElement=t,this._introItems=[],this._options={nextLabel:"Next →",prevLabel:"← Back",skipLabel:"Skip",doneLabel:"Done",hidePrev:!1,hideNext:!1,tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintAnimation:!0,buttonClass:"introjs-button"}}function e(t,i){var e=t.querySelectorAll("*[data-intro]"),n=[];if(this._options.steps)B(this._options.steps,function(t){var e=h(t);if(e.step=n.length+1,"string"==typeof e.element&&(e.element=document.querySelector(e.element)),void 0===e.element||null===e.element){var i=document.querySelector(".introjsFloatingElement");null===i&&((i=document.createElement("div")).className="introjsFloatingElement",document.body.appendChild(i)),e.element=i,e.position="floating"}e.scrollTo=e.scrollTo||this._options.scrollTo,void 0===e.disableInteraction&&(e.disableInteraction=this._options.disableInteraction),null!==e.element&&n.push(e)}.bind(this));else{var o;if(e.length<1)return!1;B(e,function(t){if((!i||t.getAttribute("data-intro-group")===i)&&"none"!==t.style.display){var e=parseInt(t.getAttribute("data-step"),10);o=void 0!==t.getAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):this._options.disableInteraction,0o.height&&m(n,"bottom");r.top-s<0&&m(n,"top");r.right+l>o.width&&m(n,"right");r.left-l<0&&m(n,"left");var c=(h=i||"",u=h.indexOf("-"),-1!==u?h.substr(u):"");var h,u;i&&(i=i.split("-")[0]);n.length&&(a="auto"!==i&&-1a.height?(i.className="introjs-arrow left-bottom",e.style.top="-"+(l.height-r.height-20)+"px"):i.className="introjs-arrow left";break;case"left":o||!0!==this._options.showStepNumbers||(e.style.top="15px"),r.top+l.height>a.height?(e.style.top="-"+(l.height-r.height-20)+"px",i.className="introjs-arrow right-bottom"):i.className="introjs-arrow right",e.style.right=r.width+20+"px";break;case"floating":i.style.display="none",e.style.left="50%",e.style.top="50%",e.style.marginLeft="-"+l.width/2+"px",e.style.marginTop="-"+l.height/2+"px",null!=n&&(n.style.left="-"+(l.width/2+18)+"px",n.style.top="-"+(l.height/2+18)+"px");break;case"bottom-right-aligned":i.className="introjs-arrow top-right",f(r,u=0,l,e),e.style.top=r.height+20+"px";break;case"bottom-middle-aligned":i.className="introjs-arrow top-middle",d=r.width/2-l.width/2,o&&(d+=5),f(r,d,l,e)&&(e.style.right=null,p(r,d,l,a,e)),e.style.top=r.height+20+"px";break;default:i.className="introjs-arrow top",p(r,0,l,a,e),e.style.top=r.height+20+"px"}}function p(t,e,i,n,o){return t.left+e+i.width>n.width?(o.style.left=n.width-i.width-t.left+"px",!1):(o.style.left=e+"px",!0)}function f(t,e,i,n){return t.left+t.width-e-i.width<0?(n.style.left=-t.left+"px",!1):(n.style.right=e+"px",!0)}function m(t,e){-1 a.active").className="",r.querySelector('.introjs-bullets li > a[data-stepnumber="'+o.step+'"]').className="active"),r.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+z.call(s)+"%;",r.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",z.call(s)),d.style.opacity=1,c&&(c.style.opacity=1),null!=i&&/introjs-donebutton/gi.test(i.className)?i.focus():null!=t&&t.focus(),P.call(s,o.scrollTo,o,h)},350)}else{var f=document.createElement("div"),m=document.createElement("div"),b=document.createElement("div"),g=document.createElement("div"),y=document.createElement("div"),v=document.createElement("div"),_=document.createElement("div"),w=document.createElement("div");f.className=a,m.className="introjs-tooltipReferenceLayer",(n=R(o.element))!==document.body&&V(n,o.element),T.call(s,f),T.call(s,m),this._targetElement.appendChild(f),this._targetElement.appendChild(m),b.className="introjs-arrow",y.className="introjs-tooltiptext",y.innerHTML=o.intro,!(v.className="introjs-bullets")===this._options.showBullets&&(v.style.display="none");var C=document.createElement("ul");C.setAttribute("role","tablist");var j=function(){s.goToStep(this.getAttribute("data-stepnumber"))};B(this._introItems,function(t,e){var i=document.createElement("li"),n=document.createElement("a");i.setAttribute("role","presentation"),n.setAttribute("role","tab"),n.onclick=j,e===o.step-1&&(n.className="active"),I(n),n.innerHTML=" ",n.setAttribute("data-stepnumber",t.step),i.appendChild(n),C.appendChild(i)}),v.appendChild(C),!(_.className="introjs-progress")===this._options.showProgress&&(_.style.display="none");var k=document.createElement("div");k.className="introjs-progressbar",k.setAttribute("role","progress"),k.setAttribute("aria-valuemin",0),k.setAttribute("aria-valuemax",100),k.setAttribute("aria-valuenow",z.call(this)),k.style.cssText="width:"+z.call(this)+"%;",_.appendChild(k),!(w.className="introjs-tooltipbuttons")===this._options.showButtons&&(w.style.display="none"),g.className="introjs-tooltip",g.appendChild(y),g.appendChild(v),g.appendChild(_);var x=document.createElement("span");!0===this._options.showStepNumbers&&(x.className="introjs-helperNumberLayer",x.innerHTML=o.step,m.appendChild(x)),g.appendChild(b),m.appendChild(g),(t=document.createElement("a")).onclick=function(){s._introItems.length-1!==s._currentStep&&E.call(s)},I(t),t.innerHTML=this._options.nextLabel,(e=document.createElement("a")).onclick=function(){0!==s._currentStep&&N.call(s)},I(e),e.innerHTML=this._options.prevLabel,(i=document.createElement("a")).className=this._options.buttonClass+" introjs-skipbutton ",I(i),i.innerHTML=this._options.skipLabel,i.onclick=function(){s._introItems.length-1===s._currentStep&&"function"==typeof s._introCompleteCallback&&s._introCompleteCallback.call(s),s._introItems.length-1!==s._currentStep&&"function"==typeof s._introExitCallback&&s._introExitCallback.call(s),"function"==typeof s._introSkipCallback&&s._introSkipCallback.call(s),A.call(s,s._targetElement)},w.appendChild(i),1l?window.scrollBy(0,n.top-(l/2-n.height/2)-this._options.scrollPadding):window.scrollBy(0,n.top-(l/2-n.height/2)+this._options.scrollPadding)}}function q(){B(document.querySelectorAll(".introjs-showElement"),function(t){O(t,/introjs-[a-zA-Z]+/g)})}function B(t,e,i){if(t)for(var n=0,o=t.length;n=0||t.isContentEditable||"true"===t.getAttribute("g_editable"))return!0;t=t.parentNode}return!1}},{key:"isFirstTextChild",value:function(e,t){for(var r=e.childNodes,a=0;a-1;a--){var n=r[a];if(8!==n.nodeType&&n.textContent)return n===t}return!1}},{key:"spacingNodeByXPath",value:function(e,t){for(var r=document.evaluate(e,t,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),a=void 0,n=void 0,i=r.snapshotLength-1;i>-1;--i)if(a=r.snapshotItem(i),this.canIgnoreNode(a))n=a;else{var o=this.spacing(a.data);if(a.data!==o&&(a.data=o),n){if(a.nextSibling&&a.nextSibling.nodeName.search(this.spaceLikeTags)>=0){n=a;continue}var s=a.data.toString().substr(-1)+n.data.toString().substr(0,1),l=this.spacing(s);if(l!==s){for(var c=n;c.parentNode&&-1===c.nodeName.search(this.spaceSensitiveTags)&&this.isFirstTextChild(c.parentNode,c);)c=c.parentNode;for(var u=a;u.parentNode&&-1===u.nodeName.search(this.spaceSensitiveTags)&&this.isLastTextChild(u.parentNode,u);)u=u.parentNode;if(u.nextSibling&&u.nextSibling.nodeName.search(this.spaceLikeTags)>=0){n=a;continue}if(-1===u.nodeName.search(this.blockTags))if(-1===c.nodeName.search(this.spaceSensitiveTags))-1===c.nodeName.search(this.ignoreTags)&&-1===c.nodeName.search(this.blockTags)&&(n.previousSibling?-1===n.previousSibling.nodeName.search(this.spaceLikeTags)&&(n.data=" "+n.data):this.canIgnoreNode(n)||(n.data=" "+n.data));else if(-1===u.nodeName.search(this.spaceSensitiveTags))a.data=a.data+" ";else{var d=document.createElement("pangu");d.innerHTML=" ",c.previousSibling?-1===c.previousSibling.nodeName.search(this.spaceLikeTags)&&c.parentNode.insertBefore(d,c):c.parentNode.insertBefore(d,c),d.previousElementSibling||d.parentNode&&d.parentNode.removeChild(d)}}}n=a}}},{key:"spacingNode",value:function(e){this.spacingNodeByXPath(".//*/text()[normalize-space(.)]",e)}},{key:"spacingElementById",value:function(e){var t='id("'+e+'")//text()';this.spacingNodeByXPath(t,document)}},{key:"spacingElementByClassName",value:function(e){var t='//*[contains(concat(" ", normalize-space(@class), " "), "'+e+'")]//text()';this.spacingNodeByXPath(t,document)}},{key:"spacingElementByTagName",value:function(e){var t="//"+e+"//text()";this.spacingNodeByXPath(t,document)}},{key:"spacingPageTitle",value:function(){this.spacingNodeByXPath("/html/head/title/text()",document)}},{key:"spacingPageBody",value:function(){for(var e="/html/body//*/text()[normalize-space(.)]",t=["script","style","textarea"],r=0;r])([A-Za-z0-9])/g,d=/([A-Za-z0-9])([\+\-\*\/=&\\|<>])([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/g,h=/([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([\(\[\{<\u201c]+(.*?)[\)\]\}>\u201d]+)([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/g,f=/([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([\(\[\{<\u201c>])/g,p=/([\)\]\}>\u201d<])([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/g,g=/([\(\[\{<\u201c]+)(\s*)(.+?)(\s*)([\)\]\}>\u201d]+)/,m=/([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([~!;:,\.\?\u2026])([A-Za-z0-9])/g,_=/([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([A-Za-z0-9`\$%\^&\*\-=\+\\\|\/@\u00a1-\u00ff\u2022\u2027\u2150-\u218f])/g,b=/([A-Za-z0-9`~\$%\^&\*\-=\+\\\|\/!;:,\.\?\u00a1-\u00ff\u2022\u2026\u2027\u2150-\u218f])([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/g,v=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"spacing",value:function(e){var t=e,r=t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(a,"$1 $2")).replace(n,"$1 $2")).replace(i,"$1$3$5")).replace(o,"$1$3$4")).replace(s,"$1 $2$3$4 $5")).replace(l,"$1 $2")).replace(c,"$1 $3")).replace(u,"$1 $2 $3")).replace(d,"$1 $2 $3"),v=t.replace(h,"$1 $2 $4");return t=v,r===v&&(t=(t=t.replace(f,"$1 $2")).replace(p,"$1 $2")),t=(t=(t=(t=t.replace(g,"$1$3$5")).replace(m,"$1$2 $3")).replace(_,"$1 $2")).replace(b,"$1 $2")}},{key:"spacingText",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1];try{var r=this.spacing(e);t(null,r)}catch(e){t(e)}}}]),e}(),w=new v;(e.exports=w).Pangu=v}])});n.pangu;function i(e,t){for(var r=0,a=e.length-1;a>=0;a--){var n=e[a];"."===n?e.splice(a,1):".."===n?(e.splice(a,1),r++):r&&(e.splice(a,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return o.exec(e).slice(1)};function l(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var a=r>=0?arguments[r]:"/";if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,t="/"===a.charAt(0))}return e=i(_(e.split("/"),function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}function c(e){var t=u(e),r="/"===b(e,-1);return(e=i(_(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function u(e){return"/"===e.charAt(0)}function d(){return c(_(Array.prototype.slice.call(arguments,0),function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))}function h(e,t){function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=l(e).substr(1),t=l(t).substr(1);for(var a=r(e.split("/")),n=r(t.split("/")),i=Math.min(a.length,n.length),o=i,s=0;s=0&&c>0){for(a=[],i=r.length;u>=0&&!s;)u==l?(a.push(u),l=r.indexOf(e,u+1)):1==a.length?s=[a.pop(),c]:((n=a.pop())=0?l:c;a.length&&(s=[i,o])}return s}E.range=x;var N=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,r){var a=[];var n=k("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var s=i||o;var l=n.body.indexOf(",")>=0;if(!s&&!l)return n.post.match(/,.*\}/)?(t=n.pre+"{"+n.body+C+n.post,e(t)):[t];var c;if(s)c=n.body.split(/\.\./);else if(1===(c=function e(t){if(!t)return[""];var r=[];var a=k("{","}",t);if(!a)return t.split(",");var n=a.pre;var i=a.body;var o=a.post;var s=n.split(",");s[s.length-1]+="{"+i+"}";var l=e(o);o.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l));r.push.apply(r,s);return r}(n.body)).length&&1===(c=e(c[0],!1).map(M)).length){var u=n.post.length?e(n.post,!1):[""];return u.map(function(e){return n.pre+c[0]+e})}var d=n.pre;var u=n.post.length?e(n.post,!1):[""];var h;if(s){var f=j(c[0]),p=j(c[1]),g=Math.max(c[0].length,c[1].length),m=3==c.length?Math.abs(j(c[2])):1,_=I,b=p0){var x=new Array(T+1).join("0");E=y<0?"-"+x+E.slice(1):x+E}}h.push(E)}}else h=w(c,function(t){return e(t,!1)});for(var N=0;N=t}var R=v&&m||v,H=Y;Y.Minimatch=Q;var D={sep:"/"};try{D=R}catch(e){}var G=Y.GLOBSTAR=Q.GLOBSTAR={},U={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},q="[^/]",F=q+"*?",V="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",W="(?:(?!(?:\\/|^)\\.).)*?",X="().*{}+?[]^$\\!".split("").reduce(function(e,t){return e[t]=!0,e},{});var Z=/\/+/;function K(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function Y(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new Q(t,r).match(e))}function Q(e,t){if(!(this instanceof Q))return new Q(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==D.sep&&(e=e.split(D.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function J(e,t){if(t||(t=this instanceof Q?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:N(e)}Y.filter=function(e,t){return t=t||{},function(r,a,n){return Y(r,e,t)}},Y.defaults=function(e){if(!e||!Object.keys(e).length)return Y;var t=Y,r=function(r,a,n){return t.minimatch(r,a,K(e,n))};return r.Minimatch=function(r,a){return new t.Minimatch(r,K(e,a))},r},Q.defaults=function(e){return e&&Object.keys(e).length?Y.defaults(e).Minimatch:Q},Q.prototype.debug=function(){},Q.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(Z)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r},Q.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=0;if(this.options.nonegate)return;for(var a=0,n=e.length;a65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return G;if(""===e)return"";var a,n="",i=!!r.nocase,o=!1,s=[],l=[],c=!1,u=-1,d=-1,h="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=this;function p(){if(a){switch(a){case"*":n+=F,i=!0;break;case"?":n+=q,i=!0;break;default:n+="\\"+a}f.debug("clearStateChar %j %j",a,n),a=!1}}for(var g,m=0,_=e.length;m<_&&(g=e.charAt(m));m++)if(this.debug("%s\t%s %s %j",e,m,n,g),o&&X[g])n+="\\"+g,o=!1;else switch(g){case"/":return!1;case"\\":p(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,m,n,g),c){this.debug(" in class"),"!"===g&&m===d+1&&(g="^"),n+=g;continue}f.debug("call clearStateChar %j",a),p(),a=g,r.noext&&p();continue;case"(":if(c){n+="(";continue}if(!a){n+="\\(";continue}s.push({type:a,start:m-1,reStart:n.length,open:U[a].open,close:U[a].close}),n+="!"===a?"(?:(?!(?:":"(?:",this.debug("plType %j %j",a,n),a=!1;continue;case")":if(c||!s.length){n+="\\)";continue}p(),i=!0;var b=s.pop();n+=b.close,"!"===b.type&&l.push(b),b.reEnd=n.length;continue;case"|":if(c||!s.length||o){n+="\\|",o=!1;continue}p(),n+="|";continue;case"[":if(p(),c){n+="\\"+g;continue}c=!0,d=m,u=n.length,n+=g;continue;case"]":if(m===d+1||!c){n+="\\"+g,o=!1;continue}if(c)var v,w=e.substring(d+1,m);i=!0,c=!1,n+=g;continue;default:p(),o?o=!1:!X[g]||"^"===g&&c||(n+="\\"),n+=g}c&&(w=e.substr(d+1),v=this.parse(w,ee),n=n.substr(0,u)+"\\["+v[0],i=i||v[1]);for(b=s.pop();b;b=s.pop()){var y=n.slice(b.reStart+b.open.length);this.debug("setting tail",n,b),y=y.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",y,y,b,n);var k="*"===b.type?F:"?"===b.type?q:"\\"+b.type;i=!0,n=n.slice(0,b.reStart)+k+"\\("+y}p(),o&&(n+="\\\\");var E=!1;switch(n.charAt(0)){case".":case"[":case"(":E=!0}for(var T=l.length-1;T>-1;T--){var x=l[T],N=n.slice(0,x.reStart),A=n.slice(x.reStart,x.reEnd-8),S=n.slice(x.reEnd-8,x.reEnd),C=n.slice(x.reEnd);S+=C;var P=N.split("(").length-1,L=C;for(m=0;m=0&&!(a=e[n]);n--);for(n=0;n>> no match, partial?",e,d,t,h),d!==o))}if("string"==typeof c?(l=a.nocase?u.toLowerCase()===c.toLowerCase():u===c,this.debug("string match",c,u,l)):(l=u.match(c),this.debug("pattern match",c,u,l)),!l)return!1}if(n===o&&i===s)return!0;if(n===o)return r;if(i===s)return n===o-1&&""===e[n];throw new Error("wtf?")};var te=Object.freeze({specbeautify:function(e,t){switch(e){case"sspai.com":t.find(".relation-apps").remove(),t.find(".ss-app-card").remove();break;case"post.smzdm.com":t.find("img.face").addClass("sr-rd-content-nobeautify"),t.find(".insert-outer img").addClass("sr-rd-content-nobeautify");break;case"infoq.com":t.find("img").map(function(e,t){"left"==$(t).css("float")&&$(t).addClass("sr-rd-content-nobeautify")}),t.find("script").remove();break;case"appinn.com":case"hacpai.com":t.find(".emoji").addClass("sr-rd-content-nobeautify");break;case"douban.com":t.find(".review-content").children().unwrap(),t.find("table").addClass("sr-rd-content-center"),t.find("p").css({"white-space":"pre-wrap"}),t.find(".cc").removeClass();break;case"qdaily.com":t.find("img").map(function(e,t){var r=$(t);0==Number.parseInt(r.css("height"))&&r.remove()}),t.find(".com-insert-images").map(function(e,t){var r=$(t),a=r.find("img").map(function(e,t){return""+t.outerHTML+"
"}).get().join("");r.empty().removeAttr("class").append(a)}),t.find(".com-insert-embed").remove();break;case"news.mtime.com":t.find(".newspictool").map(function(e,t){var r=$(t),a=r.find("img"),n=r.find("p:last");r.removeAttr("class").addClass("sr-rd-content-center").empty().append(a).append(n)});break;case"blog.csdn.net":t.find(".save_code").remove(),t.find(".pre-numbering").remove(),t.find("pre").removeAttr("style").removeAttr("class"),t.find("code").removeAttr("style"),t.find(".dp-highlighter").map(function(e,t){$(t).find(".bar .tools").remove(),$(t).next().is("pre")&&$(t).next().remove()});break;case"news.sohu.com":t.find(".conserve-photo").remove(),t.find("table").addClass("sr-rd-content-center");break;case"qq.com":t.find(".rv-root-v2, #backqqcom").remove();break;case"azofreeware.com":t.find("iframe").remove();break;case"apprcn.com":t.find("img").map(function(e,t){var r=$(t),a=r.attr("src");a&&a.includes("Apprcn_Wechat_Small.jpeg")&&r.parent().remove()}),t.find("a").map(function(e,t){var r=$(t);"来自反斗软件"==r.text()&&r.parent().remove()});break;case"tieba.baidu.com":t.find(".BDE_Smiley").addClass("sr-rd-content-nobeautify"),t.find(".replace_div").removeAttr("class").removeAttr("style"),t.find(".replace_tip").remove(),t.find(".d_post_content, .j_d_post_content, .post_bubble_top, .post_bubble_middle, .post_bubble_bottom").map(function(e,t){$(t).removeAttr("class").removeAttr("style")}),$("body").find(".p_author_face").map(function(e,t){var r=$(t).find("img"),a=r.attr("data-tb-lazyload"),n=r.attr("username");a&&$("sr-rd-mult-avatar").find("span").map(function(e,t){var r=$(t);r.text()==n&&r.parent().find("img").attr("src",a)})});break;case"jingyan.baidu.com":t.find(".exp-image-wraper").removeAttr("class").removeAttr("href");break;case"question.zhihu.com":t.find(".zu-edit-button").remove(),t.find("a.external").map(function(e,t){$(t).removeAttr("class").attr("style","border: none;")}),t.find(".VagueImage").map(function(e,t){var r=$(t),a=r.attr("data-src");r.replaceWith(' ')});break;case"chiphell.com":t.find("img").map(function(e,t){var r=$(t),a=r.parent(),n=r.attr("src"),i=r.attr("smilieid");a.is("ignore_js_op")&&r.unwrap(),i&&n&&n.includes("static/image/smiley")&&r.addClass("sr-rd-content-nobeautify").attr("style","width: 50px;")}),t.find(".quote").remove();break;case"jiemian.com":t.find("script").remove();break;case"36kr.com":t.find(".load-html-img").removeAttr("class");break;case"cnblogs.com":t.find(".cnblogs_code").removeClass(),t.find(".cnblogs_code_hide").removeClass().removeAttr("style"),t.find(".cnblogs_code_toolbar").remove(),t.find(".code_img_opened").remove(),t.find(".code_img_closed").remove();break;case"news.cnblogs.com":t.find(".topic_img").remove();break;case"g-cores.com":t.find(".swiper-slide-active").find("img").map(function(e,t){var r=$(t);r.parent().parent().parent().parent().parent().parent().removeAttr("class").removeAttr("style").html(r)});break;case"feng.com":case"young.ifeng.com":t.find("span").removeAttr("style");break;case"ftchinese.com":t.find("script").remove();break;case"segmentfault.com":t.find(".widget-codetool").remove();break;case"mp.weixin.qq.com":t.find('section[powered-by="xiumi.us"]').find("img").map(function(e,t){var r=$(t),a=r.attr("data-src");r.addClass("sr-rd-content-nobeautify").attr("src",a)});break;case"ruby-china.org":t.find(".twemoji").remove();break;case"w3cplus.com":t.find("iframe").addClass("sr-rd-content-nobeautify");break;case"zuojj.com":t.find(".syntaxhighlighter .Brush").attr("style","font-size: .7em !important;");break;case"aotu.io":t.find(".highlight table").map(function(e,t){var r=$(t),a=r.find("pre"),n=r.find("table");r.html(a[1]),n.unwrap()}),t.find("table").addClass("sr-rd-content-center");break;case"colobu.com":t.find(".highlight table").map(function(e,t){var r=$(t),a=r.find("pre");r.html(a[1]),r.unwrap()});break;case"hao.caibaojian.com":t.find(".tlink").map(function(e,t){$(t).html(" ")});break;case"wkee.net":t.find("script").remove();break;case"linux.cn":t.find("pre").attr("style","background-color: #161b20; background-image: none;"),t.find("code").attr("style","background-color: transparent; background-image: none;");break;case"zhuanlan.zhihu.com":t.find("div[data-src]").map(function(e,t){var r=$(t),a=r.attr("data-src");r.replaceWith(' ')});break;case"jianshu.com":t.find(".image-package").map(function(e,t){var r=$(t),a=r.find("img");r.html(a)});break;case"medium.com":t.find("figure").map(function(e,t){var r=$(t),a=r.find("img");r.replaceWith(' ')});break;case"worldcup.fifa.com":t.find("iframe").css({width:"790px",height:"450px"}),t.find("div").removeClass()}},removeSpareTag:function(e,t){var r=!1,a="";["lib.csdn.net","huxiu.com","my.oschina.net","caixin.com","163.com","steachs.com","hacpai.com","apprcn.com","mp.weixin.qq.com"].includes(e)?(r=!0,a="p"):["nationalgeographic.com.cn","dgtle.com","news.mtime.com"].includes(e)?(r=!0,a="div"):["chiphell.com"].includes(e)&&(r=!0,a="font"),r&&t.find(a).map(function(e,t){var r=$(t).text().toLowerCase().trim();0==$(t).find("img").length&&""==r&&$(t).remove()})},htmlbeautify:function(e){try{e.html(function(e,t){return t.trim().replace(/<\/?blockquote/g,function(e){return"/"==e[1]?"\n? (\n? )*/g," ").replace(/\/(div|p)>\n*( \n)+/g,function(e){return e.replace(" ","")})})}catch(t){return e.html()}},commbeautify:function(e,t){t.find("img:not(.sr-rd-content-nobeautify)").map(function(e,t){var r=$(t),a=(r.parent(),$(" ")),n=r.attr("src"),i=r.attr("data-src"),o=r.attr("data-original"),s=r.attr("original"),l=r.attr("data-original-src"),c=r.attr("real_src"),u=function(){a.removeClass("sr-rd-content-img-load"),a[0].clientWidth<300&&a[0].clientHeight<300?a.parent().removeClass("sr-rd-content-center").addClass("sr-rd-content-center-small"):a[0].clientWidth>1e3?a.css("zoom","0.6"):a[0].clientHeight>620&&/win|mac/i.test(navigator.platform)&&(a.attr("height",620),a[0].clientWidth<$("sr-rd-content").width()&&a.css({width:"auto"})),a[0].clientWidth>$("sr-rd-content").width()&&a.addClass("sr-rd-content-img")},d=function(){a.addClass("simpread-hidden"),a.parent().hasClass("sr-rd-content-center")&&a.parent().removeAttr("class").addClass("simpread-hidden")},h=void 0;r.parent()[0].tagName.toLowerCase(),h=s||n,h=i||h,h=o||h,h=l||h,!(h=c||h)||h.startsWith("http")||h.startsWith("data")||(h=function e(t,r){if("string"!=typeof t||!t)return null;if(t.match(/^[a-z]+\:\/\//i))return t;if(t.match(/^\/\//))return"http:"+t;if(t.match(/^[a-z]+\:/i))return t;var a;if("string"!=typeof r)return(a=document.createElement("a")).href=t,a.pathname?"http://"+t:null;if(null===(r=e(r)))return null;(a=document.createElement("a")).href=r,"/"===t[0]?r=[]:(r=a.pathname.split("/")).pop(),t=t.split("/");for(var n=0;n"),/win|mac/i.test(navigator.platform)?a.one("load",function(){return u()}).one("error",function(){return d()}):a.on("load",function(){return u()}).on("error",function(){return d()})}),t.find("sr-blockquote").map(function(t,r){var a=$(r),n=a.parent();a.removeAttr("style").removeAttr("class"),"dgtle.com"==e&&n.removeClass("quote")}),t.find("iframe:not(.sr-rd-content-nobeautify), embed:not(.sr-rd-content-nobeautify)").map(function(e,t){$(t).wrap("
")}),t.find("hr").map(function(e,t){$(t).addClass("simpread-hidden")}),t.find("pre").map(function(e,t){$(t).find("code").removeAttr("class")}),t.find("pre").removeAttr("class"),t.find("a").removeAttr("style")},cleanHTML:function(e,t,r){t&&e.find("pre").each(function(e,t){var r="",a=!1,n=!1;$(t).find("li").each(function(e,t){$(t).find("code").length>0&&(a=!0),""!=t.outerText.trim()&&(r+=t.outerText.replace(/\n/gi,"").replace(//gi,">")+"\n")}),0==a&&$(t).find("code").each(function(e,t){n=!0,""!=t.outerText.trim()&&(r+=t.outerText.replace(//gi,">")+"\n")}),a||n||(r+=t.outerText.replace(//gi,">")+"\n"),$(t).removeAttr("style").removeAttr("class").removeAttr("id").html(r)});var a,n,i=e.html();"readability-page-1"==$(e.children()).attr("id")&&1==e.children().children().length?i=e.children().children().html():1==e.children().length&&(i=e.children().html()),i=i.replace(//gi,""),e.html((a=i,n="",$.parseHTML(a).forEach(function(e,a){var i=e.tagName,o=e.outerText,s=e.outerHTML;void 0==i?n+=""+e.textContent.replace(/^\n|\n$/gi,"").trim()+"
":"PRE"==i?n+=s:(""!=o||s.includes(" 0?t.join("").replace(/, $/,""):null}function oe(e,t){var r=Object.keys(t).map(function(e){return t[e]&&e.replace(/[A-Z]/,function(e){return"-"+e.toLowerCase()})+": "+t[e]+";"}).join("");switch(e){case"title":r="sr-rd-title {"+r+"}";break;case"desc":r="sr-rd-desc {"+r+"}";break;case"art":r="sr-rd-content *, sr-rd-content p, sr-rd-content div {"+r+"}";break;case"pre":r="sr-rd-content pre {"+r+"}";break;case"code":r="sr-rd-content pre code, sr-rd-content pre code * {"+r+"}"}var a=$("head").find("style#simpread-custom-"+e);0==a.length?$("head").append('"):a.html(r)}function se(e,t){var r=$("head").find("style#simpread-custom-"+e);0==r.length?$("head").append('"):r.html(t)}var le=Object.freeze({GetColor:ie,BgColor:function(e,t){var r="rgba("+ie(e)+", "+t/100+")";return $(ae).css(re,r),r},Opacity:function(e){var t=ie($(ae).css(re)),r="rgba("+t+", "+e/100+")";return t?($(ae).css(re,r),r):null},FontFamily:function(e){$("sr-read").css("font-family","default"==e?"":e)},FontSize:function(e){"-1"==ne&&void 0==(ne=$("html").attr("style"))&&(ne=""),e?$("html").attr("style","font-size: "+e+"!important;"+ne):$("html").attr("style",ne)},Layout:function(e){$("sr-read").css("margin",e?"20px "+e:"")},SiteCSS:function(e){e?$("head").append('"):$("#simpread-site-css").remove()},Preview:function(e){Object.keys(e).forEach(function(t){"css"!=t&&oe(t,e[t])}),se("css",e.css)},Custom:oe,CSS:se,VerifyCustom:function(e,t){switch(e){case"layout":case"margin":case"fontfamily":case"custom":return""!=t.css;case"fontsize":return""!=t.title.fontSize||""!=t.desc.fontSize||""!=t.art.fontSize||""!=t.css;case"theme":return-1!=t.css.search("simpread-theme-root")}}});function ce(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");var r;t=t||{},this._doc=e,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._wrap=null,this._debug=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug?(r=function(e){var t=e.nodeName+" ";if(e.nodeType==e.TEXT_NODE)return t+'("'+e.textContent+'")';var r=e.className&&"."+e.className.replace(/ /g,"."),a="";return e.id?a="(#"+e.id+r+")":r&&(a="("+r+")"),t+a},this.log=function(){if("undefined"!=typeof dump){var e=Array.prototype.map.call(arguments,function(e){return e&&e.nodeName?r(e):e}).join(" ");dump("Reader: (Readability) "+e+"\n")}else if("undefined"!=typeof console)["Reader: (Readability) "].concat(arguments)}):this.log=function(){}}ce.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|foot|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,whitespace:/^\s*$/,hasContent:/\S$/},DIV_TO_P_ELEMS:["A","BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL","SELECT"],ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],_postProcessContent:function(e){this._fixRelativeUris(e),this._cleanClasses(e)},_removeNodes:function(e,t){for(var r=e.length-1;r>=0;r--){var a=e[r],n=a.parentNode;n&&(t&&!t.call(this,a,r,e)||n.removeChild(a))}},_replaceNodeTags:function(e,t){for(var r=e.length-1;r>=0;r--){var a=e[r];this._setNodeTag(a,t)}},_forEachNode:function(e,t){Array.prototype.forEach.call(e,t,this)},_someNode:function(e,t){return Array.prototype.some.call(e,t,this)},_everyNode:function(e,t){return Array.prototype.every.call(e,t,this)},_concatNodeLists:function(){var e=Array.prototype.slice,t=e.call(arguments).map(function(t){return e.call(t)});return Array.prototype.concat.apply([],t)},_getAllNodesWithTag:function(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(t){var r=e.getElementsByTagName(t);return Array.isArray(r)?r:Array.from(r)}))},_cleanClasses:function(e){var t=this._classesToPreserve,r=(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return-1!=t.indexOf(e)}).join(" ");for(r?e.setAttribute("class",r):e.removeAttribute("class"),e=e.firstElementChild;e;e=e.nextElementSibling)this._cleanClasses(e)},_fixRelativeUris:function(e){var t=this._doc.baseURI,r=this._doc.documentURI;function a(e){if(t==r&&"#"==e.charAt(0))return e;try{return new URL(e,t).href}catch(e){}return e}var n=this._getAllNodesWithTag(e,["a"]);this._forEachNode(n,function(e){var t=e.getAttribute("href");if(t)if(0===t.indexOf("javascript:")){var r=this._doc.createTextNode(e.textContent);e.parentNode.replaceChild(r,e)}else e.setAttribute("href",a(t))});var i=this._getAllNodesWithTag(e,["img"]);this._forEachNode(i,function(e){var t=e.getAttribute("src");t&&e.setAttribute("src",a(t))})},_getArticleTitle:function(){var e=this._doc,t="",r="";try{"string"!=typeof(t=r=e.title.trim())&&(t=r=this._getInnerText(e.getElementsByTagName("title")[0]))}catch(e){}var a=!1;function n(e){return e.split(/\s+/).length}if(/ [\|\-\\\/>»] /.test(t))a=/ [\\\/>»] /.test(t),n(t=r.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"))<3&&(t=r.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(-1!==t.indexOf(": ")){var i=this._concatNodeLists(e.getElementsByTagName("h1"),e.getElementsByTagName("h2")),o=t.trim();this._someNode(i,function(e){return e.textContent.trim()===o})||(n(t=r.substring(r.lastIndexOf(":")+1))<3?t=r.substring(r.indexOf(":")+1):n(r.substr(0,r.indexOf(":")))>5&&(t=r))}else if(t.length>150||t.length<15){var s=e.getElementsByTagName("h1");1===s.length&&(t=this._getInnerText(s[0]))}var l=n(t=t.trim().replace(this.REGEXPS.normalize," "));return l<=4&&(!a||l!=n(r.replace(/[\|\-\\\/>»]+/g,""))-1)&&(t=r),t},_prepDocument:function(){var e=this._doc;this._removeNodes(e.getElementsByTagName("style")),e.body&&this._replaceBrs(e.body),this._replaceNodeTags(e.getElementsByTagName("font"),"SPAN")},_nextElement:function(e){for(var t=e;t&&t.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(t.textContent);)t=t.nextSibling;return t},_replaceBrs:function(e){this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){for(var t=e.nextSibling,r=!1;(t=this._nextElement(t))&&"BR"==t.tagName;){r=!0;var a=t.nextSibling;t.parentNode.removeChild(t),t=a}if(r){var n=this._doc.createElement("p");for(e.parentNode.replaceChild(n,e),t=n.nextSibling;t;){if("BR"==t.tagName){var i=this._nextElement(t.nextSibling);if(i&&"BR"==i.tagName)break}if(!this._isPhrasingContent(t))break;var o=t.nextSibling;n.appendChild(t),t=o}for(;n.lastChild&&this._isWhitespace(n.lastChild);)n.removeChild(n.lastChild);"P"===n.parentNode.tagName&&this._setNodeTag(n.parentNode,"DIV")}})},_setNodeTag:function(e,t){if(this.log("_setNodeTag",e,t),e.__JSDOMParser__)return e.localName=t.toLowerCase(),e.tagName=t.toUpperCase(),e;for(var r=e.ownerDocument.createElement(t);e.firstChild;)r.appendChild(e.firstChild);e.parentNode.replaceChild(r,e),e.readability&&(r.readability=e.readability);for(var a=0;a0?r[0].textContent.includes(this._articleTitle):this._articleTitle.includes(r[0].textContent))&&this._clean(e,"h2")}}this._clean(e,"iframe"),this._clean(e,"input"),this._clean(e,"textarea"),this._clean(e,"select"),this._clean(e,"button"),this._cleanHeaders(e),this._cleanConditionally(e,"table"),this._cleanConditionally(e,"ul"),this._cleanConditionally(e,"div"),this._removeNodes(e.getElementsByTagName("p"),function(e){return 0===e.getElementsByTagName("img").length+e.getElementsByTagName("embed").length+e.getElementsByTagName("object").length+e.getElementsByTagName("iframe").length&&!this._getInnerText(e,!1)}),this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){var t=this._nextElement(e.nextSibling);t&&"P"==t.tagName&&e.parentNode.removeChild(e)}),this._forEachNode(this._getAllNodesWithTag(e,["table"]),function(e){var t=this._hasSingleTagInsideElement(e,"TBODY")?e.firstElementChild:e;if(this._hasSingleTagInsideElement(t,"TR")){var r=t.firstElementChild;if(this._hasSingleTagInsideElement(r,"TD")){var a=r.firstElementChild;a=this._setNodeTag(a,this._everyNode(a.childNodes,this._isPhrasingContent)?"P":"DIV"),e.parentNode.replaceChild(a,e)}}})},_initializeNode:function(e){switch(e.readability={contentScore:0},e.tagName){case"DIV":e.readability.contentScore+=5;break;case"PRE":case"TD":case"BLOCKQUOTE":e.readability.contentScore+=3;break;case"ADDRESS":case"OL":case"UL":case"DL":case"DD":case"DT":case"LI":case"FORM":e.readability.contentScore-=3;break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"TH":e.readability.contentScore-=5}e.readability.contentScore+=this._getClassWeight(e)},_removeAndGetNext:function(e){var t=this._getNextNode(e,!0);return e.parentNode.removeChild(e),t},_getNextNode:function(e,t){if(!t&&e.firstElementChild)return e.firstElementChild;if(e.nextElementSibling)return e.nextElementSibling;do{e=e.parentNode}while(e&&!e.nextElementSibling);return e&&e.nextElementSibling},_checkByline:function(e,t){if(this._articleByline)return!1;if(void 0!==e.getAttribute)var r=e.getAttribute("rel"),a=e.getAttribute("itemprop");return!(!("author"===r||a&&-1!==a.indexOf("author")||this.REGEXPS.byline.test(t))||!this._isValidByline(e.textContent))&&(this._articleByline=e.textContent.trim(),!0)},_getNodeAncestors:function(e,t){t=t||0;for(var r=0,a=[];e.parentNode&&(a.push(e.parentNode),!t||++r!==t);)e=e.parentNode;return a},_grabArticle:function(e){this.log("**** grabArticle ****");var t=this._doc,r=null!==e;if(!(e=e||this._doc.body))return this.log("No body found in document. Abort."),null;for(var a=e.innerHTML;;){for(var n=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),i=[],o=this._doc.documentElement;o;){var s=o.className+" "+o.id;if(this._isProbablyVisible(o))if(this._checkByline(o,s))o=this._removeAndGetNext(o);else if(!n||!this.REGEXPS.unlikelyCandidates.test(s)||this.REGEXPS.okMaybeItsACandidate.test(s)||this._hasAncestorTag(o,"table")||"BODY"===o.tagName||"A"===o.tagName)if("DIV"!==o.tagName&&"SECTION"!==o.tagName&&"HEADER"!==o.tagName&&"H1"!==o.tagName&&"H2"!==o.tagName&&"H3"!==o.tagName&&"H4"!==o.tagName&&"H5"!==o.tagName&&"H6"!==o.tagName||!this._isElementWithoutContent(o)){if(-1!==this.DEFAULT_TAGS_TO_SCORE.indexOf(o.tagName)&&i.push(o),"DIV"===o.tagName){for(var l=null,c=o.firstChild;c;){var u=c.nextSibling;if(this._isPhrasingContent(c))null!==l?l.appendChild(c):this._isWhitespace(c)||(l=t.createElement("p"),o.replaceChild(l,c),l.appendChild(c));else if(null!==l){for(;l.lastChild&&this._isWhitespace(l.lastChild);)l.removeChild(l.lastChild);l=null}c=u}if(this._hasSingleTagInsideElement(o,"P")&&this._getLinkDensity(o)<.25){var d=o.children[0];o.parentNode.replaceChild(d,o),o=d,i.push(o)}else this._hasChildBlockElement(o)||(o=this._setNodeTag(o,"P"),i.push(o))}o=this._getNextNode(o)}else o=this._removeAndGetNext(o);else this.log("Removing unlikely candidate - "+s),o=this._removeAndGetNext(o);else this.log("Removing hidden node - "+s),o=this._removeAndGetNext(o)}var h=[];this._forEachNode(i,function(e){if(e.parentNode&&void 0!==e.parentNode.tagName){var t=this._getInnerText(e);if(!(t.length<25)){var r=this._getNodeAncestors(e,3);if(0!==r.length){var a=0;a+=1,a+=t.split(",").length,a+=Math.min(Math.floor(t.length/100),3),this._forEachNode(r,function(e,t){if(e.tagName&&e.parentNode&&void 0!==e.parentNode.tagName){if(void 0===e.readability&&(this._initializeNode(e),h.push(e)),0===t)var r=1;else r=1===t?2:3*t;e.readability.contentScore+=a/r}})}}}});for(var f=[],p=0,g=h.length;pv.readability.contentScore){f.splice(b,0,m),f.length>this._nbTopCandidates&&f.pop();break}}}var w,y=f[0]||null,k=!1;if(null===y||"BODY"===y.tagName){y=t.createElement("DIV"),k=!0;for(var E=e.childNodes;E.length;)this.log("Moving child out:",E[0]),y.appendChild(E[0]);e.appendChild(y),this._initializeNode(y)}else if(y){for(var T=[],x=1;x=.75&&T.push(this._getNodeAncestors(f[x]));if(T.length>=3)for(w=y.parentNode;"BODY"!==w.tagName;){for(var N=0,A=0;A=3){y=w;break}w=w.parentNode}y.readability||this._initializeNode(y),w=y.parentNode;for(var S=y.readability.contentScore,C=S/3;"BODY"!==w.tagName;)if(w.readability){var P=w.readability.contentScore;if(PS){y=w;break}S=w.readability.contentScore,w=w.parentNode}else w=w.parentNode;for(w=y.parentNode;"BODY"!=w.tagName&&1==w.children.length;)w=(y=w).parentNode;y.readability||this._initializeNode(y)}var L=t.createElement("DIV");r&&(L.id="readability-content");for(var j=Math.max(10,.2*y.readability.contentScore),z=(w=y.parentNode).children,M=0,$=z.length;M<$;M++){var B=z[M],I=!1;if(this.log("Looking at sibling node:",B,B.readability?"with score "+B.readability.contentScore:""),this.log("Sibling has score",B.readability?B.readability.contentScore:"Unknown"),B===y)I=!0;else{var O=0;if(B.className===y.className&&""!==y.className&&(O+=.2*y.readability.contentScore),B.readability&&B.readability.contentScore+O>=j)I=!0;else if("P"===B.nodeName){var R=this._getLinkDensity(B),H=this._getInnerText(B),D=H.length;D>80&&R<.25?I=!0:D<80&&D>0&&0===R&&-1!==H.search(/\.( |$)/)&&(I=!0)}}I&&(this.log("Appending node:",B),-1===this.ALTER_TO_DIV_EXCEPTIONS.indexOf(B.nodeName)&&(this.log("Altering sibling:",B,"to div."),B=this._setNodeTag(B,"DIV")),L.appendChild(B),M-=1,$-=1)}if(this._debug&&this.log("Article content pre-prep: "+L.innerHTML),this._prepArticle(L),this._debug&&this.log("Article content post-prep: "+L.innerHTML),k)y.id="readability-page-1",y.className="page";else{var G=t.createElement("DIV");G.id="readability-page-1",G.className="page";var U=L.childNodes;for(this._wrap=L.childNodes[0].outerHTML.replace(L.childNodes[0].innerHTML,"");U.length;)G.appendChild(U[0]);L.appendChild(G)}this._debug&&this.log("Article content after paging: "+L.innerHTML);var q=!0,F=this._getInnerText(L,!0).length;if(F0&&e.length<100)},_getArticleMetadata:function(){var e={},t={},r=this._doc.getElementsByTagName("meta"),a=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,n=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(r,function(e){var r=e.getAttribute("name"),i=e.getAttribute("property"),o=e.getAttribute("content");if(o){var s=null,l=null;if(i&&(s=i.match(a)))for(var c=s.length-1;c>=0;c--)l=s[c].toLowerCase().replace(/\s/g,""),t[l]=o.trim();!s&&r&&n.test(r)&&(l=r,o&&(l=l.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),t[l]=o.trim()))}}),e.title=t["dc:title"]||t["dcterm:title"]||t["og:title"]||t["weibo:article:title"]||t["weibo:webpage:title"]||t.title||t["twitter:title"],e.title||(e.title=this._getArticleTitle()),e.byline=t["dc:creator"]||t["dcterm:creator"]||t.author,e.excerpt=t["dc:description"]||t["dcterm:description"]||t["og:description"]||t["weibo:article:description"]||t["weibo:webpage:description"]||t.description||t["twitter:description"],e.siteName=t["og:site_name"],e},_removeScripts:function(e){this._removeNodes(e.getElementsByTagName("script"),function(e){return e.nodeValue="",e.removeAttribute("src"),!0}),this._removeNodes(e.getElementsByTagName("noscript"))},_hasSingleTagInsideElement:function(e,t){return 1==e.children.length&&e.children[0].tagName===t&&!this._someNode(e.childNodes,function(e){return e.nodeType===this.TEXT_NODE&&this.REGEXPS.hasContent.test(e.textContent)})},_isElementWithoutContent:function(e){return e.nodeType===this.ELEMENT_NODE&&0==e.textContent.trim().length&&(0==e.children.length||e.children.length==e.getElementsByTagName("br").length+e.getElementsByTagName("hr").length)},_hasChildBlockElement:function(e){return this._someNode(e.childNodes,function(e){return-1!==this.DIV_TO_P_ELEMS.indexOf(e.tagName)||this._hasChildBlockElement(e)})},_isPhrasingContent:function(e){return e.nodeType===this.TEXT_NODE||-1!==this.PHRASING_ELEMS.indexOf(e.tagName)||("A"===e.tagName||"DEL"===e.tagName||"INS"===e.tagName)&&this._everyNode(e.childNodes,this._isPhrasingContent)},_isWhitespace:function(e){return e.nodeType===this.TEXT_NODE&&0===e.textContent.trim().length||e.nodeType===this.ELEMENT_NODE&&"BR"===e.tagName},_getInnerText:function(e,t){t=void 0===t||t;var r=e.textContent.trim();return t?r.replace(this.REGEXPS.normalize," "):r},_getCharCount:function(e,t){return t=t||",",this._getInnerText(e).split(t).length-1},_cleanStyles:function(e){if(e&&"svg"!==e.tagName.toLowerCase()){for(var t=0;t0&&n>r)return!1;if(e.parentNode.tagName===t&&(!a||a(e.parentNode)))return!0;e=e.parentNode,n++}return!1},_getRowAndColumnCount:function(e){for(var t=0,r=0,a=e.getElementsByTagName("tr"),n=0;n0)a._readabilityDataTable=!0;else{if(["col","colgroup","tfoot","thead","th"].some(function(e){return!!a.getElementsByTagName(e)[0]}))this.log("Data table because found data-y descendant"),a._readabilityDataTable=!0;else if(a.getElementsByTagName("table")[0])a._readabilityDataTable=!1;else{var i=this._getRowAndColumnCount(a);i.rows>=10||i.columns>4?a._readabilityDataTable=!0:a._readabilityDataTable=i.rows*i.columns>10}}}else a._readabilityDataTable=!1;else a._readabilityDataTable=!1}},_cleanConditionally:function(e,t){if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)){var r="ul"===t||"ol"===t;this._removeNodes(e.getElementsByTagName(t),function(e){var a=function(e){return e._readabilityDataTable};if("table"===t&&a(e))return!1;if(this._hasAncestorTag(e,"table",-1,a))return!1;var n=this._getClassWeight(e);if(this.log("Cleaning Conditionally",e),n+0<0)return!0;if(this._getCharCount(e,",")<10){for(var i=e.getElementsByTagName("p").length,o=e.getElementsByTagName("img").length,s=e.getElementsByTagName("li").length-100,l=e.getElementsByTagName("input").length,c=0,u=this._concatNodeLists(e.getElementsByTagName("object"),e.getElementsByTagName("embed"),e.getElementsByTagName("iframe")),d=0;d1&&i/o<.5&&!this._hasAncestorTag(e,"figure")||!r&&s>i||l>Math.floor(i/3)||!r&&p<25&&(0===o||o>2)&&!this._hasAncestorTag(e,"figure")||!r&&n<25&&f>.2||n>=25&&f>.5||1===c&&p<75||c>1}return!1})}},_cleanMatchedNodes:function(e,t){for(var r=this._getNextNode(e,!0),a=this._getNextNode(e);a&&a!=r;)a=t(a,a.className+" "+a.id)?this._removeAndGetNext(a):this._getNextNode(a)},_cleanHeaders:function(e){for(var t=1;t<3;t+=1)this._removeNodes(e.getElementsByTagName("h"+t),function(e){return this._getClassWeight(e)<0})},_flagIsActive:function(e){return(this._flags&e)>0},_removeFlag:function(e){this._flags=this._flags&~e},_isProbablyVisible:function(e){return!(e.style&&"none"==e.style.display||e.hasAttribute("hidden"))},parse:function(){if(this._maxElemsToParse>0){var e=this._doc.getElementsByTagName("*").length;if(e>this._maxElemsToParse)throw new Error("Aborting parsing document; "+e+" elements found")}this._removeScripts(this._doc),this._prepDocument();var t=this._getArticleMetadata();this._articleTitle=t.title;var r=this._grabArticle();if(!r)return null;if(this.log("Grabbed: "+r.innerHTML),this._postProcessContent(r),!t.excerpt){var a=r.getElementsByTagName("p");a.length>0&&(t.excerpt=a[0].textContent.trim())}var n=r.textContent;return{title:this._articleTitle,byline:t.byline||this._articleByline,dir:this._articleDir,content:r.innerHTML,wrap:this._wrap,textContent:n,length:n.length,excerpt:t.excerpt,siteName:t.siteName||this._articleSiteName}}};var ue=Object.freeze({Readability:ce}),de=r(function(e){(function(){function t(e){var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a].defaultValue);return r}function r(e,t){var r=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};i.helper.isArray(e)||(e=[e]);for(var o=0;o").replace(/&/g,"&")};var d=function(e,t,r,a){var n,i,o,s,l,c=a||"",u=c.indexOf("g")>-1,d=new RegExp(t+"|"+r,"g"+c.replace(/g/g,"")),h=new RegExp(t,c.replace(/g/g,"")),f=[];do{for(n=0;o=d.exec(e);)if(h.test(o[0]))n++||(s=(i=d.lastIndex)-o[0].length);else if(n&&!--n){l=o.index+o[0].length;var p={left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:l},wholeMatch:{start:s,end:l}};if(f.push(p),!u)return f}}while(n&&(d.lastIndex=i));return f};i.helper.matchRecursiveRegExp=function(e,t,r,a){for(var n=d(e,t,r,a),i=[],o=0;o0){var u=[];0!==s[0].wholeMatch.start&&u.push(e.slice(0,s[0].wholeMatch.start));for(var h=0;h=0?a+(r||0):a},i.helper.splitAtIndex=function(e,t){if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},i.helper.encodeEmailAddress=function(e){var t=[function(e){return""+e.charCodeAt(0)+";"},function(e){return""+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e.replace(/./g,function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var r=Math.random();e=r>.9?t[2](e):r>.45?t[1](e):t[0](e)}return e})},i.helper.padEnd=function(e,t,r){return t>>=0,r=String(r||" "),e.length>t?String(e):((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),String(e)+r.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){alert(e)},log:function(e){alert(e)},error:function(e){throw e}}),i.helper.regexes={asteriskDashAndColon:/([*_:~])/g},i.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨❤️👨",couple_with_heart_woman_woman:"👩❤️👩",couplekiss_man_man:"👨❤️💋👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩❤️💋👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨👦",family_man_boy_boy:"👨👦👦",family_man_girl:"👨👧",family_man_girl_boy:"👨👧👦",family_man_girl_girl:"👨👧👧",family_man_man_boy:"👨👨👦",family_man_man_boy_boy:"👨👨👦👦",family_man_man_girl:"👨👨👧",family_man_man_girl_boy:"👨👨👧👦",family_man_man_girl_girl:"👨👨👧👧",family_man_woman_boy_boy:"👨👩👦👦",family_man_woman_girl:"👨👩👧",family_man_woman_girl_boy:"👨👩👧👦",family_man_woman_girl_girl:"👨👩👧👧",family_woman_boy:"👩👦",family_woman_boy_boy:"👩👦👦",family_woman_girl:"👩👧",family_woman_girl_boy:"👩👧👦",family_woman_girl_girl:"👩👧👧",family_woman_woman_boy:"👩👩👦",family_woman_woman_boy_boy:"👩👩👦👦",family_woman_woman_girl:"👩👩👧",family_woman_woman_girl_boy:"👩👩👧👦",family_woman_woman_girl_girl:"👩👩👧👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨🎨",man_astronaut:"👨🚀",man_cartwheeling:"🤸♂️",man_cook:"👨🍳",man_dancing:"🕺",man_facepalming:"🤦♂️",man_factory_worker:"👨🏭",man_farmer:"👨🌾",man_firefighter:"👨🚒",man_health_worker:"👨⚕️",man_in_tuxedo:"🤵",man_judge:"👨⚖️",man_juggling:"🤹♂️",man_mechanic:"👨🔧",man_office_worker:"👨💼",man_pilot:"👨✈️",man_playing_handball:"🤾♂️",man_playing_water_polo:"🤽♂️",man_scientist:"👨🔬",man_shrugging:"🤷♂️",man_singer:"👨🎤",man_student:"👨🎓",man_teacher:"👨🏫",man_technologist:"👨💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩🎨",woman_astronaut:"👩🚀",woman_cartwheeling:"🤸♀️",woman_cook:"👩🍳",woman_facepalming:"🤦♀️",woman_factory_worker:"👩🏭",woman_farmer:"👩🌾",woman_firefighter:"👩🚒",woman_health_worker:"👩⚕️",woman_judge:"👩⚖️",woman_juggling:"🤹♀️",woman_mechanic:"👩🔧",woman_office_worker:"👩💼",woman_pilot:"👩✈️",woman_playing_handball:"🤾♀️",woman_playing_water_polo:"🤽♀️",woman_scientist:"👩🔬",woman_shrugging:"🤷♀️",woman_singer:"👩🎤",woman_student:"👩🎓",woman_teacher:"👩🏫",woman_technologist:"👩💻",woman_with_turban:"👳♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:' ',showdown:"S "},i.Converter=function(e){function t(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return void function(e,t){"function"==typeof e&&(e=e(new i.Converter)),i.helper.isArray(e)||(e=[e]);var a=r(e,t);if(!a.valid)throw Error(a.error);for(var n=0;n [ \t]+,">¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var a={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],a=0;a'}else r.push(t[a].innerHTML),t[a].innerHTML="",t[a].setAttribute("prenum",a.toString());return r}(r)};!function e(t){for(var r=0;r? ?(['"].*['"])?\)$/m)>-1)o="";else if(!o){if(n||(n=a.toLowerCase().replace(/ ?\n/g," ")),o="#"+n,i.helper.isUndefined(r.gUrls[n]))return e;o=r.gUrls[n],i.helper.isUndefined(r.gTitles[n])||(c=r.gTitles[n])}var u='"+a+" "};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,a)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,a)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,a)).replace(/\[([^\[\]]+)]()()()()()/g,a),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,r,a,n,o){if("\\"===a)return r+n;if(!i.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,o),l="";return t.openLinksInNewWindow&&(l=' target="¨E95Eblank"'),r+'"+n+" "})),r.converter._dispatch("anchors.after",e,t,r)});var h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,p=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,g=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,m=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,_=function(e){return function(t,r,a,n,o,s,l){var c=a=a.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback),u="",d="",h=r||"",f=l||"";return/^www\./i.test(a)&&(a=a.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' target="¨E95Eblank"'),h+'"+c+" "+u+f}},b=function(e,t){return function(r,a,n){var o="mailto:";return a=a||"",n=i.subParser("unescapeSpecialChars")(n,e,t),e.encodeEmails?(o=i.helper.encodeEmailAddress(o+n),n=i.helper.encodeEmailAddress(n)):o+=n,a+''+n+" "}};i.subParser("autoLinks",function(e,t,r){return e=(e=(e=r.converter._dispatch("autoLinks.before",e,t,r)).replace(p,_(t))).replace(m,b(t,r)),r.converter._dispatch("autoLinks.after",e,t,r)}),i.subParser("simplifiedAutoLinks",function(e,t,r){return t.simplifiedAutoLink?(e=r.converter._dispatch("simplifiedAutoLinks.before",e,t,r),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(f,_(t)):e.replace(h,_(t))).replace(g,b(t,r)),e=r.converter._dispatch("simplifiedAutoLinks.after",e,t,r)):e}),i.subParser("blockGamut",function(e,t,r){return e=r.converter._dispatch("blockGamut.before",e,t,r),e=i.subParser("blockQuotes")(e,t,r),e=i.subParser("headers")(e,t,r),e=i.subParser("horizontalRule")(e,t,r),e=i.subParser("lists")(e,t,r),e=i.subParser("codeBlocks")(e,t,r),e=i.subParser("tables")(e,t,r),e=i.subParser("hashHTMLBlocks")(e,t,r),e=i.subParser("paragraphs")(e,t,r),r.converter._dispatch("blockGamut.after",e,t,r)}),i.subParser("blockQuotes",function(e,t,r){e=r.converter._dispatch("blockQuotes.before",e,t,r),e+="\n\n";var a=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(a=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(a,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=i.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=i.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*[^\r]+?<\/pre>)/gm,function(e,t){var r=t;return(r=r.replace(/^ /gm,"¨0")).replace(/¨0/g,"")}),i.subParser("hashBlock")("\n"+e+"\n ",t,r)}),r.converter._dispatch("blockQuotes.after",e,t,r)}),i.subParser("codeBlocks",function(e,t,r){return e=r.converter._dispatch("codeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,a,n){var o=a,s=n,l="\n";return o=i.subParser("outdent")(o,t,r),o=i.subParser("encodeCode")(o,t,r),o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(l=""),o=""+o+l+"
",i.subParser("hashBlock")(o,t,r)+s})).replace(/¨0/,""),r.converter._dispatch("codeBlocks.after",e,t,r)}),i.subParser("codeSpans",function(e,t,r){return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,a,n,o){var s=o;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=a+""+(s=i.subParser("encodeCode")(s,t,r))+"
",i.subParser("hashHTMLSpans")(s,t,r)}),r.converter._dispatch("codeSpans.after",e,t,r)}),i.subParser("completeHTMLDocument",function(e,t,r){if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var a="html",n="\n",i="",o=' \n',s="",l="";for(var c in void 0!==r.metadata.parsed.doctype&&(n="\n","html"!==(a=r.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==a||(o=' ')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":i=""+r.metadata.parsed.title+" \n";break;case"charset":o="html"===a||"html5"===a?' \n':' \n';break;case"language":case"lang":s=' lang="'+r.metadata.parsed[c]+'"',l+=' \n';break;default:l+=' \n'}return e=n+"\n\n"+i+o+l+"\n\n"+e.trim()+"\n\n",r.converter._dispatch("completeHTMLDocument.after",e,t,r)}),i.subParser("detab",function(e,t,r){return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,function(e,t){for(var r=t,a=4-r.length%4,n=0;n/g,">"),r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)}),i.subParser("encodeBackslashEscapes",function(e,t,r){return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,i.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,i.helper.escapeCharactersCallback),r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)}),i.subParser("encodeCode",function(e,t,r){return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(/ /g,">").replace(/([*_{}\[\]\\=~-])/g,i.helper.escapeCharactersCallback),r.converter._dispatch("encodeCode.after",e,t,r)}),i.subParser("escapeSpecialCharsWithinTagAttributes",function(e,t,r){return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)}),r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)}),i.subParser("githubCodeBlocks",function(e,t,r){return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,a,n,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=i.subParser("encodeCode")(o,t,r),o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),o=""+o+s+"
",o=i.subParser("hashBlock")(o,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"})).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e}),i.subParser("hashBlock",function(e,t,r){return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",r.converter._dispatch("hashBlock.after",e,t,r)}),i.subParser("hashCodeTags",function(e,t,r){return e=r.converter._dispatch("hashCodeTags.before",e,t,r),e=i.helper.replaceRecursiveRegExp(e,function(e,a,n,o){var s=n+i.subParser("encodeCode")(a,t,r)+o;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"},"]*>","
","gim"),r.converter._dispatch("hashCodeTags.after",e,t,r)}),i.subParser("hashElement",function(e,t,r){return function(e,t){var a=t;return a=(a=(a=a.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),"\n\n¨K"+(r.gHtmlBlocks.push(a)-1)+"K\n\n"}}),i.subParser("hashHTMLBlocks",function(e,t,r){e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var a=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],n=function(e,t,a,n){var i=e;return-1!==a.search(/\bmarkdown\b/)&&(i=a+r.converter.makeHtml(t)+n),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"<"+t+">"}));for(var o=0;o]*>)","im"),c="<"+a[o]+"\\b[^>]*>",u=""+a[o]+">";-1!==(s=i.helper.regexIndexOf(e,l));){var d=i.helper.splitAtIndex(e,s),h=i.helper.replaceRecursiveRegExp(d[1],n,c,u,"im");if(h===d[1])break;e=d[0].concat(h)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=(e=i.helper.replaceRecursiveRegExp(e,function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),r.converter._dispatch("hashHTMLBlocks.after",e,t,r)}),i.subParser("hashHTMLSpans",function(e,t,r){function a(e){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,function(e){return a(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return a(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return a(e)})).replace(/<[^>]+?>/gi,function(e){return a(e)}),r.converter._dispatch("hashHTMLSpans.after",e,t,r)}),i.subParser("unhashHTMLSpans",function(e,t,r){e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var a=0;a]*>\\s*]*>","^ {0,3}
\\s*","gim"),r.converter._dispatch("hashPreCodeTags.after",e,t,r)}),i.subParser("headers",function(e,t,r){function a(e){var a,n;if(t.customizedHeaderId){var o=e.match(/\{([^{]+?)}\s*$/);o&&o[1]&&(e=o[1])}return a=e,n=i.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(a=n+a),a=t.ghCompatibleHeaderId?a.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?a.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():a.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(a=n+a),r.hashLinkCounts[a]?a=a+"-"+r.hashLinkCounts[a]++:r.hashLinkCounts[a]=1,a}e=r.converter._dispatch("headers.before",e,t,r);var n=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),o=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,s=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(o,function(e,o){var s=i.subParser("spanGamut")(o,t,r),l=t.noHeaderId?"":' id="'+a(o)+'"',c=""+s+" ";return i.subParser("hashBlock")(c,t,r)})).replace(s,function(e,o){var s=i.subParser("spanGamut")(o,t,r),l=t.noHeaderId?"":' id="'+a(o)+'"',c=n+1,u=""+s+" ";return i.subParser("hashBlock")(u,t,r)});var l=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;return e=e.replace(l,function(e,o,s){var l=s;t.customizedHeaderId&&(l=s.replace(/\s?\{([^{]+?)}\s*$/,""));var c=i.subParser("spanGamut")(l,t,r),u=t.noHeaderId?"":' id="'+a(s)+'"',d=n-1+o.length,h=""+c+" ";return i.subParser("hashBlock")(h,t,r)}),r.converter._dispatch("headers.after",e,t,r)}),i.subParser("horizontalRule",function(e,t,r){e=r.converter._dispatch("horizontalRule.before",e,t,r);var a=i.subParser("hashBlock")(" ",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,a),r.converter._dispatch("horizontalRule.after",e,t,r)}),i.subParser("images",function(e,t,r){function a(e,t,a,n,o,s,l,c){var u=r.gUrls,d=r.gTitles,h=r.gDimensions;if(a=a.toLowerCase(),c||(c=""),e.search(/\(\s*>? ?(['"].*['"])?\)$/m)>-1)n="";else if(""===n||null===n){if(""!==a&&null!==a||(a=t.toLowerCase().replace(/ ?\n/g," ")),n="#"+a,i.helper.isUndefined(u[a]))return e;n=u[a],i.helper.isUndefined(d[a])||(c=d[a]),i.helper.isUndefined(h[a])||(o=h[a].width,s=h[a].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var f=' "}return e=(e=(e=(e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,a)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(e,t,r,n,i,o,s,l){return a(e,t,r,n=n.replace(/\s/g,""),i,o,0,l)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,a)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,a)).replace(/!\[([^\[\]]+)]()()()()()/g,a),r.converter._dispatch("images.after",e,t,r)}),i.subParser("italicsAndBold",function(e,t,r){function a(e,t,r){return t+e+r}return e=r.converter._dispatch("italicsAndBold.before",e,t,r),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return a(t,""," ")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return a(t,""," ")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,t){return a(t,""," ")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e}),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,t,r){return a(r,t+""," ")})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,t,r){return a(r,t+""," ")})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,t,r){return a(r,t+""," ")}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e}),r.converter._dispatch("italicsAndBold.after",e,t,r)}),i.subParser("lists",function(e,t,r){function a(e,a){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var n=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(n=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(n,function(e,a,n,s,l,c,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(l,t,r),h="";return c&&t.tasklists&&(h=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e=' "})),d=d.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(e){return"¨A"+e}),a||d.search(/\n{2,}/)>-1?(d=i.subParser("githubCodeBlocks")(d,t,r),d=i.subParser("blockGamut")(d,t,r)):(d=(d=i.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=o?i.subParser("paragraphs")(d,t,r):i.subParser("spanGamut")(d,t,r)),""+(d=d.replace("¨A",""))+" \n"})).replace(/¨0/g,""),r.gListLevel--,a&&(e=e.replace(/\s+$/,"")),e}function n(e,t){if("ol"===t){var r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function o(e,r,i){var o=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===r?o:s,c="";if(-1!==e.search(l))!function t(u){var d=u.search(l),h=n(e,r);-1!==d?(c+="\n\n<"+r+h+">\n"+a(u.slice(0,d),!!i)+""+r+">\n",l="ul"==(r="ul"===r?"ol":"ul")?o:s,t(u.slice(d))):c+="\n\n<"+r+h+">\n"+a(u,!!i)+""+r+">\n"}(e);else{var u=n(e,r);c="\n\n<"+r+u+">\n"+a(e,!!i)+""+r+">\n"}return c}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r){return o(t,r.search(/[*+-]/g)>-1?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r,a){return o(r,a.search(/[*+-]/g)>-1?"ul":"ol",!1)})).replace(/¨0/,""),r.converter._dispatch("lists.after",e,t,r)}),i.subParser("metadata",function(e,t,r){function a(e){r.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,t,a){return r.metadata.parsed[t]=a,""})}return t.metadata?(e=(e=(e=(e=r.converter._dispatch("metadata.before",e,t,r)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(e,t,r){return a(r),"¨M"})).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,t,n){return t&&(r.metadata.format=t),a(n),"¨M"})).replace(/¨M/g,""),e=r.converter._dispatch("metadata.after",e,t,r)):e}),i.subParser("outdent",function(e,t,r){return e=(e=(e=r.converter._dispatch("outdent.before",e,t,r)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),r.converter._dispatch("outdent.after",e,t,r)}),i.subParser("paragraphs",function(e,t,r){for(var a=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),n=[],o=a.length,s=0;s=0?n.push(l):l.search(/\S/)>=0&&(l=(l=i.subParser("spanGamut")(l,t,r)).replace(/^([ \t]*)/g,""),l+="
",n.push(l))}for(o=n.length,s=0;s]*>\s*]*>/.test(u)&&(d=!0)}n[s]=u}return e=(e=(e=n.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)}),i.subParser("runExtension",function(e,t,r,a){if(e.filter)t=e.filter(t,a.converter,r);else if(e.regex){var n=e.regex;n instanceof RegExp||(n=new RegExp(n,"g")),t=t.replace(n,e.replace)}return t}),i.subParser("spanGamut",function(e,t,r){return e=r.converter._dispatch("spanGamut.before",e,t,r),e=i.subParser("codeSpans")(e,t,r),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=i.subParser("encodeBackslashEscapes")(e,t,r),e=i.subParser("images")(e,t,r),e=i.subParser("anchors")(e,t,r),e=i.subParser("autoLinks")(e,t,r),e=i.subParser("simplifiedAutoLinks")(e,t,r),e=i.subParser("emoji")(e,t,r),e=i.subParser("underline")(e,t,r),e=i.subParser("italicsAndBold")(e,t,r),e=i.subParser("strikethrough")(e,t,r),e=i.subParser("ellipsis")(e,t,r),e=i.subParser("hashHTMLSpans")(e,t,r),e=i.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g," \n")):e=e.replace(/ +\n/g," \n"),r.converter._dispatch("spanGamut.after",e,t,r)}),i.subParser("strikethrough",function(e,t,r){return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,a){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(a)}),e=r.converter._dispatch("strikethrough.after",e,t,r)),e}),i.subParser("stripLinkDefinitions",function(e,t,r){var a=function(e,a,n,o,s,l,c){return a=a.toLowerCase(),n.match(/^data:.+?\/.+?;base64,/)?r.gUrls[a]=n.replace(/\s/g,""):r.gUrls[a]=i.subParser("encodeAmpsAndAngles")(n,t,r),l?l+c:(c&&(r.gTitles[a]=c.replace(/"|'/g,""")),t.parseImgDimensions&&o&&s&&(r.gDimensions[a]={width:o,height:s}),"")};return(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,a)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,a)).replace(/¨0/,"")}),i.subParser("tables",function(e,t,r){function a(e){return/^:[ \t]*--*$/.test(e)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(e)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(e)?' style="text-align:center;"':""}function n(e,a){var n="";return e=e.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(n=' id="'+e.replace(/ /g,"_").toLowerCase()+'"'),""+(e=i.subParser("spanGamut")(e,t,r))+" \n"}function o(e,a){return""+i.subParser("spanGamut")(e,t,r)+" \n"}function s(e){var s,l=e.split("\n");for(s=0;s\n\n\n",n=0;n\n";for(var i=0;i\n"}return r+" \n\n"}(h,p)}return t.tables?(e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,i.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,s)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,s),r.converter._dispatch("tables.after",e,t,r)):e}),i.subParser("underline",function(e,t,r){return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return""+t+" "})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return""+t+" "}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?""+t+" ":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?""+t+" ":e})).replace(/(_)/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e}),i.subParser("unescapeSpecialChars",function(e,t,r){return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,function(e,t){var r=parseInt(t);return String.fromCharCode(r)}),r.converter._dispatch("unescapeSpecialChars.after",e,t,r)}),i.subParser("makeMarkdown.blockquote",function(e,t){var r="";if(e.hasChildNodes())for(var a=e.childNodes,n=a.length,o=0;o "+(r=r.trim()).split("\n").join("\n> ")}),i.subParser("makeMarkdown.codeBlock",function(e,t){var r=e.getAttribute("language"),a=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[a]+"\n```"}),i.subParser("makeMarkdown.codeSpan",function(e){return"`"+e.innerHTML+"`"}),i.subParser("makeMarkdown.emphasis",function(e,t){var r="";if(e.hasChildNodes()){r+="*";for(var a=e.childNodes,n=a.length,o=0;o",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),i.subParser("makeMarkdown.links",function(e,t){var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var a=e.childNodes,n=a.length;r="[";for(var o=0;o",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r}),i.subParser("makeMarkdown.list",function(e,t,r){var a="";if(!e.hasChildNodes())return"";for(var n=e.childNodes,o=n.length,s=e.getAttribute("start")||1,l=0;l"+t.preList[r]+""}),i.subParser("makeMarkdown.strikethrough",function(e,t){var r="";if(e.hasChildNodes()){r+="~~";for(var a=e.childNodes,n=a.length,o=0;otr>th"),l=e.querySelectorAll("tbody>tr");for(r=0;rp&&(p=g)}for(r=0;r/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}),e.exports?e.exports=i:this.showdown=i}).call(t)}),he={pangu:n,minimatch:H,beautify:te,style:le,rdability:ue,markdown:Object.freeze({default:de,__moduleExports:de})};e.Plugin=function(e){return void 0==e?he:he[e]},Object.defineProperty(e,"__esModule",{value:!0})});
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.puplugin={})}(this,function(e){"use strict";var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t){return e(t={exports:{}},t.exports),t.exports}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=r(function(e,t){e.exports=function(e){function t(a){if(r[a])return r[a].exports;var n=r[a]={exports:{},id:a,loaded:!1};return e[a].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){var n=function(){function e(e,t){for(var r=0;r=0||t.isContentEditable||"true"===t.getAttribute("g_editable"))return!0;t=t.parentNode}return!1}},{key:"isFirstTextChild",value:function(e,t){for(var r=e.childNodes,a=0;a-1;a--){var n=r[a];if(8!==n.nodeType&&n.textContent)return n===t}return!1}},{key:"spacingNodeByXPath",value:function(e,t){for(var r=document.evaluate(e,t,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),a=void 0,n=void 0,i=r.snapshotLength-1;i>-1;--i)if(a=r.snapshotItem(i),this.canIgnoreNode(a))n=a;else{var o=this.spacing(a.data);if(a.data!==o&&(a.data=o),n){if(a.nextSibling&&a.nextSibling.nodeName.search(this.spaceLikeTags)>=0){n=a;continue}var s=a.data.toString().substr(-1)+n.data.toString().substr(0,1),l=this.spacing(s);if(l!==s){for(var c=n;c.parentNode&&-1===c.nodeName.search(this.spaceSensitiveTags)&&this.isFirstTextChild(c.parentNode,c);)c=c.parentNode;for(var u=a;u.parentNode&&-1===u.nodeName.search(this.spaceSensitiveTags)&&this.isLastTextChild(u.parentNode,u);)u=u.parentNode;if(u.nextSibling&&u.nextSibling.nodeName.search(this.spaceLikeTags)>=0){n=a;continue}if(-1===u.nodeName.search(this.blockTags))if(-1===c.nodeName.search(this.spaceSensitiveTags))-1===c.nodeName.search(this.ignoreTags)&&-1===c.nodeName.search(this.blockTags)&&(n.previousSibling?-1===n.previousSibling.nodeName.search(this.spaceLikeTags)&&(n.data=" "+n.data):this.canIgnoreNode(n)||(n.data=" "+n.data));else if(-1===u.nodeName.search(this.spaceSensitiveTags))a.data=a.data+" ";else{var d=document.createElement("pangu");d.innerHTML=" ",c.previousSibling?-1===c.previousSibling.nodeName.search(this.spaceLikeTags)&&c.parentNode.insertBefore(d,c):c.parentNode.insertBefore(d,c),d.previousElementSibling||d.parentNode&&d.parentNode.removeChild(d)}}}n=a}}},{key:"spacingNode",value:function(e){this.spacingNodeByXPath(".//*/text()[normalize-space(.)]",e)}},{key:"spacingElementById",value:function(e){var t='id("'+e+'")//text()';this.spacingNodeByXPath(t,document)}},{key:"spacingElementByClassName",value:function(e){var t='//*[contains(concat(" ", normalize-space(@class), " "), "'+e+'")]//text()';this.spacingNodeByXPath(t,document)}},{key:"spacingElementByTagName",value:function(e){var t="//"+e+"//text()";this.spacingNodeByXPath(t,document)}},{key:"spacingPageTitle",value:function(){this.spacingNodeByXPath("/html/head/title/text()",document)}},{key:"spacingPageBody",value:function(){for(var e="/html/body//*/text()[normalize-space(.)]",t=["script","style","textarea"],r=0;r])([A-Za-z0-9])/g,d=/([A-Za-z0-9])([\+\-\*\/=&\\|<>])([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/g,h=/([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([\(\[\{<\u201c]+(.*?)[\)\]\}>\u201d]+)([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/g,f=/([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([\(\[\{<\u201c>])/g,p=/([\)\]\}>\u201d<])([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/g,g=/([\(\[\{<\u201c]+)(\s*)(.+?)(\s*)([\)\]\}>\u201d]+)/,m=/([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([~!;:,\.\?\u2026])([A-Za-z0-9])/g,_=/([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([A-Za-z0-9`\$%\^&\*\-=\+\\\|\/@\u00a1-\u00ff\u2022\u2027\u2150-\u218f])/g,b=/([A-Za-z0-9`~\$%\^&\*\-=\+\\\|\/!;:,\.\?\u00a1-\u00ff\u2022\u2026\u2027\u2150-\u218f])([\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/g,v=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"spacing",value:function(e){var t=e,r=t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(a,"$1 $2")).replace(n,"$1 $2")).replace(i,"$1$3$5")).replace(o,"$1$3$4")).replace(s,"$1 $2$3$4 $5")).replace(l,"$1 $2")).replace(c,"$1 $3")).replace(u,"$1 $2 $3")).replace(d,"$1 $2 $3"),v=t.replace(h,"$1 $2 $4");return t=v,r===v&&(t=(t=t.replace(f,"$1 $2")).replace(p,"$1 $2")),t=(t=(t=(t=t.replace(g,"$1$3$5")).replace(m,"$1$2 $3")).replace(_,"$1 $2")).replace(b,"$1 $2")}},{key:"spacingText",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1];try{var r=this.spacing(e);t(null,r)}catch(e){t(e)}}}]),e}(),w=new v;(e.exports=w).Pangu=v}])});n.pangu;function i(e,t){for(var r=0,a=e.length-1;a>=0;a--){var n=e[a];"."===n?e.splice(a,1):".."===n?(e.splice(a,1),r++):r&&(e.splice(a,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return o.exec(e).slice(1)};function l(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var a=r>=0?arguments[r]:"/";if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,t="/"===a.charAt(0))}return e=i(_(e.split("/"),function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}function c(e){var t=u(e),r="/"===b(e,-1);return(e=i(_(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function u(e){return"/"===e.charAt(0)}function d(){return c(_(Array.prototype.slice.call(arguments,0),function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))}function h(e,t){function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=l(e).substr(1),t=l(t).substr(1);for(var a=r(e.split("/")),n=r(t.split("/")),i=Math.min(a.length,n.length),o=i,s=0;s=0&&c>0){for(a=[],i=r.length;u>=0&&!s;)u==l?(a.push(u),l=r.indexOf(e,u+1)):1==a.length?s=[a.pop(),c]:((n=a.pop())=0?l:c;a.length&&(s=[i,o])}return s}E.range=x;var N=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,r){var a=[];var n=k("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var s=i||o;var l=n.body.indexOf(",")>=0;if(!s&&!l)return n.post.match(/,.*\}/)?(t=n.pre+"{"+n.body+C+n.post,e(t)):[t];var c;if(s)c=n.body.split(/\.\./);else if(1===(c=function e(t){if(!t)return[""];var r=[];var a=k("{","}",t);if(!a)return t.split(",");var n=a.pre;var i=a.body;var o=a.post;var s=n.split(",");s[s.length-1]+="{"+i+"}";var l=e(o);o.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l));r.push.apply(r,s);return r}(n.body)).length&&1===(c=e(c[0],!1).map(M)).length){var u=n.post.length?e(n.post,!1):[""];return u.map(function(e){return n.pre+c[0]+e})}var d=n.pre;var u=n.post.length?e(n.post,!1):[""];var h;if(s){var f=j(c[0]),p=j(c[1]),g=Math.max(c[0].length,c[1].length),m=3==c.length?Math.abs(j(c[2])):1,_=I,b=p0){var x=new Array(T+1).join("0");E=y<0?"-"+x+E.slice(1):x+E}}h.push(E)}}else h=w(c,function(t){return e(t,!1)});for(var N=0;N=t}var R=v&&m||v,H=Y;Y.Minimatch=Q;var D={sep:"/"};try{D=R}catch(e){}var G=Y.GLOBSTAR=Q.GLOBSTAR={},U={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},q="[^/]",F=q+"*?",V="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",W="(?:(?!(?:\\/|^)\\.).)*?",X="().*{}+?[]^$\\!".split("").reduce(function(e,t){return e[t]=!0,e},{});var Z=/\/+/;function K(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function Y(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new Q(t,r).match(e))}function Q(e,t){if(!(this instanceof Q))return new Q(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==D.sep&&(e=e.split(D.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function J(e,t){if(t||(t=this instanceof Q?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:N(e)}Y.filter=function(e,t){return t=t||{},function(r,a,n){return Y(r,e,t)}},Y.defaults=function(e){if(!e||!Object.keys(e).length)return Y;var t=Y,r=function(r,a,n){return t.minimatch(r,a,K(e,n))};return r.Minimatch=function(r,a){return new t.Minimatch(r,K(e,a))},r},Q.defaults=function(e){return e&&Object.keys(e).length?Y.defaults(e).Minimatch:Q},Q.prototype.debug=function(){},Q.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(Z)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r},Q.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=0;if(this.options.nonegate)return;for(var a=0,n=e.length;a65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return G;if(""===e)return"";var a,n="",i=!!r.nocase,o=!1,s=[],l=[],c=!1,u=-1,d=-1,h="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",f=this;function p(){if(a){switch(a){case"*":n+=F,i=!0;break;case"?":n+=q,i=!0;break;default:n+="\\"+a}f.debug("clearStateChar %j %j",a,n),a=!1}}for(var g,m=0,_=e.length;m<_&&(g=e.charAt(m));m++)if(this.debug("%s\t%s %s %j",e,m,n,g),o&&X[g])n+="\\"+g,o=!1;else switch(g){case"/":return!1;case"\\":p(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,m,n,g),c){this.debug(" in class"),"!"===g&&m===d+1&&(g="^"),n+=g;continue}f.debug("call clearStateChar %j",a),p(),a=g,r.noext&&p();continue;case"(":if(c){n+="(";continue}if(!a){n+="\\(";continue}s.push({type:a,start:m-1,reStart:n.length,open:U[a].open,close:U[a].close}),n+="!"===a?"(?:(?!(?:":"(?:",this.debug("plType %j %j",a,n),a=!1;continue;case")":if(c||!s.length){n+="\\)";continue}p(),i=!0;var b=s.pop();n+=b.close,"!"===b.type&&l.push(b),b.reEnd=n.length;continue;case"|":if(c||!s.length||o){n+="\\|",o=!1;continue}p(),n+="|";continue;case"[":if(p(),c){n+="\\"+g;continue}c=!0,d=m,u=n.length,n+=g;continue;case"]":if(m===d+1||!c){n+="\\"+g,o=!1;continue}if(c)var v,w=e.substring(d+1,m);i=!0,c=!1,n+=g;continue;default:p(),o?o=!1:!X[g]||"^"===g&&c||(n+="\\"),n+=g}c&&(w=e.substr(d+1),v=this.parse(w,ee),n=n.substr(0,u)+"\\["+v[0],i=i||v[1]);for(b=s.pop();b;b=s.pop()){var y=n.slice(b.reStart+b.open.length);this.debug("setting tail",n,b),y=y.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",y,y,b,n);var k="*"===b.type?F:"?"===b.type?q:"\\"+b.type;i=!0,n=n.slice(0,b.reStart)+k+"\\("+y}p(),o&&(n+="\\\\");var E=!1;switch(n.charAt(0)){case".":case"[":case"(":E=!0}for(var T=l.length-1;T>-1;T--){var x=l[T],N=n.slice(0,x.reStart),A=n.slice(x.reStart,x.reEnd-8),S=n.slice(x.reEnd-8,x.reEnd),C=n.slice(x.reEnd);S+=C;var P=N.split("(").length-1,L=C;for(m=0;m=0&&!(a=e[n]);n--);for(n=0;n>> no match, partial?",e,d,t,h),d!==o))}if("string"==typeof c?(l=a.nocase?u.toLowerCase()===c.toLowerCase():u===c,this.debug("string match",c,u,l)):(l=u.match(c),this.debug("pattern match",c,u,l)),!l)return!1}if(n===o&&i===s)return!0;if(n===o)return r;if(i===s)return n===o-1&&""===e[n];throw new Error("wtf?")};var te=Object.freeze({specbeautify:function(e,t){switch(e){case"sspai.com":t.find(".relation-apps").remove(),t.find(".ss-app-card").remove();break;case"post.smzdm.com":t.find("img.face").addClass("sr-rd-content-nobeautify"),t.find(".insert-outer img").addClass("sr-rd-content-nobeautify");break;case"infoq.com":t.find("img").map(function(e,t){"left"==$(t).css("float")&&$(t).addClass("sr-rd-content-nobeautify")}),t.find("script").remove();break;case"appinn.com":case"hacpai.com":t.find(".emoji").addClass("sr-rd-content-nobeautify");break;case"douban.com":t.find(".review-content").children().unwrap(),t.find("table").addClass("sr-rd-content-center"),t.find("p").css({"white-space":"pre-wrap"}),t.find(".cc").removeClass();break;case"qdaily.com":t.find("img").map(function(e,t){var r=$(t);0==Number.parseInt(r.css("height"))&&r.remove()}),t.find(".com-insert-images").map(function(e,t){var r=$(t),a=r.find("img").map(function(e,t){return""+t.outerHTML+"
"}).get().join("");r.empty().removeAttr("class").append(a)}),t.find(".com-insert-embed").remove();break;case"news.mtime.com":t.find(".newspictool").map(function(e,t){var r=$(t),a=r.find("img"),n=r.find("p:last");r.removeAttr("class").addClass("sr-rd-content-center").empty().append(a).append(n)});break;case"blog.csdn.net":t.find(".save_code").remove(),t.find(".pre-numbering").remove(),t.find("pre").removeAttr("style").removeAttr("class"),t.find("code").removeAttr("style"),t.find(".dp-highlighter").map(function(e,t){$(t).find(".bar .tools").remove(),$(t).next().is("pre")&&$(t).next().remove()});break;case"news.sohu.com":t.find(".conserve-photo").remove(),t.find("table").addClass("sr-rd-content-center");break;case"qq.com":t.find(".rv-root-v2, #backqqcom").remove();break;case"azofreeware.com":t.find("iframe").remove();break;case"apprcn.com":t.find("img").map(function(e,t){var r=$(t),a=r.attr("src");a&&a.includes("Apprcn_Wechat_Small.jpeg")&&r.parent().remove()}),t.find("a").map(function(e,t){var r=$(t);"来自反斗软件"==r.text()&&r.parent().remove()});break;case"tieba.baidu.com":t.find(".BDE_Smiley").addClass("sr-rd-content-nobeautify"),t.find(".replace_div").removeAttr("class").removeAttr("style"),t.find(".replace_tip").remove(),t.find(".d_post_content, .j_d_post_content, .post_bubble_top, .post_bubble_middle, .post_bubble_bottom").map(function(e,t){$(t).removeAttr("class").removeAttr("style")}),$("body").find(".p_author_face").map(function(e,t){var r=$(t).find("img"),a=r.attr("data-tb-lazyload"),n=r.attr("username");a&&$("sr-rd-mult-avatar").find("span").map(function(e,t){var r=$(t);r.text()==n&&r.parent().find("img").attr("src",a)})});break;case"jingyan.baidu.com":t.find(".exp-image-wraper").removeAttr("class").removeAttr("href");break;case"question.zhihu.com":t.find(".zu-edit-button").remove(),t.find("a.external").map(function(e,t){$(t).removeAttr("class").attr("style","border: none;")}),t.find(".VagueImage").map(function(e,t){var r=$(t),a=r.attr("data-src");r.replaceWith(' ')});break;case"chiphell.com":t.find("img").map(function(e,t){var r=$(t),a=r.parent(),n=r.attr("src"),i=r.attr("smilieid");a.is("ignore_js_op")&&r.unwrap(),i&&n&&n.includes("static/image/smiley")&&r.addClass("sr-rd-content-nobeautify").attr("style","width: 50px;")}),t.find(".quote").remove();break;case"jiemian.com":t.find("script").remove();break;case"36kr.com":t.find(".load-html-img").removeAttr("class");break;case"cnblogs.com":t.find(".cnblogs_code").removeClass(),t.find(".cnblogs_code_hide").removeClass().removeAttr("style"),t.find(".cnblogs_code_toolbar").remove(),t.find(".code_img_opened").remove(),t.find(".code_img_closed").remove();break;case"news.cnblogs.com":t.find(".topic_img").remove();break;case"g-cores.com":t.find(".swiper-slide-active").find("img").map(function(e,t){var r=$(t);r.parent().parent().parent().parent().parent().parent().removeAttr("class").removeAttr("style").html(r)});break;case"feng.com":case"young.ifeng.com":t.find("span").removeAttr("style");break;case"ftchinese.com":t.find("script").remove();break;case"segmentfault.com":t.find(".widget-codetool").remove();break;case"mp.weixin.qq.com":t.find('section[powered-by="xiumi.us"]').find("img").map(function(e,t){var r=$(t),a=r.attr("data-src");r.addClass("sr-rd-content-nobeautify").attr("src",a)});break;case"ruby-china.org":t.find(".twemoji").remove();break;case"w3cplus.com":t.find("iframe").addClass("sr-rd-content-nobeautify");break;case"zuojj.com":t.find(".syntaxhighlighter .Brush").attr("style","font-size: .7em !important;");break;case"aotu.io":t.find(".highlight table").map(function(e,t){var r=$(t),a=r.find("pre"),n=r.find("table");r.html(a[1]),n.unwrap()}),t.find("table").addClass("sr-rd-content-center");break;case"colobu.com":t.find(".highlight table").map(function(e,t){var r=$(t),a=r.find("pre");r.html(a[1]),r.unwrap()});break;case"hao.caibaojian.com":t.find(".tlink").map(function(e,t){$(t).html(" ")});break;case"wkee.net":t.find("script").remove();break;case"linux.cn":t.find("pre").attr("style","background-color: #161b20; background-image: none;"),t.find("code").attr("style","background-color: transparent; background-image: none;");break;case"zhuanlan.zhihu.com":t.find("div[data-src]").map(function(e,t){var r=$(t),a=r.attr("data-src");r.replaceWith(' ')}),$("body img").each(function(e,t){var r=$(t),a=r.parent();if("column-gif"==r.attr("class")&&"GifPlayer"==a.attr("class")){var n=a.parent().prev();if(n.is("noscript")){var i=n.html(),o=$(i),s=o.attr("src"),l=o.attr("data-thumbnail");$('sr-read img[src="'+l+'"]').attr("src",s)}}}),setTimeout(function(){t.find("img").each(function(e,t){$(t).attr("src").endsWith(".gif")&&$(t).parent().next().is("svg")&&$(t).parent().next().remove()})},500);break;case"jianshu.com":t.find(".image-package").map(function(e,t){var r=$(t),a=r.find("img");r.html(a)});break;case"medium.com":t.find("figure").map(function(e,t){var r=$(t),a=r.find("img");r.replaceWith(' ')});break;case"worldcup.fifa.com":t.find("iframe").css({width:"790px",height:"450px"}),t.find("div").removeClass()}},removeSpareTag:function(e,t){var r=!1,a="";["lib.csdn.net","huxiu.com","my.oschina.net","caixin.com","163.com","steachs.com","hacpai.com","apprcn.com","mp.weixin.qq.com"].includes(e)?(r=!0,a="p"):["nationalgeographic.com.cn","dgtle.com","news.mtime.com"].includes(e)?(r=!0,a="div"):["chiphell.com"].includes(e)&&(r=!0,a="font"),r&&t.find(a).map(function(e,t){var r=$(t).text().toLowerCase().trim();0==$(t).find("img").length&&""==r&&$(t).remove()})},htmlbeautify:function(e){try{e.html(function(e,t){return t.trim().replace(/<\/?blockquote/g,function(e){return"/"==e[1]?"\n? (\n? )*/g," ").replace(/\/(div|p)>\n*( \n)+/g,function(e){return e.replace(" ","")})})}catch(t){return e.html()}},commbeautify:function(e,t){t.find("img:not(.sr-rd-content-nobeautify)").map(function(e,t){var r=$(t),a=(r.parent(),$(" ")),n=r.attr("src"),i=r.attr("data-src"),o=r.attr("data-original"),s=r.attr("original"),l=r.attr("data-original-src"),c=r.attr("real_src"),u=function(){a.removeClass("sr-rd-content-img-load"),a[0].clientWidth<300&&a[0].clientHeight<300?a.parent().removeClass("sr-rd-content-center").addClass("sr-rd-content-center-small"):a[0].clientWidth>1e3?a.css("zoom","0.6"):a[0].clientHeight>620&&/win|mac/i.test(navigator.platform)&&(a.attr("height",620),a[0].clientWidth<$("sr-rd-content").width()&&a.css({width:"auto"})),a[0].clientWidth>$("sr-rd-content").width()&&a.addClass("sr-rd-content-img")},d=function(){a.addClass("simpread-hidden"),a.parent().hasClass("sr-rd-content-center")&&a.parent().removeAttr("class").addClass("simpread-hidden")},h=void 0;r.parent()[0].tagName.toLowerCase(),h=s||n,h=i||h,h=o||h,h=l||h,!(h=c||h)||h.startsWith("http")||h.startsWith("data")||(h=function e(t,r){if("string"!=typeof t||!t)return null;if(t.match(/^[a-z]+\:\/\//i))return t;if(t.match(/^\/\//))return"http:"+t;if(t.match(/^[a-z]+\:/i))return t;var a;if("string"!=typeof r)return(a=document.createElement("a")).href=t,a.pathname?"http://"+t:null;if(null===(r=e(r)))return null;(a=document.createElement("a")).href=r,"/"===t[0]?r=[]:(r=a.pathname.split("/")).pop(),t=t.split("/");for(var n=0;n"),/win|mac/i.test(navigator.platform)?a.one("load",function(){return u()}).one("error",function(){return d()}):a.on("load",function(){return u()}).on("error",function(){return d()})}),t.find("sr-blockquote").map(function(t,r){var a=$(r),n=a.parent();a.removeAttr("style").removeAttr("class"),"dgtle.com"==e&&n.removeClass("quote")}),t.find("iframe:not(.sr-rd-content-nobeautify), embed:not(.sr-rd-content-nobeautify)").map(function(e,t){$(t).wrap("
")}),t.find("hr").map(function(e,t){$(t).addClass("simpread-hidden")}),t.find("pre").map(function(e,t){$(t).find("code").removeAttr("class")}),t.find("pre").removeAttr("class"),t.find("a").removeAttr("style")},cleanHTML:function(e,t,r){t&&e.find("pre").each(function(e,t){var r="",a=!1,n=!1;$(t).find("li").each(function(e,t){$(t).find("code").length>0&&(a=!0),""!=t.outerText.trim()&&(r+=t.outerText.replace(/\n/gi,"").replace(//gi,">")+"\n")}),0==a&&$(t).find("code").each(function(e,t){n=!0,""!=t.outerText.trim()&&(r+=t.outerText.replace(//gi,">")+"\n")}),a||n||(r+=t.outerText.replace(//gi,">")+"\n"),$(t).removeAttr("style").removeAttr("class").removeAttr("id").html(r)});var a,n,i=e.html();"readability-page-1"==$(e.children()).attr("id")&&1==e.children().children().length?i=e.children().children().html():1==e.children().length&&(i=e.children().html()),i=i.replace(//gi,""),e.html((a=i,n="",$.parseHTML(a).forEach(function(e,a){var i=e.tagName,o=e.outerText,s=e.outerHTML;void 0==i?n+=""+e.textContent.replace(//gi,">").replace(/^\n|\n$/gi,"").trim()+"
":"PRE"==i?n+=s:(""!=o||s.includes(" 0?t.join("").replace(/, $/,""):null}function oe(e,t){var r=Object.keys(t).map(function(e){return t[e]&&e.replace(/[A-Z]/,function(e){return"-"+e.toLowerCase()})+": "+t[e]+";"}).join("");switch(e){case"title":r="sr-rd-title {"+r+"}";break;case"desc":r="sr-rd-desc {"+r+"}";break;case"art":r="sr-rd-content *, sr-rd-content p, sr-rd-content div {"+r+"}";break;case"pre":r="sr-rd-content pre {"+r+"}";break;case"code":r="sr-rd-content pre code, sr-rd-content pre code * {"+r+"}"}var a=$("head").find("style#simpread-custom-"+e);0==a.length?$("head").append('"):a.html(r)}function se(e,t){var r=$("head").find("style#simpread-custom-"+e);0==r.length?$("head").append('"):r.html(t)}var le=Object.freeze({GetColor:ie,BgColor:function(e,t){var r="rgba("+ie(e)+", "+t/100+")";return $(ae).css(re,r),r},Opacity:function(e){var t=ie($(ae).css(re)),r="rgba("+t+", "+e/100+")";return t?($(ae).css(re,r),r):null},FontFamily:function(e){$("sr-read").css("font-family","default"==e?"":e)},FontSize:function(e){"-1"==ne&&void 0==(ne=$("html").attr("style"))&&(ne=""),e?$("html").attr("style","font-size: "+e+"!important;"+ne):$("html").attr("style",ne)},Layout:function(e){$("sr-read").css("margin",e?"20px "+e:"")},SiteCSS:function(e){e?$("head").append('"):$("#simpread-site-css").remove()},Preview:function(e){Object.keys(e).forEach(function(t){"css"!=t&&oe(t,e[t])}),se("css",e.css)},Custom:oe,CSS:se,VerifyCustom:function(e,t){switch(e){case"layout":case"margin":case"fontfamily":case"custom":return""!=t.css;case"fontsize":return""!=t.title.fontSize||""!=t.desc.fontSize||""!=t.art.fontSize||""!=t.css;case"theme":return-1!=t.css.search("simpread-theme-root")}}});function ce(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");var r;t=t||{},this._doc=e,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._wrap=null,this._debug=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug?(r=function(e){var t=e.nodeName+" ";if(e.nodeType==e.TEXT_NODE)return t+'("'+e.textContent+'")';var r=e.className&&"."+e.className.replace(/ /g,"."),a="";return e.id?a="(#"+e.id+r+")":r&&(a="("+r+")"),t+a},this.log=function(){if("undefined"!=typeof dump){var e=Array.prototype.map.call(arguments,function(e){return e&&e.nodeName?r(e):e}).join(" ");dump("Reader: (Readability) "+e+"\n")}else if("undefined"!=typeof console)["Reader: (Readability) "].concat(arguments)}):this.log=function(){}}ce.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|foot|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,whitespace:/^\s*$/,hasContent:/\S$/},DIV_TO_P_ELEMS:["A","BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL","SELECT"],ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],_postProcessContent:function(e){this._fixRelativeUris(e),this._cleanClasses(e)},_removeNodes:function(e,t){for(var r=e.length-1;r>=0;r--){var a=e[r],n=a.parentNode;n&&(t&&!t.call(this,a,r,e)||n.removeChild(a))}},_replaceNodeTags:function(e,t){for(var r=e.length-1;r>=0;r--){var a=e[r];this._setNodeTag(a,t)}},_forEachNode:function(e,t){Array.prototype.forEach.call(e,t,this)},_someNode:function(e,t){return Array.prototype.some.call(e,t,this)},_everyNode:function(e,t){return Array.prototype.every.call(e,t,this)},_concatNodeLists:function(){var e=Array.prototype.slice,t=e.call(arguments).map(function(t){return e.call(t)});return Array.prototype.concat.apply([],t)},_getAllNodesWithTag:function(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(t){var r=e.getElementsByTagName(t);return Array.isArray(r)?r:Array.from(r)}))},_cleanClasses:function(e){var t=this._classesToPreserve,r=(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return-1!=t.indexOf(e)}).join(" ");for(r?e.setAttribute("class",r):e.removeAttribute("class"),e=e.firstElementChild;e;e=e.nextElementSibling)this._cleanClasses(e)},_fixRelativeUris:function(e){var t=this._doc.baseURI,r=this._doc.documentURI;function a(e){if(t==r&&"#"==e.charAt(0))return e;try{return new URL(e,t).href}catch(e){}return e}var n=this._getAllNodesWithTag(e,["a"]);this._forEachNode(n,function(e){var t=e.getAttribute("href");if(t)if(0===t.indexOf("javascript:")){var r=this._doc.createTextNode(e.textContent);e.parentNode.replaceChild(r,e)}else e.setAttribute("href",a(t))});var i=this._getAllNodesWithTag(e,["img"]);this._forEachNode(i,function(e){var t=e.getAttribute("src");t&&e.setAttribute("src",a(t))})},_getArticleTitle:function(){var e=this._doc,t="",r="";try{"string"!=typeof(t=r=e.title.trim())&&(t=r=this._getInnerText(e.getElementsByTagName("title")[0]))}catch(e){}var a=!1;function n(e){return e.split(/\s+/).length}if(/ [\|\-\\\/>»] /.test(t))a=/ [\\\/>»] /.test(t),n(t=r.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"))<3&&(t=r.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(-1!==t.indexOf(": ")){var i=this._concatNodeLists(e.getElementsByTagName("h1"),e.getElementsByTagName("h2")),o=t.trim();this._someNode(i,function(e){return e.textContent.trim()===o})||(n(t=r.substring(r.lastIndexOf(":")+1))<3?t=r.substring(r.indexOf(":")+1):n(r.substr(0,r.indexOf(":")))>5&&(t=r))}else if(t.length>150||t.length<15){var s=e.getElementsByTagName("h1");1===s.length&&(t=this._getInnerText(s[0]))}var l=n(t=t.trim().replace(this.REGEXPS.normalize," "));return l<=4&&(!a||l!=n(r.replace(/[\|\-\\\/>»]+/g,""))-1)&&(t=r),t},_prepDocument:function(){var e=this._doc;this._removeNodes(e.getElementsByTagName("style")),e.body&&this._replaceBrs(e.body),this._replaceNodeTags(e.getElementsByTagName("font"),"SPAN")},_nextElement:function(e){for(var t=e;t&&t.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(t.textContent);)t=t.nextSibling;return t},_replaceBrs:function(e){this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){for(var t=e.nextSibling,r=!1;(t=this._nextElement(t))&&"BR"==t.tagName;){r=!0;var a=t.nextSibling;t.parentNode.removeChild(t),t=a}if(r){var n=this._doc.createElement("p");for(e.parentNode.replaceChild(n,e),t=n.nextSibling;t;){if("BR"==t.tagName){var i=this._nextElement(t.nextSibling);if(i&&"BR"==i.tagName)break}if(!this._isPhrasingContent(t))break;var o=t.nextSibling;n.appendChild(t),t=o}for(;n.lastChild&&this._isWhitespace(n.lastChild);)n.removeChild(n.lastChild);"P"===n.parentNode.tagName&&this._setNodeTag(n.parentNode,"DIV")}})},_setNodeTag:function(e,t){if(this.log("_setNodeTag",e,t),e.__JSDOMParser__)return e.localName=t.toLowerCase(),e.tagName=t.toUpperCase(),e;for(var r=e.ownerDocument.createElement(t);e.firstChild;)r.appendChild(e.firstChild);e.parentNode.replaceChild(r,e),e.readability&&(r.readability=e.readability);for(var a=0;a0?r[0].textContent.includes(this._articleTitle):this._articleTitle.includes(r[0].textContent))&&this._clean(e,"h2")}}this._clean(e,"iframe"),this._clean(e,"input"),this._clean(e,"textarea"),this._clean(e,"select"),this._clean(e,"button"),this._cleanHeaders(e),this._cleanConditionally(e,"table"),this._cleanConditionally(e,"ul"),this._cleanConditionally(e,"div"),this._removeNodes(e.getElementsByTagName("p"),function(e){return 0===e.getElementsByTagName("img").length+e.getElementsByTagName("embed").length+e.getElementsByTagName("object").length+e.getElementsByTagName("iframe").length&&!this._getInnerText(e,!1)}),this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){var t=this._nextElement(e.nextSibling);t&&"P"==t.tagName&&e.parentNode.removeChild(e)}),this._forEachNode(this._getAllNodesWithTag(e,["table"]),function(e){var t=this._hasSingleTagInsideElement(e,"TBODY")?e.firstElementChild:e;if(this._hasSingleTagInsideElement(t,"TR")){var r=t.firstElementChild;if(this._hasSingleTagInsideElement(r,"TD")){var a=r.firstElementChild;a=this._setNodeTag(a,this._everyNode(a.childNodes,this._isPhrasingContent)?"P":"DIV"),e.parentNode.replaceChild(a,e)}}})},_initializeNode:function(e){switch(e.readability={contentScore:0},e.tagName){case"DIV":e.readability.contentScore+=5;break;case"PRE":case"TD":case"BLOCKQUOTE":e.readability.contentScore+=3;break;case"ADDRESS":case"OL":case"UL":case"DL":case"DD":case"DT":case"LI":case"FORM":e.readability.contentScore-=3;break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"TH":e.readability.contentScore-=5}e.readability.contentScore+=this._getClassWeight(e)},_removeAndGetNext:function(e){var t=this._getNextNode(e,!0);return e.parentNode.removeChild(e),t},_getNextNode:function(e,t){if(!t&&e.firstElementChild)return e.firstElementChild;if(e.nextElementSibling)return e.nextElementSibling;do{e=e.parentNode}while(e&&!e.nextElementSibling);return e&&e.nextElementSibling},_checkByline:function(e,t){if(this._articleByline)return!1;if(void 0!==e.getAttribute)var r=e.getAttribute("rel"),a=e.getAttribute("itemprop");return!(!("author"===r||a&&-1!==a.indexOf("author")||this.REGEXPS.byline.test(t))||!this._isValidByline(e.textContent))&&(this._articleByline=e.textContent.trim(),!0)},_getNodeAncestors:function(e,t){t=t||0;for(var r=0,a=[];e.parentNode&&(a.push(e.parentNode),!t||++r!==t);)e=e.parentNode;return a},_grabArticle:function(e){this.log("**** grabArticle ****");var t=this._doc,r=null!==e;if(!(e=e||this._doc.body))return this.log("No body found in document. Abort."),null;for(var a=e.innerHTML;;){for(var n=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),i=[],o=this._doc.documentElement;o;){var s=o.className+" "+o.id;if(this._isProbablyVisible(o))if(this._checkByline(o,s))o=this._removeAndGetNext(o);else if(!n||!this.REGEXPS.unlikelyCandidates.test(s)||this.REGEXPS.okMaybeItsACandidate.test(s)||this._hasAncestorTag(o,"table")||"BODY"===o.tagName||"A"===o.tagName)if("DIV"!==o.tagName&&"SECTION"!==o.tagName&&"HEADER"!==o.tagName&&"H1"!==o.tagName&&"H2"!==o.tagName&&"H3"!==o.tagName&&"H4"!==o.tagName&&"H5"!==o.tagName&&"H6"!==o.tagName||!this._isElementWithoutContent(o)){if(-1!==this.DEFAULT_TAGS_TO_SCORE.indexOf(o.tagName)&&i.push(o),"DIV"===o.tagName){for(var l=null,c=o.firstChild;c;){var u=c.nextSibling;if(this._isPhrasingContent(c))null!==l?l.appendChild(c):this._isWhitespace(c)||(l=t.createElement("p"),o.replaceChild(l,c),l.appendChild(c));else if(null!==l){for(;l.lastChild&&this._isWhitespace(l.lastChild);)l.removeChild(l.lastChild);l=null}c=u}if(this._hasSingleTagInsideElement(o,"P")&&this._getLinkDensity(o)<.25){var d=o.children[0];o.parentNode.replaceChild(d,o),o=d,i.push(o)}else this._hasChildBlockElement(o)||(o=this._setNodeTag(o,"P"),i.push(o))}o=this._getNextNode(o)}else o=this._removeAndGetNext(o);else this.log("Removing unlikely candidate - "+s),o=this._removeAndGetNext(o);else this.log("Removing hidden node - "+s),o=this._removeAndGetNext(o)}var h=[];this._forEachNode(i,function(e){if(e.parentNode&&void 0!==e.parentNode.tagName){var t=this._getInnerText(e);if(!(t.length<25)){var r=this._getNodeAncestors(e,3);if(0!==r.length){var a=0;a+=1,a+=t.split(",").length,a+=Math.min(Math.floor(t.length/100),3),this._forEachNode(r,function(e,t){if(e.tagName&&e.parentNode&&void 0!==e.parentNode.tagName){if(void 0===e.readability&&(this._initializeNode(e),h.push(e)),0===t)var r=1;else r=1===t?2:3*t;e.readability.contentScore+=a/r}})}}}});for(var f=[],p=0,g=h.length;pv.readability.contentScore){f.splice(b,0,m),f.length>this._nbTopCandidates&&f.pop();break}}}var w,y=f[0]||null,k=!1;if(null===y||"BODY"===y.tagName){y=t.createElement("DIV"),k=!0;for(var E=e.childNodes;E.length;)this.log("Moving child out:",E[0]),y.appendChild(E[0]);e.appendChild(y),this._initializeNode(y)}else if(y){for(var T=[],x=1;x=.75&&T.push(this._getNodeAncestors(f[x]));if(T.length>=3)for(w=y.parentNode;"BODY"!==w.tagName;){for(var N=0,A=0;A=3){y=w;break}w=w.parentNode}y.readability||this._initializeNode(y),w=y.parentNode;for(var S=y.readability.contentScore,C=S/3;"BODY"!==w.tagName;)if(w.readability){var P=w.readability.contentScore;if(PS){y=w;break}S=w.readability.contentScore,w=w.parentNode}else w=w.parentNode;for(w=y.parentNode;"BODY"!=w.tagName&&1==w.children.length;)w=(y=w).parentNode;y.readability||this._initializeNode(y)}var L=t.createElement("DIV");r&&(L.id="readability-content");for(var j=Math.max(10,.2*y.readability.contentScore),z=(w=y.parentNode).children,M=0,$=z.length;M<$;M++){var B=z[M],I=!1;if(this.log("Looking at sibling node:",B,B.readability?"with score "+B.readability.contentScore:""),this.log("Sibling has score",B.readability?B.readability.contentScore:"Unknown"),B===y)I=!0;else{var O=0;if(B.className===y.className&&""!==y.className&&(O+=.2*y.readability.contentScore),B.readability&&B.readability.contentScore+O>=j)I=!0;else if("P"===B.nodeName){var R=this._getLinkDensity(B),H=this._getInnerText(B),D=H.length;D>80&&R<.25?I=!0:D<80&&D>0&&0===R&&-1!==H.search(/\.( |$)/)&&(I=!0)}}I&&(this.log("Appending node:",B),-1===this.ALTER_TO_DIV_EXCEPTIONS.indexOf(B.nodeName)&&(this.log("Altering sibling:",B,"to div."),B=this._setNodeTag(B,"DIV")),L.appendChild(B),M-=1,$-=1)}if(this._debug&&this.log("Article content pre-prep: "+L.innerHTML),this._prepArticle(L),this._debug&&this.log("Article content post-prep: "+L.innerHTML),k)y.id="readability-page-1",y.className="page";else{var G=t.createElement("DIV");G.id="readability-page-1",G.className="page";var U=L.childNodes;for(this._wrap=L.childNodes[0].outerHTML.replace(L.childNodes[0].innerHTML,"");U.length;)G.appendChild(U[0]);L.appendChild(G)}this._debug&&this.log("Article content after paging: "+L.innerHTML);var q=!0,F=this._getInnerText(L,!0).length;if(F0&&e.length<100)},_getArticleMetadata:function(){var e={},t={},r=this._doc.getElementsByTagName("meta"),a=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,n=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(r,function(e){var r=e.getAttribute("name"),i=e.getAttribute("property"),o=e.getAttribute("content");if(o){var s=null,l=null;if(i&&(s=i.match(a)))for(var c=s.length-1;c>=0;c--)l=s[c].toLowerCase().replace(/\s/g,""),t[l]=o.trim();!s&&r&&n.test(r)&&(l=r,o&&(l=l.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),t[l]=o.trim()))}}),e.title=t["dc:title"]||t["dcterm:title"]||t["og:title"]||t["weibo:article:title"]||t["weibo:webpage:title"]||t.title||t["twitter:title"],e.title||(e.title=this._getArticleTitle()),e.byline=t["dc:creator"]||t["dcterm:creator"]||t.author,e.excerpt=t["dc:description"]||t["dcterm:description"]||t["og:description"]||t["weibo:article:description"]||t["weibo:webpage:description"]||t.description||t["twitter:description"],e.siteName=t["og:site_name"],e},_removeScripts:function(e){this._removeNodes(e.getElementsByTagName("script"),function(e){return e.nodeValue="",e.removeAttribute("src"),!0}),this._removeNodes(e.getElementsByTagName("noscript"))},_hasSingleTagInsideElement:function(e,t){return 1==e.children.length&&e.children[0].tagName===t&&!this._someNode(e.childNodes,function(e){return e.nodeType===this.TEXT_NODE&&this.REGEXPS.hasContent.test(e.textContent)})},_isElementWithoutContent:function(e){return e.nodeType===this.ELEMENT_NODE&&0==e.textContent.trim().length&&(0==e.children.length||e.children.length==e.getElementsByTagName("br").length+e.getElementsByTagName("hr").length)},_hasChildBlockElement:function(e){return this._someNode(e.childNodes,function(e){return-1!==this.DIV_TO_P_ELEMS.indexOf(e.tagName)||this._hasChildBlockElement(e)})},_isPhrasingContent:function(e){return e.nodeType===this.TEXT_NODE||-1!==this.PHRASING_ELEMS.indexOf(e.tagName)||("A"===e.tagName||"DEL"===e.tagName||"INS"===e.tagName)&&this._everyNode(e.childNodes,this._isPhrasingContent)},_isWhitespace:function(e){return e.nodeType===this.TEXT_NODE&&0===e.textContent.trim().length||e.nodeType===this.ELEMENT_NODE&&"BR"===e.tagName},_getInnerText:function(e,t){t=void 0===t||t;var r=e.textContent.trim();return t?r.replace(this.REGEXPS.normalize," "):r},_getCharCount:function(e,t){return t=t||",",this._getInnerText(e).split(t).length-1},_cleanStyles:function(e){if(e&&"svg"!==e.tagName.toLowerCase()){for(var t=0;t0&&n>r)return!1;if(e.parentNode.tagName===t&&(!a||a(e.parentNode)))return!0;e=e.parentNode,n++}return!1},_getRowAndColumnCount:function(e){for(var t=0,r=0,a=e.getElementsByTagName("tr"),n=0;n0)a._readabilityDataTable=!0;else{if(["col","colgroup","tfoot","thead","th"].some(function(e){return!!a.getElementsByTagName(e)[0]}))this.log("Data table because found data-y descendant"),a._readabilityDataTable=!0;else if(a.getElementsByTagName("table")[0])a._readabilityDataTable=!1;else{var i=this._getRowAndColumnCount(a);i.rows>=10||i.columns>4?a._readabilityDataTable=!0:a._readabilityDataTable=i.rows*i.columns>10}}}else a._readabilityDataTable=!1;else a._readabilityDataTable=!1}},_cleanConditionally:function(e,t){if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)){var r="ul"===t||"ol"===t;this._removeNodes(e.getElementsByTagName(t),function(e){var a=function(e){return e._readabilityDataTable};if("table"===t&&a(e))return!1;if(this._hasAncestorTag(e,"table",-1,a))return!1;var n=this._getClassWeight(e);if(this.log("Cleaning Conditionally",e),n+0<0)return!0;if(this._getCharCount(e,",")<10){for(var i=e.getElementsByTagName("p").length,o=e.getElementsByTagName("img").length,s=e.getElementsByTagName("li").length-100,l=e.getElementsByTagName("input").length,c=0,u=this._concatNodeLists(e.getElementsByTagName("object"),e.getElementsByTagName("embed"),e.getElementsByTagName("iframe")),d=0;d1&&i/o<.5&&!this._hasAncestorTag(e,"figure")||!r&&s>i||l>Math.floor(i/3)||!r&&p<25&&(0===o||o>2)&&!this._hasAncestorTag(e,"figure")||!r&&n<25&&f>.2||n>=25&&f>.5||1===c&&p<75||c>1}return!1})}},_cleanMatchedNodes:function(e,t){for(var r=this._getNextNode(e,!0),a=this._getNextNode(e);a&&a!=r;)a=t(a,a.className+" "+a.id)?this._removeAndGetNext(a):this._getNextNode(a)},_cleanHeaders:function(e){for(var t=1;t<3;t+=1)this._removeNodes(e.getElementsByTagName("h"+t),function(e){return this._getClassWeight(e)<0})},_flagIsActive:function(e){return(this._flags&e)>0},_removeFlag:function(e){this._flags=this._flags&~e},_isProbablyVisible:function(e){return!(e.style&&"none"==e.style.display||e.hasAttribute("hidden"))},parse:function(){if(this._maxElemsToParse>0){var e=this._doc.getElementsByTagName("*").length;if(e>this._maxElemsToParse)throw new Error("Aborting parsing document; "+e+" elements found")}this._removeScripts(this._doc),this._prepDocument();var t=this._getArticleMetadata();this._articleTitle=t.title;var r=this._grabArticle();if(!r)return null;if(this.log("Grabbed: "+r.innerHTML),this._postProcessContent(r),!t.excerpt){var a=r.getElementsByTagName("p");a.length>0&&(t.excerpt=a[0].textContent.trim())}var n=r.textContent;return{title:this._articleTitle,byline:t.byline||this._articleByline,dir:this._articleDir,content:r.innerHTML,wrap:this._wrap,textContent:n,length:n.length,excerpt:t.excerpt,siteName:t.siteName||this._articleSiteName}}};var ue=Object.freeze({Readability:ce}),de=r(function(e){(function(){function t(e){var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: foo
",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a].defaultValue);return r}function r(e,t){var r=t?"Error in "+t+" extension->":"Error in unnamed extension",n={valid:!0,error:""};i.helper.isArray(e)||(e=[e]);for(var o=0;o").replace(/&/g,"&")};var d=function(e,t,r,a){var n,i,o,s,l,c=a||"",u=c.indexOf("g")>-1,d=new RegExp(t+"|"+r,"g"+c.replace(/g/g,"")),h=new RegExp(t,c.replace(/g/g,"")),f=[];do{for(n=0;o=d.exec(e);)if(h.test(o[0]))n++||(s=(i=d.lastIndex)-o[0].length);else if(n&&!--n){l=o.index+o[0].length;var p={left:{start:s,end:i},match:{start:i,end:o.index},right:{start:o.index,end:l},wholeMatch:{start:s,end:l}};if(f.push(p),!u)return f}}while(n&&(d.lastIndex=i));return f};i.helper.matchRecursiveRegExp=function(e,t,r,a){for(var n=d(e,t,r,a),i=[],o=0;o0){var u=[];0!==s[0].wholeMatch.start&&u.push(e.slice(0,s[0].wholeMatch.start));for(var h=0;h=0?a+(r||0):a},i.helper.splitAtIndex=function(e,t){if(!i.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},i.helper.encodeEmailAddress=function(e){var t=[function(e){return""+e.charCodeAt(0)+";"},function(e){return""+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e.replace(/./g,function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var r=Math.random();e=r>.9?t[2](e):r>.45?t[1](e):t[0](e)}return e})},i.helper.padEnd=function(e,t,r){return t>>=0,r=String(r||" "),e.length>t?String(e):((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),String(e)+r.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){alert(e)},log:function(e){alert(e)},error:function(e){throw e}}),i.helper.regexes={asteriskDashAndColon:/([*_:~])/g},i.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨❤️👨",couple_with_heart_woman_woman:"👩❤️👩",couplekiss_man_man:"👨❤️💋👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩❤️💋👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨👦",family_man_boy_boy:"👨👦👦",family_man_girl:"👨👧",family_man_girl_boy:"👨👧👦",family_man_girl_girl:"👨👧👧",family_man_man_boy:"👨👨👦",family_man_man_boy_boy:"👨👨👦👦",family_man_man_girl:"👨👨👧",family_man_man_girl_boy:"👨👨👧👦",family_man_man_girl_girl:"👨👨👧👧",family_man_woman_boy_boy:"👨👩👦👦",family_man_woman_girl:"👨👩👧",family_man_woman_girl_boy:"👨👩👧👦",family_man_woman_girl_girl:"👨👩👧👧",family_woman_boy:"👩👦",family_woman_boy_boy:"👩👦👦",family_woman_girl:"👩👧",family_woman_girl_boy:"👩👧👦",family_woman_girl_girl:"👩👧👧",family_woman_woman_boy:"👩👩👦",family_woman_woman_boy_boy:"👩👩👦👦",family_woman_woman_girl:"👩👩👧",family_woman_woman_girl_boy:"👩👩👧👦",family_woman_woman_girl_girl:"👩👩👧👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨🎨",man_astronaut:"👨🚀",man_cartwheeling:"🤸♂️",man_cook:"👨🍳",man_dancing:"🕺",man_facepalming:"🤦♂️",man_factory_worker:"👨🏭",man_farmer:"👨🌾",man_firefighter:"👨🚒",man_health_worker:"👨⚕️",man_in_tuxedo:"🤵",man_judge:"👨⚖️",man_juggling:"🤹♂️",man_mechanic:"👨🔧",man_office_worker:"👨💼",man_pilot:"👨✈️",man_playing_handball:"🤾♂️",man_playing_water_polo:"🤽♂️",man_scientist:"👨🔬",man_shrugging:"🤷♂️",man_singer:"👨🎤",man_student:"👨🎓",man_teacher:"👨🏫",man_technologist:"👨💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩🎨",woman_astronaut:"👩🚀",woman_cartwheeling:"🤸♀️",woman_cook:"👩🍳",woman_facepalming:"🤦♀️",woman_factory_worker:"👩🏭",woman_farmer:"👩🌾",woman_firefighter:"👩🚒",woman_health_worker:"👩⚕️",woman_judge:"👩⚖️",woman_juggling:"🤹♀️",woman_mechanic:"👩🔧",woman_office_worker:"👩💼",woman_pilot:"👩✈️",woman_playing_handball:"🤾♀️",woman_playing_water_polo:"🤽♀️",woman_scientist:"👩🔬",woman_shrugging:"🤷♀️",woman_singer:"👩🎤",woman_student:"👩🎓",woman_teacher:"👩🏫",woman_technologist:"👩💻",woman_with_turban:"👳♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:' ',showdown:"S "},i.Converter=function(e){function t(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return void function(e,t){"function"==typeof e&&(e=e(new i.Converter)),i.helper.isArray(e)||(e=[e]);var a=r(e,t);if(!a.valid)throw Error(a.error);for(var n=0;n [ \t]+,">¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var r=t.createElement("div");r.innerHTML=e;var a={preList:function(e){for(var t=e.querySelectorAll("pre"),r=[],a=0;a'}else r.push(t[a].innerHTML),t[a].innerHTML="",t[a].setAttribute("prenum",a.toString());return r}(r)};!function e(t){for(var r=0;r? ?(['"].*['"])?\)$/m)>-1)o="";else if(!o){if(n||(n=a.toLowerCase().replace(/ ?\n/g," ")),o="#"+n,i.helper.isUndefined(r.gUrls[n]))return e;o=r.gUrls[n],i.helper.isUndefined(r.gTitles[n])||(c=r.gTitles[n])}var u='"+a+" "};return e=(e=(e=(e=(e=r.converter._dispatch("anchors.before",e,t,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,a)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,a)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,a)).replace(/\[([^\[\]]+)]()()()()()/g,a),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,function(e,r,a,n,o){if("\\"===a)return r+n;if(!i.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var s=t.ghMentionsLink.replace(/\{u}/g,o),l="";return t.openLinksInNewWindow&&(l=' target="¨E95Eblank"'),r+'"+n+" "})),r.converter._dispatch("anchors.after",e,t,r)});var h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,p=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,g=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,m=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,_=function(e){return function(t,r,a,n,o,s,l){var c=a=a.replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback),u="",d="",h=r||"",f=l||"";return/^www\./i.test(a)&&(a=a.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&s&&(u=s),e.openLinksInNewWindow&&(d=' target="¨E95Eblank"'),h+'"+c+" "+u+f}},b=function(e,t){return function(r,a,n){var o="mailto:";return a=a||"",n=i.subParser("unescapeSpecialChars")(n,e,t),e.encodeEmails?(o=i.helper.encodeEmailAddress(o+n),n=i.helper.encodeEmailAddress(n)):o+=n,a+''+n+" "}};i.subParser("autoLinks",function(e,t,r){return e=(e=(e=r.converter._dispatch("autoLinks.before",e,t,r)).replace(p,_(t))).replace(m,b(t,r)),r.converter._dispatch("autoLinks.after",e,t,r)}),i.subParser("simplifiedAutoLinks",function(e,t,r){return t.simplifiedAutoLink?(e=r.converter._dispatch("simplifiedAutoLinks.before",e,t,r),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(f,_(t)):e.replace(h,_(t))).replace(g,b(t,r)),e=r.converter._dispatch("simplifiedAutoLinks.after",e,t,r)):e}),i.subParser("blockGamut",function(e,t,r){return e=r.converter._dispatch("blockGamut.before",e,t,r),e=i.subParser("blockQuotes")(e,t,r),e=i.subParser("headers")(e,t,r),e=i.subParser("horizontalRule")(e,t,r),e=i.subParser("lists")(e,t,r),e=i.subParser("codeBlocks")(e,t,r),e=i.subParser("tables")(e,t,r),e=i.subParser("hashHTMLBlocks")(e,t,r),e=i.subParser("paragraphs")(e,t,r),r.converter._dispatch("blockGamut.after",e,t,r)}),i.subParser("blockQuotes",function(e,t,r){e=r.converter._dispatch("blockQuotes.before",e,t,r),e+="\n\n";var a=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(a=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(a,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=i.subParser("githubCodeBlocks")(e,t,r),e=(e=(e=i.subParser("blockGamut")(e,t,r)).replace(/(^|\n)/g,"$1 ")).replace(/(\s*[^\r]+?<\/pre>)/gm,function(e,t){var r=t;return(r=r.replace(/^ /gm,"¨0")).replace(/¨0/g,"")}),i.subParser("hashBlock")("\n"+e+"\n ",t,r)}),r.converter._dispatch("blockQuotes.after",e,t,r)}),i.subParser("codeBlocks",function(e,t,r){return e=r.converter._dispatch("codeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,a,n){var o=a,s=n,l="\n";return o=i.subParser("outdent")(o,t,r),o=i.subParser("encodeCode")(o,t,r),o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(l=""),o=""+o+l+"
",i.subParser("hashBlock")(o,t,r)+s})).replace(/¨0/,""),r.converter._dispatch("codeBlocks.after",e,t,r)}),i.subParser("codeSpans",function(e,t,r){return void 0===(e=r.converter._dispatch("codeSpans.before",e,t,r))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,a,n,o){var s=o;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=a+""+(s=i.subParser("encodeCode")(s,t,r))+"
",i.subParser("hashHTMLSpans")(s,t,r)}),r.converter._dispatch("codeSpans.after",e,t,r)}),i.subParser("completeHTMLDocument",function(e,t,r){if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var a="html",n="\n",i="",o=' \n',s="",l="";for(var c in void 0!==r.metadata.parsed.doctype&&(n="\n","html"!==(a=r.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==a||(o=' ')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(c))switch(c.toLowerCase()){case"doctype":break;case"title":i=""+r.metadata.parsed.title+" \n";break;case"charset":o="html"===a||"html5"===a?' \n':' \n';break;case"language":case"lang":s=' lang="'+r.metadata.parsed[c]+'"',l+=' \n';break;default:l+=' \n'}return e=n+"\n\n"+i+o+l+"\n\n"+e.trim()+"\n\n",r.converter._dispatch("completeHTMLDocument.after",e,t,r)}),i.subParser("detab",function(e,t,r){return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g," ")).replace(/\t/g,"¨A¨B")).replace(/¨B(.+?)¨A/g,function(e,t){for(var r=t,a=4-r.length%4,n=0;n/g,">"),r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)}),i.subParser("encodeBackslashEscapes",function(e,t,r){return e=(e=(e=r.converter._dispatch("encodeBackslashEscapes.before",e,t,r)).replace(/\\(\\)/g,i.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,i.helper.escapeCharactersCallback),r.converter._dispatch("encodeBackslashEscapes.after",e,t,r)}),i.subParser("encodeCode",function(e,t,r){return e=(e=r.converter._dispatch("encodeCode.before",e,t,r)).replace(/&/g,"&").replace(/ /g,">").replace(/([*_{}\[\]\\=~-])/g,i.helper.escapeCharactersCallback),r.converter._dispatch("encodeCode.after",e,t,r)}),i.subParser("escapeSpecialCharsWithinTagAttributes",function(e,t,r){return e=(e=(e=r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,r)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)})).replace(/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,i.helper.escapeCharactersCallback)}),r.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,r)}),i.subParser("githubCodeBlocks",function(e,t,r){return t.ghCodeBlocks?(e=r.converter._dispatch("githubCodeBlocks.before",e,t,r),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,a,n,o){var s=t.omitExtraWLInCodeBlocks?"":"\n";return o=i.subParser("encodeCode")(o,t,r),o=(o=(o=i.subParser("detab")(o,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,""),o=""+o+s+"
",o=i.subParser("hashBlock")(o,t,r),"\n\n¨G"+(r.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"})).replace(/¨0/,""),r.converter._dispatch("githubCodeBlocks.after",e,t,r)):e}),i.subParser("hashBlock",function(e,t,r){return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",r.converter._dispatch("hashBlock.after",e,t,r)}),i.subParser("hashCodeTags",function(e,t,r){return e=r.converter._dispatch("hashCodeTags.before",e,t,r),e=i.helper.replaceRecursiveRegExp(e,function(e,a,n,o){var s=n+i.subParser("encodeCode")(a,t,r)+o;return"¨C"+(r.gHtmlSpans.push(s)-1)+"C"},"]*>","
","gim"),r.converter._dispatch("hashCodeTags.after",e,t,r)}),i.subParser("hashElement",function(e,t,r){return function(e,t){var a=t;return a=(a=(a=a.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),"\n\n¨K"+(r.gHtmlBlocks.push(a)-1)+"K\n\n"}}),i.subParser("hashHTMLBlocks",function(e,t,r){e=r.converter._dispatch("hashHTMLBlocks.before",e,t,r);var a=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],n=function(e,t,a,n){var i=e;return-1!==a.search(/\bmarkdown\b/)&&(i=a+r.converter.makeHtml(t)+n),"\n\n¨K"+(r.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"<"+t+">"}));for(var o=0;o]*>)","im"),c="<"+a[o]+"\\b[^>]*>",u=""+a[o]+">";-1!==(s=i.helper.regexIndexOf(e,l));){var d=i.helper.splitAtIndex(e,s),h=i.helper.replaceRecursiveRegExp(d[1],n,c,u,"im");if(h===d[1])break;e=d[0].concat(h)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),e=(e=i.helper.replaceRecursiveRegExp(e,function(e){return"\n\n¨K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,i.subParser("hashElement")(e,t,r)),r.converter._dispatch("hashHTMLBlocks.after",e,t,r)}),i.subParser("hashHTMLSpans",function(e,t,r){function a(e){return"¨C"+(r.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,function(e){return a(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return a(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return a(e)})).replace(/<[^>]+?>/gi,function(e){return a(e)}),r.converter._dispatch("hashHTMLSpans.after",e,t,r)}),i.subParser("unhashHTMLSpans",function(e,t,r){e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var a=0;a]*>\\s*]*>","^ {0,3}
\\s*","gim"),r.converter._dispatch("hashPreCodeTags.after",e,t,r)}),i.subParser("headers",function(e,t,r){function a(e){var a,n;if(t.customizedHeaderId){var o=e.match(/\{([^{]+?)}\s*$/);o&&o[1]&&(e=o[1])}return a=e,n=i.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(a=n+a),a=t.ghCompatibleHeaderId?a.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?a.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():a.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(a=n+a),r.hashLinkCounts[a]?a=a+"-"+r.hashLinkCounts[a]++:r.hashLinkCounts[a]=1,a}e=r.converter._dispatch("headers.before",e,t,r);var n=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),o=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,s=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(o,function(e,o){var s=i.subParser("spanGamut")(o,t,r),l=t.noHeaderId?"":' id="'+a(o)+'"',c=""+s+" ";return i.subParser("hashBlock")(c,t,r)})).replace(s,function(e,o){var s=i.subParser("spanGamut")(o,t,r),l=t.noHeaderId?"":' id="'+a(o)+'"',c=n+1,u=""+s+" ";return i.subParser("hashBlock")(u,t,r)});var l=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;return e=e.replace(l,function(e,o,s){var l=s;t.customizedHeaderId&&(l=s.replace(/\s?\{([^{]+?)}\s*$/,""));var c=i.subParser("spanGamut")(l,t,r),u=t.noHeaderId?"":' id="'+a(s)+'"',d=n-1+o.length,h=""+c+" ";return i.subParser("hashBlock")(h,t,r)}),r.converter._dispatch("headers.after",e,t,r)}),i.subParser("horizontalRule",function(e,t,r){e=r.converter._dispatch("horizontalRule.before",e,t,r);var a=i.subParser("hashBlock")(" ",t,r);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,a)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,a),r.converter._dispatch("horizontalRule.after",e,t,r)}),i.subParser("images",function(e,t,r){function a(e,t,a,n,o,s,l,c){var u=r.gUrls,d=r.gTitles,h=r.gDimensions;if(a=a.toLowerCase(),c||(c=""),e.search(/\(\s*>? ?(['"].*['"])?\)$/m)>-1)n="";else if(""===n||null===n){if(""!==a&&null!==a||(a=t.toLowerCase().replace(/ ?\n/g," ")),n="#"+a,i.helper.isUndefined(u[a]))return e;n=u[a],i.helper.isUndefined(d[a])||(c=d[a]),i.helper.isUndefined(h[a])||(o=h[a].width,s=h[a].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var f=' "}return e=(e=(e=(e=(e=(e=r.converter._dispatch("images.before",e,t,r)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,a)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,function(e,t,r,n,i,o,s,l){return a(e,t,r,n=n.replace(/\s/g,""),i,o,0,l)})).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,a)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,a)).replace(/!\[([^\[\]]+)]()()()()()/g,a),r.converter._dispatch("images.after",e,t,r)}),i.subParser("italicsAndBold",function(e,t,r){function a(e,t,r){return t+e+r}return e=r.converter._dispatch("italicsAndBold.before",e,t,r),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return a(t,""," ")})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return a(t,""," ")})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,t){return a(t,""," ")}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e}),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,t,r){return a(r,t+""," ")})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,t,r){return a(r,t+""," ")})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,t,r){return a(r,t+""," ")}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,t){return/\S$/.test(t)?a(t,""," "):e}),r.converter._dispatch("italicsAndBold.after",e,t,r)}),i.subParser("lists",function(e,t,r){function a(e,a){r.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var n=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(n=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(n,function(e,a,n,s,l,c,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(l,t,r),h="";return c&&t.tasklists&&(h=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e=' "})),d=d.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(e){return"¨A"+e}),a||d.search(/\n{2,}/)>-1?(d=i.subParser("githubCodeBlocks")(d,t,r),d=i.subParser("blockGamut")(d,t,r)):(d=(d=i.subParser("lists")(d,t,r)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,r)).replace(/\n\n+/g,"\n\n"),d=o?i.subParser("paragraphs")(d,t,r):i.subParser("spanGamut")(d,t,r)),""+(d=d.replace("¨A",""))+" \n"})).replace(/¨0/g,""),r.gListLevel--,a&&(e=e.replace(/\s+$/,"")),e}function n(e,t){if("ol"===t){var r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function o(e,r,i){var o=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===r?o:s,c="";if(-1!==e.search(l))!function t(u){var d=u.search(l),h=n(e,r);-1!==d?(c+="\n\n<"+r+h+">\n"+a(u.slice(0,d),!!i)+""+r+">\n",l="ul"==(r="ul"===r?"ol":"ul")?o:s,t(u.slice(d))):c+="\n\n<"+r+h+">\n"+a(u,!!i)+""+r+">\n"}(e);else{var u=n(e,r);c="\n\n<"+r+u+">\n"+a(e,!!i)+""+r+">\n"}return c}return e=r.converter._dispatch("lists.before",e,t,r),e+="¨0",e=(e=r.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r){return o(t,r.search(/[*+-]/g)>-1?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r,a){return o(r,a.search(/[*+-]/g)>-1?"ul":"ol",!1)})).replace(/¨0/,""),r.converter._dispatch("lists.after",e,t,r)}),i.subParser("metadata",function(e,t,r){function a(e){r.metadata.raw=e,(e=(e=e.replace(/&/g,"&").replace(/"/g,""")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,t,a){return r.metadata.parsed[t]=a,""})}return t.metadata?(e=(e=(e=(e=r.converter._dispatch("metadata.before",e,t,r)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(e,t,r){return a(r),"¨M"})).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,t,n){return t&&(r.metadata.format=t),a(n),"¨M"})).replace(/¨M/g,""),e=r.converter._dispatch("metadata.after",e,t,r)):e}),i.subParser("outdent",function(e,t,r){return e=(e=(e=r.converter._dispatch("outdent.before",e,t,r)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/¨0/g,""),r.converter._dispatch("outdent.after",e,t,r)}),i.subParser("paragraphs",function(e,t,r){for(var a=(e=(e=(e=r.converter._dispatch("paragraphs.before",e,t,r)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),n=[],o=a.length,s=0;s=0?n.push(l):l.search(/\S/)>=0&&(l=(l=i.subParser("spanGamut")(l,t,r)).replace(/^([ \t]*)/g,""),l+="
",n.push(l))}for(o=n.length,s=0;s]*>\s*]*>/.test(u)&&(d=!0)}n[s]=u}return e=(e=(e=n.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.converter._dispatch("paragraphs.after",e,t,r)}),i.subParser("runExtension",function(e,t,r,a){if(e.filter)t=e.filter(t,a.converter,r);else if(e.regex){var n=e.regex;n instanceof RegExp||(n=new RegExp(n,"g")),t=t.replace(n,e.replace)}return t}),i.subParser("spanGamut",function(e,t,r){return e=r.converter._dispatch("spanGamut.before",e,t,r),e=i.subParser("codeSpans")(e,t,r),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,r),e=i.subParser("encodeBackslashEscapes")(e,t,r),e=i.subParser("images")(e,t,r),e=i.subParser("anchors")(e,t,r),e=i.subParser("autoLinks")(e,t,r),e=i.subParser("simplifiedAutoLinks")(e,t,r),e=i.subParser("emoji")(e,t,r),e=i.subParser("underline")(e,t,r),e=i.subParser("italicsAndBold")(e,t,r),e=i.subParser("strikethrough")(e,t,r),e=i.subParser("ellipsis")(e,t,r),e=i.subParser("hashHTMLSpans")(e,t,r),e=i.subParser("encodeAmpsAndAngles")(e,t,r),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g," \n")):e=e.replace(/ +\n/g," \n"),r.converter._dispatch("spanGamut.after",e,t,r)}),i.subParser("strikethrough",function(e,t,r){return t.strikethrough&&(e=(e=r.converter._dispatch("strikethrough.before",e,t,r)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,a){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,r)),""+e+""}(a)}),e=r.converter._dispatch("strikethrough.after",e,t,r)),e}),i.subParser("stripLinkDefinitions",function(e,t,r){var a=function(e,a,n,o,s,l,c){return a=a.toLowerCase(),n.match(/^data:.+?\/.+?;base64,/)?r.gUrls[a]=n.replace(/\s/g,""):r.gUrls[a]=i.subParser("encodeAmpsAndAngles")(n,t,r),l?l+c:(c&&(r.gTitles[a]=c.replace(/"|'/g,""")),t.parseImgDimensions&&o&&s&&(r.gDimensions[a]={width:o,height:s}),"")};return(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,a)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,a)).replace(/¨0/,"")}),i.subParser("tables",function(e,t,r){function a(e){return/^:[ \t]*--*$/.test(e)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(e)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(e)?' style="text-align:center;"':""}function n(e,a){var n="";return e=e.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(n=' id="'+e.replace(/ /g,"_").toLowerCase()+'"'),""+(e=i.subParser("spanGamut")(e,t,r))+" \n"}function o(e,a){return""+i.subParser("spanGamut")(e,t,r)+" \n"}function s(e){var s,l=e.split("\n");for(s=0;s\n\n\n",n=0;n\n";for(var i=0;i\n"}return r+" \n\n"}(h,p)}return t.tables?(e=(e=(e=(e=r.converter._dispatch("tables.before",e,t,r)).replace(/\\(\|)/g,i.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,s)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,s),r.converter._dispatch("tables.after",e,t,r)):e}),i.subParser("underline",function(e,t,r){return t.underline?(e=r.converter._dispatch("underline.before",e,t,r),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return""+t+" "})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return""+t+" "}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?""+t+" ":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?""+t+" ":e})).replace(/(_)/g,i.helper.escapeCharactersCallback),e=r.converter._dispatch("underline.after",e,t,r)):e}),i.subParser("unescapeSpecialChars",function(e,t,r){return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,function(e,t){var r=parseInt(t);return String.fromCharCode(r)}),r.converter._dispatch("unescapeSpecialChars.after",e,t,r)}),i.subParser("makeMarkdown.blockquote",function(e,t){var r="";if(e.hasChildNodes())for(var a=e.childNodes,n=a.length,o=0;o "+(r=r.trim()).split("\n").join("\n> ")}),i.subParser("makeMarkdown.codeBlock",function(e,t){var r=e.getAttribute("language"),a=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[a]+"\n```"}),i.subParser("makeMarkdown.codeSpan",function(e){return"`"+e.innerHTML+"`"}),i.subParser("makeMarkdown.emphasis",function(e,t){var r="";if(e.hasChildNodes()){r+="*";for(var a=e.childNodes,n=a.length,o=0;o",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),i.subParser("makeMarkdown.links",function(e,t){var r="";if(e.hasChildNodes()&&e.hasAttribute("href")){var a=e.childNodes,n=a.length;r="[";for(var o=0;o",e.hasAttribute("title")&&(r+=' "'+e.getAttribute("title")+'"'),r+=")"}return r}),i.subParser("makeMarkdown.list",function(e,t,r){var a="";if(!e.hasChildNodes())return"";for(var n=e.childNodes,o=n.length,s=e.getAttribute("start")||1,l=0;l"+t.preList[r]+""}),i.subParser("makeMarkdown.strikethrough",function(e,t){var r="";if(e.hasChildNodes()){r+="~~";for(var a=e.childNodes,n=a.length,o=0;otr>th"),l=e.querySelectorAll("tbody>tr");for(r=0;rp&&(p=g)}for(r=0;r/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}),e.exports?e.exports=i:this.showdown=i}).call(t)}),he={pangu:n,minimatch:H,beautify:te,style:le,rdability:ue,markdown:Object.freeze({default:de,__moduleExports:de})};e.Plugin=function(e){return void 0==e?he:he[e]},Object.defineProperty(e,"__esModule",{value:!0})});
diff --git a/src/vender/puread/puread.min.js b/src/vender/puread/puread.min.js
index 1d2cb1b03..910e13590 100644
--- a/src/vender/puread/puread.min.js
+++ b/src/vender/puread/puread.min.js
@@ -1 +1 @@
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.PureRead=e()}(this,function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},e=function(){function t(t,e){for(var r=0;r?$|<[^/][-_a-zA-Z0-9]+>?$/gi);return e&&e.length>0?[1,e]:[-1,void 0]}function c(t){var e=s(t),r=a(e,2),n=r[0],i=r[1];if(2==n)return t;if(1==n){var o=i[0].trim().replace(/['"<>]/g,"").replace(/ /gi,"=").split("="),l=a(o,3),u=l[0],c=l[1],h=l[2];return c?"class"===c.toLowerCase()?c=u+"."+h:"id"===c.toLowerCase()&&(c=u+"#"+h):c=u,c}return null}function h(t){return/^(\[\[)[\[{'/]{1}[ \S]+[}'/\]]\]\]{1}($)/g.test(t)}function d(t){var e=[t.replace(/(^)\[\[|\]\]$/g,"")],r=e[0],n=e[1];switch(r[0]){case"{":r=r.replace(/^{|}$/g,""),t=new Function("return "+r)(),n=0;break;case"'":t=(t=r.replace(/^'|'$/g,"")).match(/^<[a-zA-Z0-9_-]+>/g).join("").replace(/<|>/g,"")+":contains("+t.replace(/<[/a-zA-Z0-9_-]+>/g,"")+")",n=1;break;case"/":t=r.replace(/^\/|\/$/g,"").replace(/\\{2}/g,"\\").replace(/'/g,'"'),n=2;break;case"[":r=r.replace(/^{|}$/g,""),t=new Function("return "+r)()[0],n=3;break;default:n=-1}return[t,n]}var f={url:"",target:"",matching:[],name:"",title:"",desc:"",exclude:[],include:"",avatar:[],paging:[]},p=void 0,m=void 0,v=void 0,g=void 0,y=function(){function n(){var e,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{global:[],custom:[],local:[]};t(this,n),this.url=(r=(e="/"!=(e=window.location.pathname)&&e.endsWith("/")?e=e.replace(/\/$/,""):e).replace(/\/[%@#.~a-zA-Z0-9_-]+$|^\/$/g,""),window.location.protocol+"//"+window.location.hostname+r+"/"),this.sites=i,this.current={},this.state="none",this.origins=[],this.mathjax=void 0,g=location.href}return e(n,[{key:"SetURL",value:function(t){var e,r=u(t),n=(e="/"!=(e=r.pathname)&&e.endsWith("/")?e=e.replace(/\/$/,""):e).replace(/\/[%@#.~a-zA-Z0-9_-]+$|^\/$/g,"");this.url=r.protocol+"//"+r.hostname+n+"/",g=t}},{key:"SetMinimatch",value:function(t){p=t}},{key:"SetRdability",value:function(t){m=t}},{key:"SetMarkdown",value:function(t){v=t}},{key:"isMathJax",value:function(){var t=this;return void 0==this.mathjax&&(this.mathjax=!1,$("body").find("script").each(function(e,r){r.type.startsWith("math")&&(t.mathjax=!0)})),this.mathjax}},{key:"MathJaxMode",value:function(){var t=b();if(-1!=t)return this.Newsite("read",t[0].outerHTML),this.dom=t[0],this.state="temp",t;var e=w();if(e&&""!=e.content){var r=_(e.content),n=r.id,i=r.cls,a=r.tag;return""!=n?"<"+a+' id="'+n+'">':""!=i?"<"+a+' class="'+i+'">':void 0}}},{key:"Readability",value:function(){try{var t=w();if(!t||""==t.content)throw"Readability error";this.Newsite("read",t.content);var e=_(t.wrap),r=e.id,n=e.cls,i=e.tag;this.dom=""!=r?$("body").find("#"+r)[0]:""!=n?$("body").find("."+n.replace(/ /gi,"."))[0]:$("body").find(""+i)[0],this.state="temp"}catch(t){var a=b();-1!=a?(this.Newsite("read",a[0].outerHTML),this.dom=a[0],this.state="temp"):this.current.site=l(f)}}},{key:"Getsite",value:function(t,e){return this.sites[t].find(function(t){return t[0]==e})}},{key:"Getsites",value:function(){var t=this,e=[],n=function(){if(p(location.href,"file://**/*.txt")||p(location.href,"http*://**/*.txt"))return function(){var t=location.pathname.split("/").pop(),e="file:"==location.protocol?"local":"remote",r={name:"txtread::"+e,title:"",desc:"",include:"",auto:!1,exclude:[]};"remote"==e&&(r.include="",r.html=$("body pre").html().replace(/\n/gi," "));return!$("title").html()&&$("head").append(""+decodeURI(t.replace(".txt",""))+" "),r}();if($($("body").children()[0]).is("pre")&&(p(location.href,"file://**/*.md")||p(location.href,"http*://**/*.md")))return function(){var t=location.pathname.split("/").pop(),e={name:"txtread::"+("file:"==location.protocol?"local":"remote"),title:"",desc:"",include:"",auto:!1,exclude:[]},r=(new v.default.Converter).makeHtml($("body pre").text());return e.html=r,!$("title").html()&&$("head").append(""+decodeURI(t.replace(".md",""))+" "),e}();var t=/<\S+ (class|id)=("|')?[\w-_=;:' ]+("|')?>?$|<[^/][-_a-zA-Z0-9]+>?$/gi,e={name:$("meta[name='simpread:name']").attr("content"),url:$("meta[name='simpread:url']").attr("content"),title:$("meta[name='simpread:title']").attr("content"),desc:$("meta[name='simpread:desc']").attr("content"),include:$("meta[name='simpread:include']").attr("content"),exp:$("meta[name='simpread:exclude']").attr("content"),auto:$("meta[name='simpread:auto']").attr("content"),exclude:[]};if(e.name&&e.include){if(e.url&&!p(location.href,e.url))return;!e.title&&(e.title=""),!e.desc&&(e.desc=""),!e.exp&&(e.exp=""),e.name="metaread::"+e.name,e.auto="true"==e.auto;var r=["title","desc","include","exp"].findIndex(function(r){return""!=e[r]&&!e[r].match(t)});return e.exclude.push(e.exp),delete e.exp,-1==r?e:void 0}return}();if(this.current.url=this.url,n)this.current.auto=n.auto,this.current.url=n.url,delete n.auto,delete n.url,this.current.site=r({},n),this.current.site.name.startsWith("metaread::")&&(this.state="meta"),this.current.site.name.startsWith("txtread::")&&(this.state="txt");else if(x("local",new Map(this.sites.local),this.url,e),x("global",new Map(this.sites.global),this.url,e),x("person",new Map(this.sites.person),this.url,e),x("custom",new Map(this.sites.custom),this.url,e),e.length>0){var i=void 0;if(e.forEach(function(e){e[1].active&&(i=e,t.current.url=i[0],t.current.site=t.Safesite(r({},i[1]),i[2],i[0]),t.state="adapter")}),!i){var a=e[0];a[1].active=!0,this.current.url=a[0],this.current.site=this.Safesite(r({},a[1]),a[2],a[0]),this.state="adapter"}}else{var o=function(){if(location.pathname.includes("thread")||location.pathname.includes("forum.php")){if($(".t_f").length>0&&$(".favatar").find(".authi").length>0&&$(".avatar").find("img").length>0)return{avatar:[{name:"[[{$('.favatar').find('.authi')}]]"},{url:"[[{$('.avatar').find('img')}]]"}],include:"[[{$('.t_f')}]]"}}else if(/\/t\/[\w-]+\/\d+/.test(location.pathname)&&$("meta[name=generator]").attr("content").includes("discourse"))return{avatar:[{name:"[[{$('.topic-avatar').find('.a[data-user-card]')}]]"},{url:"[[{$('.topic-avatar').find('img')}]]"}],include:"[[{$('.cooked')}]]"};return-1}();-1!=o?(this.Newmultisite("read",o),this.state="temp"):this.Readability()}this.current.site.matching=e}},{key:"Addsites",value:function(t){var e=0;if(0==this.sites.global.length)this.sites.global=this.Formatsites(t),e=this.sites.global.length;else{var r=function(t,e){var r=new Map(e),n=[].concat(o(r.keys())),i=0;return t.map(function(t){n.includes(t[0])?n.includes(t[0]):i++}),{count:i,newsites:t}}(this.Formatsites(t),this.sites.global);e=r.count,this.sites.global=r.newsites}return e}},{key:"Addlocalsites",value:function(t){return this.sites.local=[].concat(o(t)),this.sites.local}},{key:"Addallsites",value:function(t){return this.sites={global:[].concat(o(t.global)),person:[].concat(o(t.person)),custom:[].concat(o(t.custom)),local:[].concat(o(t.local))},this.sites}},{key:"Newsite",value:function(t,e){var n={mode:t,url:window.location.href,site:{name:"tempread::"+window.location.host,title:"",desc:"",include:"",exclude:[]}};e&&(n.site.html=e),this.current.mode=n.mode,this.current.url=n.url,this.current.site=this.Safesite(r({},n.site),"local",n.url)}},{key:"Newmultisite",value:function(t,e){var n={mode:t,url:window.location.href,site:{name:"tempread::"+window.location.host,title:"",desc:"",include:e.include,exclude:[],avatar:e.avatar}};this.current.mode=n.mode,this.current.url=n.url,this.current.site=this.Safesite(r({},n.site),"local",n.url)}},{key:"Updatesite",value:function(t,e,r){var n=this.sites[t].findIndex(function(t){return t[0]==e});-1==n&&(n=this.sites[t].length),this.sites[t].splice(n,1,r)}},{key:"Deletesite",value:function(t,e,r){var n=this.sites[t].findIndex(function(t){return t[0]==e});-1!=n&&this.sites[t].splice(n,1),r(n)}},{key:"Safesite",value:function(t,e,r){return t.url=r,t.target=e,""==t.name&&(t.name="tempread::"),(!t.avatar||0==t.avatar.length)&&(t.avatar=[{name:""},{url:""}]),(!t.paging||0==t.paging.length)&&(t.paging=[{prev:""},{next:""}]),t}},{key:"Cleansite",value:function(t){return delete t.url,delete t.html,delete t.target,delete t.matching,t.avatar&&t.avatar.length>0&&""==t.avatar[0].name&&delete t.avatar,t.paging&&t.paging.length>0&&""==t.paging[0].prev&&delete t.paging,t}},{key:"Formatsites",value:function(t){var e=new Map,r=!0,n=!1,i=void 0;try{for(var a,l=t.sites[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;if(0==k(u)){var s=u.url;delete u.url,e.set(s,u)}}}catch(t){n=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(n)throw i}}return[].concat(o(e))}},{key:"Clearsites",value:function(t){t?this.sites[t]=[]:this.sites={global:[],custom:[],local:[]}}},{key:"Origins",value:function(t){var e=t.origins.map(function(t){return t.url});return(e=new Set(this.origins.concat(e))).forEach(function(t){""!=t.trim()&&t.trim().startsWith("http")&&t.trim().endsWith(".json")||e.delete(t)}),this.origins=[].concat(o(e)),this.origins}},{key:"Addorigins",value:function(t){return this.sites.custom=[].concat(o(t)),this.sites.custom}},{key:"Clearorigins",value:function(){var t=this.sites.custom.length;return this.sites.custom=[],t}}]),n}();function b(){var t=$("body"),e=!0,r=!1,n=void 0;try{for(var i,a=["[itemprop='articleBody']","article",".post-content",".entry-content",".post-article",".content-post",".article-entry",".article-content",".article-body",".markdown-body",".post",".content"][Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value,l=t.find(o);if(l.length>0)return l}}catch(t){r=!0,n=t}finally{try{!e&&a.return&&a.return()}finally{if(r)throw n}}return-1}function w(){var t=document.location,e=(t.href,t.host,t.protocol,t.host,t.protocol.substr(0,t.protocol.indexOf(":")),t.protocol,t.host,t.pathname.substr(0,t.pathname.lastIndexOf("/")+1),new m.Readability(document.cloneNode(!0)).parse());return e}function x(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=function(t){var e=t.replace("www.","").match(/\.\S+\.\S+/g);return e?e[0].substr(1):t.replace("www.","")},a=u(g),s=[].concat(o(e.keys())),c=r.match(/[.a-zA-z0-9-_]+/g)[1].replace("www.",""),h=i(a.hostname),d=function(){return"/"==a.pathname||/\/(default|index|portal).[0-9a-zA-Z]+$/.test(a.pathname)},f=!0,m=!1,v=void 0;try{for(var y,b=s[Symbol.iterator]();!(f=(y=b.next()).done);f=!0){var w=y.value,$=e.get(w).name,x=i($);d()||w.endsWith("*")||w.replace(/^http[s]?:/,"")!=r.replace(/^http[s]?:/,"")?w.match(/\*/g)&&1==w.match(/\*/g).length&&!d()&&w.endsWith("*")&&c.includes(x)&&h==x&&r.includes($)?n.push([w,l(e.get(w)),t]):p(a.origin+a.pathname,w)&&n.push([w,l(e.get(w)),t]):n.push([w,l(e.get(w)),t])}}catch(t){m=!0,v=t}finally{try{!f&&b.return&&b.return()}finally{if(m)throw v}}}function k(t){if(!t.name||!t.url||!t.include)return-1;if(-1==s(t.title)[0]||-1==s(t.include)[0]||-1==s(t.desc)[0])return-2;if(t.paging){if(2!=t.paging.length)return-3;if(!t.paging[0].prev)return-4;if(!t.paging[1].next)return-5;if(-1==s(t.paging[0].prev)[0]||-1==s(t.paging[1].next)[0])return-6}if(t.avatar){if(2!=t.avatar.length)return-7;if(!t.avatar[0].name)return-8;if(!t.avatar[1].url)return-9;if(-1==s(t.avatar[0].name)[0]||-1==s(t.avatar[1].url)[0])return-10}return 0}function _(t){var e=t.replace('',""),r=$(e)[0],n=r.outerHTML.replace(r.innerHTML,""),i=$(n)[0],a=i.tagName.toLowerCase(),o=i.className;return{id:i.id,cls:o,tag:a}}function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",r=$("html");if(h(t)){var n=d(t),i=a(n,2),o=i[0],l=i[1];0==l?t=o:3==l&&(t=O(r.find(o)))}else"html"==e?t=O(r.find(t)):"multi"==e||(t=r.find(t).text().trim());return t}function O(t){var e="";switch(t.length){case 0:e="
";break;case 1:e=t.html().trim();break;default:e=t.map(function(t,e){return $(e).html()}).get().join("
")}return e}return function(r){function o(e){t(this,o);var r=i(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return r.version="0.0.4 build 0503",r.org_url=location.href,r.html={},r.plugin={},r.pure=!1,r.cleanup=!1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,y),e(o,[{key:"Exist",value:function(){return this.org_url==location.href}},{key:"AddPlugin",value:function(t){this.plugin={minimatch:t.minimatch,pangu:t.pangu,beautify:t.beautify,stylesheet:t.style,rdability:t.rdability,markdown:t.markdown},n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"SetMinimatch",this).call(this,this.plugin.minimatch),n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"SetRdability",this).call(this,this.plugin.rdability),n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"SetMarkdown",this).call(this,this.plugin.markdown)}},{key:"ReadMode",value:function(){var t,e,r,n,i;this.html=(t=this.current.site,e=l(t),r=c(""==t.title?"
":t.title),n=c(t.desc),i=c(t.include),e.title=""==t.title||""==t.title?$("head title").text():j(r),e.desc=j(n),e.include=""==t.include&&""!=t.html?t.html:j(i,"html"),e.avatar&&e.avatar.length>0&&""==e.avatar[0].name&&delete e.avatar,e.paging&&e.paging.length>0&&""==e.paging[0].prev&&delete e.paging,e.avatar&&e.avatar.forEach(function(t){var e=Object.keys(t).join(),r=t[e];t[e]=j(c(r),"html")}),e.paging&&e.paging.forEach(function(t){var e=Object.keys(t).join(),r=t[e];t[e]=j(c(r))}),e)}},{key:"TempMode",value:function(t,e){this.state="temp",this.dom=e,this.Newsite(t,e.outerHTML)}},{key:"GetDom",value:function(t,e){return j(c(t),e)}},{key:"Include",value:function(){var t=this.current.site.include,e=[],r=c(t);try{if(h(r)){var n=d(t),i=a(n,2),o=i[0],l=i[1];0==l?(t=t.replace(/\[\[{\$\(|}\]\]|\).html\(\)/g,""),e=$(d("[[["+t+"]]]")[0])):3==l&&(e=o)}else r&&(e=$("body").find(r))}catch(t){}return e}},{key:"Exclude",value:function(t){return function(t,e){var r=[],n="",i=!0,o=!1,l=void 0;try{for(var u,s=e[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var f=u.value;if(h(f)){var p=d(f),m=a(p,2),v=m[0],g=m[1];if(1==g)n=v;else if(2==g){var y=t.html().match(new RegExp(v,"g"));if(y&&y.length>0){var b=y.join("");n="*["+b+"]"}else n=void 0}else 3==g&&v.remove()}else n=c(f);n&&r.push(n)}}catch(t){o=!0,l=t}finally{try{!i&&s.return&&s.return()}finally{if(o)throw l}}return r.join(",")}(t,this.current.site.exclude)}},{key:"Beautify",value:function(t){this.plugin.beautify&&(this.cleanup&&this.plugin.beautify.cleanHTML(t,this.pure,this.isMathJax()),this.plugin.beautify.specbeautify(this.current.site.name,t),this.plugin.beautify.removeSpareTag(this.current.site.name,t),this.plugin.beautify.htmlbeautify(t),this.plugin.beautify.commbeautify(this.current.site.name,t))}},{key:"Format",value:function(t){this.plugin.pangu&&this.plugin.pangu.spacingElementByClassName(t)}}]),o}()});
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.PureRead=e()}(this,function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},e=function(){function t(t,e){for(var r=0;r?$|<[^/][-_a-zA-Z0-9]+>?$/gi);return e&&e.length>0?[1,e]:[-1,void 0]}function c(t){var e=s(t),r=i(e,2),n=r[0],a=r[1];if(2==n)return t;if(1==n){var o=a[0].trim().replace(/['"<>]/g,"").replace(/ /gi,"=").split("="),l=i(o,3),u=l[0],c=l[1],h=l[2];return c?"class"===c.toLowerCase()?c=u+"."+h:"id"===c.toLowerCase()&&(c=u+"#"+h):c=u,c}return null}function h(t){return/^(\[\[)[\[{`'/]{1}[ \S]+[}`'/\]]\]\]{1}($)/g.test(t)}function d(t){var e=[t.replace(/(^)\[\[|\]\]$/g,"")],r=e[0],n=e[1];switch(r[0]){case"{":r=r.replace(/^{|}$/g,""),t=new Function("return "+r)(),n=0;break;case"'":t=(t=r.replace(/^'|'$/g,"")).match(/^<[a-zA-Z0-9_-]+>/g).join("").replace(/<|>/g,"")+":contains("+t.replace(/<[/a-zA-Z0-9_-]+>/g,"")+")",n=1;break;case"/":t=r.replace(/^\/|\/$/g,"").replace(/\\{2}/g,"\\").replace(/'/g,'"'),n=2;break;case"[":r=r.replace(/^{|}$/g,""),t=new Function("return "+r)()[0],n=3;break;case"`":r=p(r=r.replace(/^`|`$/g,"")),t=$(r),n=4;break;default:n=-1}return[t,n]}function f(t){try{if(""!=t.id)return void 0==t.id?"":"//*[@id='"+t.id+"']";if(t===document.body)return"/html[1]/"+t.tagName.toLowerCase();for(var e=0,r=t.parentNode.childNodes,n=0;n0&&void 0!==arguments[0]?arguments[0]:{global:[],custom:[],local:[]};t(this,n),this.url=(r=(e="/"!=(e=window.location.pathname)&&e.endsWith("/")?e=e.replace(/\/$/,""):e).replace(/\/[%@#.~a-zA-Z0-9_-]+$|^\/$/g,""),window.location.protocol+"//"+window.location.hostname+r+"/"),this.sites=a,this.current={},this.state="none",this.origins=[],this.mathjax=void 0,b=location.href}return e(n,[{key:"SetURL",value:function(t){var e,r=u(t),n=(e="/"!=(e=r.pathname)&&e.endsWith("/")?e=e.replace(/\/$/,""):e).replace(/\/[%@#.~a-zA-Z0-9_-]+$|^\/$/g,"");this.url=r.protocol+"//"+r.hostname+n+"/",b=t}},{key:"SetMinimatch",value:function(t){v=t}},{key:"SetRdability",value:function(t){g=t}},{key:"SetMarkdown",value:function(t){y=t}},{key:"isMathJax",value:function(){var t=this;return void 0==this.mathjax&&(this.mathjax=!1,$("body").find("script").each(function(e,r){r.type.startsWith("math")&&(t.mathjax=!0)})),this.mathjax}},{key:"MathJaxMode",value:function(){var t=x();if(-1!=t)return this.Newsite("read",t[0].outerHTML),this.dom=t[0],this.state="temp",t;var e=k();if(e&&""!=e.content){var r=j(e.content),n=r.id,a=r.cls,i=r.tag;return""!=n?"<"+i+' id="'+n+'">':""!=a?"<"+i+' class="'+a+'">':void 0}}},{key:"Readability",value:function(){try{var t=k();if(!t||""==t.content)throw"Readability error";this.Newsite("read",t.content,t.excerpt);var e=j(t.wrap),r=e.id,n=e.cls,a=e.tag;this.dom=""!=r?$("body").find("#"+r)[0]:""!=n?$("body").find("."+n.replace(/ /gi,"."))[0]:$("body").find(""+a)[0],this.state="temp"}catch(t){var i=x();-1!=i?(this.Newsite("read",i[0].outerHTML),this.dom=i[0],this.state="temp"):this.current.site=l(m)}}},{key:"Getsite",value:function(t,e){return this.sites[t].find(function(t){return t[0]==e})}},{key:"Getsites",value:function(){var t=this,e=[],n=function(){if(v(location.href,"file://**/*.txt")||v(location.href,"http*://**/*.txt"))return function(){var t=location.pathname.split("/").pop(),e="file:"==location.protocol?"local":"remote",r={name:"txtread::"+e,title:"",desc:"",include:"",auto:!1,exclude:[]};"remote"==e&&(r.include="",r.html=$("body pre").html().replace(/\n/gi," "));return!$("title").html()&&$("head").append(""+decodeURI(t.replace(".txt",""))+" "),r}();if($($("body").children()[0]).is("pre")&&(v(location.href,"file://**/*.md")||v(location.href,"http*://**/*.md")))return function(){var t=location.pathname.split("/").pop(),e={name:"txtread::"+("file:"==location.protocol?"local":"remote"),title:"",desc:"",include:"",auto:!1,exclude:[]},r=(new y.default.Converter).makeHtml($("body pre").text());return e.html=r,!$("title").html()&&$("head").append(""+decodeURI(t.replace(".md",""))+" "),e}();var t=/<\S+ (class|id)=("|')?[\w-_=;:' ]+("|')?>?$|<[^/][-_a-zA-Z0-9]+>?$/gi,e={name:$("meta[name='simpread:name']").attr("content"),url:$("meta[name='simpread:url']").attr("content"),title:$("meta[name='simpread:title']").attr("content"),desc:$("meta[name='simpread:desc']").attr("content"),include:$("meta[name='simpread:include']").attr("content"),exp:$("meta[name='simpread:exclude']").attr("content"),auto:$("meta[name='simpread:auto']").attr("content"),exclude:[]};if(e.name&&e.include){if(e.url&&!v(location.href,e.url))return;!e.title&&(e.title=""),!e.desc&&(e.desc=""),!e.exp&&(e.exp=""),e.name="metaread::"+e.name,e.auto="true"==e.auto;var r=["title","desc","include","exp"].findIndex(function(r){return""!=e[r]&&!e[r].match(t)});return e.exclude.push(e.exp),delete e.exp,-1==r?e:void 0}return}();if(this.current.url=this.url,n)this.current.auto=n.auto,this.current.url=n.url,delete n.auto,delete n.url,this.current.site=r({},n),this.current.site.name.startsWith("metaread::")&&(this.state="meta"),this.current.site.name.startsWith("txtread::")&&(this.state="txt");else if(_("local",new Map(this.sites.local),this.url,e),_("global",new Map(this.sites.global),this.url,e),_("person",new Map(this.sites.person),this.url,e),_("custom",new Map(this.sites.custom),this.url,e),e.length>0){var a=void 0;if(e.forEach(function(e){e[1].active&&(a=e,t.current.url=a[0],t.current.site=t.Safesite(r({},a[1]),a[2],a[0]),t.state="adapter")}),!a){var i=e[0];i[1].active=!0,this.current.url=i[0],this.current.site=this.Safesite(r({},i[1]),i[2],i[0]),this.state="adapter"}}else{var o=function(){if(location.pathname.includes("thread")||location.pathname.includes("forum.php")){if($(".t_f").length>0&&$(".favatar").find(".authi").length>0&&$(".avatar").find("img").length>0)return{avatar:[{name:"[[{$('.favatar').find('.authi')}]]"},{url:"[[{$('.avatar').find('img')}]]"}],include:"[[{$('.t_f')}]]"}}else if(/\/t\/[\w-]+\/\d+/.test(location.pathname)&&$("meta[name=generator]").attr("content").includes("discourse"))return{avatar:[{name:"[[{$('.topic-avatar').find('.a[data-user-card]')}]]"},{url:"[[{$('.topic-avatar').find('img')}]]"}],include:"[[{$('.cooked')}]]"};return-1}();-1!=o?(this.Newmultisite("read",o),this.state="temp"):this.Readability()}this.current.site.matching=e}},{key:"Addsites",value:function(t){var e=0;if(0==this.sites.global.length)this.sites.global=this.Formatsites(t),e=this.sites.global.length;else{var r=function(t,e){var r=new Map(e),n=[].concat(o(r.keys())),a=0;return t.map(function(t){n.includes(t[0])?n.includes(t[0]):a++}),{count:a,newsites:t}}(this.Formatsites(t),this.sites.global);e=r.count,this.sites.global=r.newsites}return e}},{key:"Addlocalsites",value:function(t){return this.sites.local=[].concat(o(t)),this.sites.local}},{key:"Addallsites",value:function(t){return this.sites={global:[].concat(o(t.global)),person:[].concat(o(t.person)),custom:[].concat(o(t.custom)),local:[].concat(o(t.local))},this.sites}},{key:"Newsite",value:function(t,e,n){var a={mode:t,url:window.location.href,site:{name:"tempread::"+window.location.host,title:"",desc:"[[{$('meta[name=Description]').attr('content')||$('meta[name=description]').attr('content')}]]",include:"",exclude:[]}};e&&(a.site.html=e),this.current.mode=a.mode,this.current.url=a.url,this.current.site=this.Safesite(r({},a.site),"local",a.url),n&&(this.current.site.excerpt=n)}},{key:"Newmultisite",value:function(t,e){var n={mode:t,url:window.location.href,site:{name:"tempread::"+window.location.host,title:"",desc:"",include:e.include,exclude:[],avatar:e.avatar}};this.current.mode=n.mode,this.current.url=n.url,this.current.site=this.Safesite(r({},n.site),"local",n.url)}},{key:"Updatesite",value:function(t,e,r){var n=this.sites[t].findIndex(function(t){return t[0]==e});-1==n&&(n=this.sites[t].length),this.sites[t].splice(n,1,r)}},{key:"Deletesite",value:function(t,e,r){var n=this.sites[t].findIndex(function(t){return t[0]==e});-1!=n&&this.sites[t].splice(n,1),r(n)}},{key:"Safesite",value:function(t,e,r){return t.url=r,t.target=e,""==t.name&&(t.name="tempread::"),(!t.avatar||0==t.avatar.length)&&(t.avatar=[{name:""},{url:""}]),(!t.paging||0==t.paging.length)&&(t.paging=[{prev:""},{next:""}]),t}},{key:"Cleansite",value:function(t){return delete t.url,delete t.html,delete t.target,delete t.matching,t.avatar&&t.avatar.length>0&&""==t.avatar[0].name&&delete t.avatar,t.paging&&t.paging.length>0&&""==t.paging[0].prev&&delete t.paging,t}},{key:"Formatsites",value:function(t){var e=new Map,r=!0,n=!1,a=void 0;try{for(var i,l=t.sites[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var u=i.value;if(0==O(u)){var s=u.url;delete u.url,e.set(s,u)}}}catch(t){n=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(n)throw a}}return[].concat(o(e))}},{key:"Clearsites",value:function(t){t?this.sites[t]=[]:this.sites={global:[],custom:[],local:[]}}},{key:"Origins",value:function(t){var e=t.origins.map(function(t){return t.url});return(e=new Set(this.origins.concat(e))).forEach(function(t){""!=t.trim()&&t.trim().startsWith("http")&&t.trim().endsWith(".json")||e.delete(t)}),this.origins=[].concat(o(e)),this.origins}},{key:"Addorigins",value:function(t){return this.sites.custom=[].concat(o(t)),this.sites.custom}},{key:"Clearorigins",value:function(){var t=this.sites.custom.length;return this.sites.custom=[],t}}]),n}();function x(){var t=$("body"),e=!0,r=!1,n=void 0;try{for(var a,i=["[itemprop='articleBody']","article",".post-content",".entry-content",".post-article",".content-post",".article-entry",".article-content",".article-body",".markdown-body",".post",".content"][Symbol.iterator]();!(e=(a=i.next()).done);e=!0){var o=a.value,l=t.find(o);if(l.length>0)return l}}catch(t){r=!0,n=t}finally{try{!e&&i.return&&i.return()}finally{if(r)throw n}}return-1}function k(){var t=document.location,e=(t.href,t.host,t.protocol,t.host,t.protocol.substr(0,t.protocol.indexOf(":")),t.protocol,t.host,t.pathname.substr(0,t.pathname.lastIndexOf("/")+1),new g.Readability(document.cloneNode(!0)).parse());return e}function _(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=function(t){var e=t.replace("www.","").match(/\.\S+\.\S+/g);return e?e[0].substr(1):t.replace("www.","")},i=u(b),s=[].concat(o(e.keys())),c=r.match(/[.a-zA-z0-9-_]+/g)[1].replace("www.",""),h=a(i.hostname),d=function(){return"/"==i.pathname||/\/(default|index|portal).[0-9a-zA-Z]+$/.test(i.pathname)},f=!0,p=!1,m=void 0;try{for(var g,y=s[Symbol.iterator]();!(f=(g=y.next()).done);f=!0){var w=g.value,x=e.get(w).name,$=a(x);d()||w.endsWith("*")||w.replace(/^http[s]?:/,"")!=r.replace(/^http[s]?:/,"")?w.match(/\*/g)&&1==w.match(/\*/g).length&&!d()&&w.endsWith("*")&&c.includes($)&&h==$&&r.includes(x)?n.push([w,l(e.get(w)),t]):v(i.origin+i.pathname,w)&&n.push([w,l(e.get(w)),t]):n.push([w,l(e.get(w)),t])}}catch(t){p=!0,m=t}finally{try{!f&&y.return&&y.return()}finally{if(p)throw m}}}function O(t){if(!t.name||!t.url||!t.include)return-1;if(-1==s(t.title)[0]||-1==s(t.include)[0]||-1==s(t.desc)[0])return-2;if(t.paging){if(2!=t.paging.length)return-3;if(!t.paging[0].prev)return-4;if(!t.paging[1].next)return-5;if(-1==s(t.paging[0].prev)[0]||-1==s(t.paging[1].next)[0])return-6}if(t.avatar){if(2!=t.avatar.length)return-7;if(!t.avatar[0].name)return-8;if(!t.avatar[1].url)return-9;if(-1==s(t.avatar[0].name)[0]||-1==s(t.avatar[1].url)[0])return-10}return 0}function j(t){var e=t.replace('',""),r=$(e)[0],n=r.outerHTML.replace(r.innerHTML,""),a=$(n)[0],i=a.tagName.toLowerCase(),o=a.className;return{id:a.id,cls:o,tag:i}}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",r=$("html");if(h(t)){var n=d(t),a=i(n,2),o=a[0],l=a[1];0==l?t=o:3==l?t=M(r.find(o)):4==l&&(t=o.html())}else"html"==e?t=M(r.find(t)):"multi"==e||(t=r.find(t).text().trim());return t}function M(t){var e="";switch(t.length){case 0:e="
";break;case 1:e=t.html().trim();break;default:e=t.map(function(t,e){return $(e).html()}).get().join("
")}return e}return function(r){function o(e){t(this,o);var r=a(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return r.version="0.0.4 build 0616",r.org_url=location.href,r.html={},r.plugin={},r.pure=!1,r.cleanup=!1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,w),e(o,[{key:"Exist",value:function(){return this.org_url==location.href}},{key:"AddPlugin",value:function(t){this.plugin={minimatch:t.minimatch,pangu:t.pangu,beautify:t.beautify,stylesheet:t.style,rdability:t.rdability,markdown:t.markdown},n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"SetMinimatch",this).call(this,this.plugin.minimatch),n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"SetRdability",this).call(this,this.plugin.rdability),n(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"SetMarkdown",this).call(this,this.plugin.markdown)}},{key:"ReadMode",value:function(){var t,e,r,n,a;this.html=(t=this.current.site,e=l(t),r=c(""==t.title?"
":t.title),n=c(t.desc),a=c(t.include),e.title=""==t.title||""==t.title?$("head title").text():S(r),e.desc=function(t){if(void 0==t)return t;var e=t.length,r=t.indexOf("。")+1;return e>100&&(t=r>0?t.substr(0,r):t.substr(0,101)+"......"),t}(t.excerpt?t.excerpt:S(n)),e.include=""==t.include&&""!=t.html?t.html:S(a,"html"),e.avatar&&e.avatar.length>0&&""==e.avatar[0].name&&delete e.avatar,e.paging&&e.paging.length>0&&""==e.paging[0].prev&&delete e.paging,e.avatar&&e.avatar.forEach(function(t){var e=Object.keys(t).join(),r=t[e];t[e]=S(c(r),"html")}),e.paging&&e.paging.forEach(function(t){var e=Object.keys(t).join(),r=t[e];t[e]=S(c(r))}),e)}},{key:"TempMode",value:function(t,e){this.state="temp",this.dom=e,this.Newsite(t,e.outerHTML)}},{key:"GetDom",value:function(t,e){return S(c(t),e)}},{key:"Include",value:function(){var t=this.current.site.include,e=[],r=c(t);try{if(h(r)){var n=d(t),a=i(n,2),o=a[0],l=a[1];0==l?(t=t.replace(/\[\[{\$\(|}\]\]|\).html\(\)/g,""),e=$(d("[[["+t+"]]]")[0])):3==l&&(e=o)}else r&&(e=$("body").find(r))}catch(t){}return e}},{key:"Exclude",value:function(t){return function(t,e){var r=[],n="",a=!0,o=!1,l=void 0;try{for(var u,s=e[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var f=u.value;if(h(f)){var p=d(f),m=i(p,2),v=m[0],g=m[1];if(1==g)n=v;else if(2==g){var y=t.html().match(new RegExp(v,"g"));if(y&&y.length>0){var b=y.join("");n="*["+b+"]"}else n=void 0}else 3==g?v.remove():4==g&&v.remove()}else n=c(f);n&&r.push(n)}}catch(t){o=!0,l=t}finally{try{!a&&s.return&&s.return()}finally{if(o)throw l}}return r.join(",")}(t,this.current.site.exclude)}},{key:"Beautify",value:function(t){0!=t.children().length&&this.plugin.beautify&&(this.cleanup&&this.plugin.beautify.cleanHTML(t,this.pure,this.isMathJax()),this.plugin.beautify.specbeautify(this.current.site.name,t),this.plugin.beautify.removeSpareTag(this.current.site.name,t),this.plugin.beautify.htmlbeautify(t),this.plugin.beautify.commbeautify(this.current.site.name,t))}},{key:"Format",value:function(t){this.plugin.pangu&&this.plugin.pangu.spacingElementByClassName(t)}},{key:"Utils",value:function(){return{dom2Xpath:f,xPath2Dom:p}}}]),o}()});
diff --git a/src/vender/turndown/turndown-plugin-gfm.js b/src/vender/turndown/turndown-plugin-gfm.js
new file mode 100644
index 000000000..ed53990f8
--- /dev/null
+++ b/src/vender/turndown/turndown-plugin-gfm.js
@@ -0,0 +1,167 @@
+var turndownPluginGfm = (function (exports) {
+'use strict';
+
+var highlightRegExp = /highlight-(?:text|source)-([a-z0-9]+)/;
+
+function highlightedCodeBlock (turndownService) {
+ turndownService.addRule('highlightedCodeBlock', {
+ filter: function (node) {
+ var firstChild = node.firstChild;
+ return (
+ node.nodeName === 'DIV' &&
+ highlightRegExp.test(node.className) &&
+ firstChild &&
+ firstChild.nodeName === 'PRE'
+ )
+ },
+ replacement: function (content, node, options) {
+ var className = node.className || '';
+ var language = (className.match(highlightRegExp) || [null, ''])[1];
+
+ return (
+ '\n\n' + options.fence + language + '\n' +
+ node.firstChild.textContent +
+ '\n' + options.fence + '\n\n'
+ )
+ }
+ });
+}
+
+function strikethrough (turndownService) {
+ turndownService.addRule('strikethrough', {
+ filter: ['del', 's', 'strike'],
+ replacement: function (content) {
+ return '~' + content + '~'
+ }
+ });
+}
+
+var indexOf = Array.prototype.indexOf;
+var every = Array.prototype.every;
+var rules = {};
+
+rules.tableCell = {
+ filter: ['th', 'td'],
+ replacement: function (content, node) {
+ return cell(content, node)
+ }
+};
+
+rules.tableRow = {
+ filter: 'tr',
+ replacement: function (content, node) {
+ var borderCells = '';
+ var alignMap = { left: ':--', right: '--:', center: ':-:' };
+
+ if (isHeadingRow(node)) {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ var border = '---';
+ var align = (
+ node.childNodes[i].getAttribute('align') || ''
+ ).toLowerCase();
+
+ if (align) border = alignMap[align] || border;
+
+ borderCells += cell(border, node.childNodes[i]);
+ }
+ }
+ return '\n' + content + (borderCells ? '\n' + borderCells : '')
+ }
+};
+
+rules.table = {
+ // Only convert tables with a heading row.
+ // Tables with no heading row are kept using `keep` (see below).
+ filter: function (node) {
+ return node.nodeName === 'TABLE' && isHeadingRow(node.rows[0])
+ },
+
+ replacement: function (content) {
+ // Ensure there are no blank lines
+ content = content.replace('\n\n', '\n');
+ return '\n\n' + content + '\n\n'
+ }
+};
+
+rules.tableSection = {
+ filter: ['thead', 'tbody', 'tfoot'],
+ replacement: function (content) {
+ return content
+ }
+};
+
+// A tr is a heading row if:
+// - the parent is a THEAD
+// - or if its the first child of the TABLE or the first TBODY (possibly
+// following a blank THEAD)
+// - and every cell is a TH
+function isHeadingRow (tr) {
+ var parentNode = tr.parentNode;
+ return (
+ parentNode.nodeName === 'THEAD' ||
+ (
+ parentNode.firstChild === tr &&
+ (parentNode.nodeName === 'TABLE' || isFirstTbody(parentNode)) &&
+ every.call(tr.childNodes, function (n) { return n.nodeName === 'TH' })
+ )
+ )
+}
+
+function isFirstTbody (element) {
+ var previousSibling = element.previousSibling;
+ return (
+ element.nodeName === 'TBODY' && (
+ !previousSibling ||
+ (
+ previousSibling.nodeName === 'THEAD' &&
+ /^\s*$/i.test(previousSibling.textContent)
+ )
+ )
+ )
+}
+
+function cell (content, node) {
+ var index = indexOf.call(node.parentNode.childNodes, node);
+ var prefix = ' ';
+ if (index === 0) prefix = '| ';
+ return prefix + content + ' |'
+}
+
+function tables (turndownService) {
+ turndownService.keep(function (node) {
+ return node.nodeName === 'TABLE' && !isHeadingRow(node.rows[0])
+ });
+ for (var key in rules) turndownService.addRule(key, rules[key]);
+}
+
+function taskListItems (turndownService) {
+ turndownService.addRule('taskListItems', {
+ filter: function (node) {
+ return node.type === 'checkbox' && node.parentNode.nodeName === 'LI'
+ },
+ replacement: function (content, node) {
+ return (node.checked ? '[x]' : '[ ]') + ' '
+ }
+ });
+}
+
+function gfm (turndownService) {
+ turndownService.use([
+ highlightedCodeBlock,
+ strikethrough,
+ tables,
+ taskListItems
+ ]);
+}
+
+exports.gfm = gfm;
+exports.highlightedCodeBlock = highlightedCodeBlock;
+exports.strikethrough = strikethrough;
+exports.tables = tables;
+exports.taskListItems = taskListItems;
+
+return exports;
+
+}({}));
+
+module.exports = turndownPluginGfm;
\ No newline at end of file
diff --git a/src/vender/turndown/turndown.js b/src/vender/turndown/turndown.js
new file mode 100644
index 000000000..c6411f9a1
--- /dev/null
+++ b/src/vender/turndown/turndown.js
@@ -0,0 +1,912 @@
+var TurndownService = (function () {
+'use strict';
+
+function extend (destination) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+ for (var key in source) {
+ if (source.hasOwnProperty(key)) destination[key] = source[key];
+ }
+ }
+ return destination
+}
+
+function repeat (character, count) {
+ return Array(count + 1).join(character)
+}
+
+var blockElements = [
+ 'address', 'article', 'aside', 'audio', 'blockquote', 'body', 'canvas',
+ 'center', 'dd', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption',
+ 'figure', 'footer', 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
+ 'header', 'hgroup', 'hr', 'html', 'isindex', 'li', 'main', 'menu', 'nav',
+ 'noframes', 'noscript', 'ol', 'output', 'p', 'pre', 'section', 'table',
+ 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul'
+];
+
+function isBlock (node) {
+ return blockElements.indexOf(node.nodeName.toLowerCase()) !== -1
+}
+
+var voidElements = [
+ 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input',
+ 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'
+];
+
+function isVoid (node) {
+ return voidElements.indexOf(node.nodeName.toLowerCase()) !== -1
+}
+
+var voidSelector = voidElements.join();
+function hasVoid (node) {
+ return node.querySelector && node.querySelector(voidSelector)
+}
+
+var rules = {};
+
+rules.paragraph = {
+ filter: 'p',
+
+ replacement: function (content) {
+ return '\n\n' + content + '\n\n'
+ }
+};
+
+rules.lineBreak = {
+ filter: 'br',
+
+ replacement: function (content, node, options) {
+ return options.br + '\n'
+ }
+};
+
+rules.heading = {
+ filter: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
+
+ replacement: function (content, node, options) {
+ var hLevel = Number(node.nodeName.charAt(1));
+
+ if (options.headingStyle === 'setext' && hLevel < 3) {
+ var underline = repeat((hLevel === 1 ? '=' : '-'), content.length);
+ return (
+ '\n\n' + content + '\n' + underline + '\n\n'
+ )
+ } else {
+ return '\n\n' + repeat('#', hLevel) + ' ' + content + '\n\n'
+ }
+ }
+};
+
+rules.blockquote = {
+ filter: 'blockquote',
+
+ replacement: function (content) {
+ content = content.replace(/^\n+|\n+$/g, '');
+ content = content.replace(/^/gm, '> ');
+ return '\n\n' + content + '\n\n'
+ }
+};
+
+rules.list = {
+ filter: ['ul', 'ol'],
+
+ replacement: function (content, node) {
+ var parent = node.parentNode;
+ if (parent.nodeName === 'LI' && parent.lastElementChild === node) {
+ return '\n' + content
+ } else {
+ return '\n\n' + content + '\n\n'
+ }
+ }
+};
+
+rules.listItem = {
+ filter: 'li',
+
+ replacement: function (content, node, options) {
+ content = content
+ .replace(/^\n+/, '') // remove leading newlines
+ .replace(/\n+$/, '\n') // replace trailing newlines with just a single one
+ .replace(/\n/gm, '\n '); // indent
+ var prefix = options.bulletListMarker + ' ';
+ var parent = node.parentNode;
+ if (parent.nodeName === 'OL') {
+ var start = parent.getAttribute('start');
+ var index = Array.prototype.indexOf.call(parent.children, node);
+ prefix = (start ? Number(start) + index : index + 1) + '. ';
+ }
+ return (
+ prefix + content + (node.nextSibling && !/\n$/.test(content) ? '\n' : '')
+ )
+ }
+};
+
+rules.indentedCodeBlock = {
+ filter: function (node, options) {
+ return (
+ options.codeBlockStyle === 'indented' &&
+ node.nodeName === 'PRE' &&
+ node.firstChild &&
+ node.firstChild.nodeName === 'CODE'
+ )
+ },
+
+ replacement: function (content, node, options) {
+ return (
+ '\n\n ' +
+ node.firstChild.textContent.replace(/\n/g, '\n ') +
+ '\n\n'
+ )
+ }
+};
+
+rules.fencedCodeBlock = {
+ filter: function (node, options) {
+ return (
+ options.codeBlockStyle === 'fenced' &&
+ node.nodeName === 'PRE' &&
+ node.firstChild &&
+ node.firstChild.nodeName === 'CODE'
+ )
+ },
+
+ replacement: function (content, node, options) {
+ var className = node.firstChild.className || '';
+ var language = (className.match(/language-(\S+)/) || [null, ''])[1];
+
+ return (
+ '\n\n' + options.fence + language + '\n' +
+ node.firstChild.textContent +
+ '\n' + options.fence + '\n\n'
+ )
+ }
+};
+
+rules.horizontalRule = {
+ filter: 'hr',
+
+ replacement: function (content, node, options) {
+ return '\n\n' + options.hr + '\n\n'
+ }
+};
+
+rules.inlineLink = {
+ filter: function (node, options) {
+ return (
+ options.linkStyle === 'inlined' &&
+ node.nodeName === 'A' &&
+ node.getAttribute('href')
+ )
+ },
+
+ replacement: function (content, node) {
+ var href = node.getAttribute('href');
+ var title = node.title ? ' "' + node.title + '"' : '';
+ return '[' + content + '](' + href + title + ')'
+ }
+};
+
+rules.referenceLink = {
+ filter: function (node, options) {
+ return (
+ options.linkStyle === 'referenced' &&
+ node.nodeName === 'A' &&
+ node.getAttribute('href')
+ )
+ },
+
+ replacement: function (content, node, options) {
+ var href = node.getAttribute('href');
+ var title = node.title ? ' "' + node.title + '"' : '';
+ var replacement;
+ var reference;
+
+ switch (options.linkReferenceStyle) {
+ case 'collapsed':
+ replacement = '[' + content + '][]';
+ reference = '[' + content + ']: ' + href + title;
+ break
+ case 'shortcut':
+ replacement = '[' + content + ']';
+ reference = '[' + content + ']: ' + href + title;
+ break
+ default:
+ var id = this.references.length + 1;
+ replacement = '[' + content + '][' + id + ']';
+ reference = '[' + id + ']: ' + href + title;
+ }
+
+ this.references.push(reference);
+ return replacement
+ },
+
+ references: [],
+
+ append: function (options) {
+ var references = '';
+ if (this.references.length) {
+ references = '\n\n' + this.references.join('\n') + '\n\n';
+ this.references = []; // Reset references
+ }
+ return references
+ }
+};
+
+rules.emphasis = {
+ filter: ['em', 'i'],
+
+ replacement: function (content, node, options) {
+ if (!content.trim()) return ''
+ return options.emDelimiter + content + options.emDelimiter
+ }
+};
+
+rules.strong = {
+ filter: ['strong', 'b'],
+
+ replacement: function (content, node, options) {
+ if (!content.trim()) return ''
+ return options.strongDelimiter + content + options.strongDelimiter
+ }
+};
+
+rules.code = {
+ filter: function (node) {
+ var hasSiblings = node.previousSibling || node.nextSibling;
+ var isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings;
+
+ return node.nodeName === 'CODE' && !isCodeBlock
+ },
+
+ replacement: function (content) {
+ if (!content.trim()) return ''
+
+ var delimiter = '`';
+ var leadingSpace = '';
+ var trailingSpace = '';
+ var matches = content.match(/`+/gm);
+ if (matches) {
+ if (/^`/.test(content)) leadingSpace = ' ';
+ if (/`$/.test(content)) trailingSpace = ' ';
+ while (matches.indexOf(delimiter) !== -1) delimiter = delimiter + '`';
+ }
+
+ return delimiter + leadingSpace + content + trailingSpace + delimiter
+ }
+};
+
+rules.image = {
+ filter: 'img',
+
+ replacement: function (content, node) {
+ var alt = node.alt || '';
+ var src = node.getAttribute('src') || '';
+ var title = node.title || '';
+ var titlePart = title ? ' "' + title + '"' : '';
+ return src ? '![' + alt + ']' + '(' + src + titlePart + ')' : ''
+ }
+};
+
+/**
+ * Manages a collection of rules used to convert HTML to Markdown
+ */
+
+function Rules (options) {
+ this.options = options;
+ this._keep = [];
+ this._remove = [];
+
+ this.blankRule = {
+ replacement: options.blankReplacement
+ };
+
+ this.keepReplacement = options.keepReplacement;
+
+ this.defaultRule = {
+ replacement: options.defaultReplacement
+ };
+
+ this.array = [];
+ for (var key in options.rules) this.array.push(options.rules[key]);
+}
+
+Rules.prototype = {
+ add: function (key, rule) {
+ this.array.unshift(rule);
+ },
+
+ keep: function (filter) {
+ this._keep.unshift({
+ filter: filter,
+ replacement: this.keepReplacement
+ });
+ },
+
+ remove: function (filter) {
+ this._remove.unshift({
+ filter: filter,
+ replacement: function () {
+ return ''
+ }
+ });
+ },
+
+ forNode: function (node) {
+ if (node.isBlank) return this.blankRule
+ var rule;
+
+ if ((rule = findRule(this.array, node, this.options))) return rule
+ if ((rule = findRule(this._keep, node, this.options))) return rule
+ if ((rule = findRule(this._remove, node, this.options))) return rule
+
+ return this.defaultRule
+ },
+
+ forEach: function (fn) {
+ for (var i = 0; i < this.array.length; i++) fn(this.array[i], i);
+ }
+};
+
+function findRule (rules, node, options) {
+ for (var i = 0; i < rules.length; i++) {
+ var rule = rules[i];
+ if (filterValue(rule, node, options)) return rule
+ }
+ return void 0
+}
+
+function filterValue (rule, node, options) {
+ var filter = rule.filter;
+ if (typeof filter === 'string') {
+ if (filter === node.nodeName.toLowerCase()) return true
+ } else if (Array.isArray(filter)) {
+ if (filter.indexOf(node.nodeName.toLowerCase()) > -1) return true
+ } else if (typeof filter === 'function') {
+ if (filter.call(rule, node, options)) return true
+ } else {
+ throw new TypeError('`filter` needs to be a string, array, or function')
+ }
+}
+
+/**
+ * The collapseWhitespace function is adapted from collapse-whitespace
+ * by Luc Thevenard.
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014 Luc Thevenard
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/**
+ * collapseWhitespace(options) removes extraneous whitespace from an the given element.
+ *
+ * @param {Object} options
+ */
+function collapseWhitespace (options) {
+ var element = options.element;
+ var isBlock = options.isBlock;
+ var isVoid = options.isVoid;
+ var isPre = options.isPre || function (node) {
+ return node.nodeName === 'PRE'
+ };
+
+ if (!element.firstChild || isPre(element)) return
+
+ var prevText = null;
+ var prevVoid = false;
+
+ var prev = null;
+ var node = next(prev, element, isPre);
+
+ while (node !== element) {
+ if (node.nodeType === 3 || node.nodeType === 4) { // Node.TEXT_NODE or Node.CDATA_SECTION_NODE
+ var text = node.data.replace(/[ \r\n\t]+/g, ' ');
+
+ if ((!prevText || / $/.test(prevText.data)) &&
+ !prevVoid && text[0] === ' ') {
+ text = text.substr(1);
+ }
+
+ // `text` might be empty at this point.
+ if (!text) {
+ node = remove(node);
+ continue
+ }
+
+ node.data = text;
+
+ prevText = node;
+ } else if (node.nodeType === 1) { // Node.ELEMENT_NODE
+ if (isBlock(node) || node.nodeName === 'BR') {
+ if (prevText) {
+ prevText.data = prevText.data.replace(/ $/, '');
+ }
+
+ prevText = null;
+ prevVoid = false;
+ } else if (isVoid(node)) {
+ // Avoid trimming space around non-block, non-BR void elements.
+ prevText = null;
+ prevVoid = true;
+ }
+ } else {
+ node = remove(node);
+ continue
+ }
+
+ var nextNode = next(prev, node, isPre);
+ prev = node;
+ node = nextNode;
+ }
+
+ if (prevText) {
+ prevText.data = prevText.data.replace(/ $/, '');
+ if (!prevText.data) {
+ remove(prevText);
+ }
+ }
+}
+
+/**
+ * remove(node) removes the given node from the DOM and returns the
+ * next node in the sequence.
+ *
+ * @param {Node} node
+ * @return {Node} node
+ */
+function remove (node) {
+ var next = node.nextSibling || node.parentNode;
+
+ node.parentNode.removeChild(node);
+
+ return next
+}
+
+/**
+ * next(prev, current, isPre) returns the next node in the sequence, given the
+ * current and previous nodes.
+ *
+ * @param {Node} prev
+ * @param {Node} current
+ * @param {Function} isPre
+ * @return {Node}
+ */
+function next (prev, current, isPre) {
+ if ((prev && prev.parentNode === current) || isPre(current)) {
+ return current.nextSibling || current.parentNode
+ }
+
+ return current.firstChild || current.nextSibling || current.parentNode
+}
+
+/*
+ * Set up window for Node.js
+ */
+
+var root = (typeof window !== 'undefined' ? window : {});
+
+/*
+ * Parsing HTML strings
+ */
+
+function canParseHTMLNatively () {
+ var Parser = root.DOMParser;
+ var canParse = false;
+
+ // Adapted from https://gist.github.com/1129031
+ // Firefox/Opera/IE throw errors on unsupported types
+ try {
+ // WebKit returns null on unsupported types
+ if (new Parser().parseFromString('', 'text/html')) {
+ canParse = true;
+ }
+ } catch (e) {}
+
+ return canParse
+}
+
+function createHTMLParser () {
+ var Parser = function () {};
+
+ {
+ if (shouldUseActiveX()) {
+ Parser.prototype.parseFromString = function (string) {
+ var doc = new window.ActiveXObject('htmlfile');
+ doc.designMode = 'on'; // disable on-page scripts
+ doc.open();
+ doc.write(string);
+ doc.close();
+ return doc
+ };
+ } else {
+ Parser.prototype.parseFromString = function (string) {
+ var doc = document.implementation.createHTMLDocument('');
+ doc.open();
+ doc.write(string);
+ doc.close();
+ return doc
+ };
+ }
+ }
+ return Parser
+}
+
+function shouldUseActiveX () {
+ var useActiveX = false;
+ try {
+ document.implementation.createHTMLDocument('').open();
+ } catch (e) {
+ if (window.ActiveXObject) useActiveX = true;
+ }
+ return useActiveX
+}
+
+var HTMLParser = canParseHTMLNatively() ? root.DOMParser : createHTMLParser();
+
+function RootNode (input) {
+ var root;
+ if (typeof input === 'string') {
+ var doc = htmlParser().parseFromString(
+ // DOM parsers arrange elements in the and .
+ // Wrapping in a custom element ensures elements are reliably arranged in
+ // a single element.
+ '' + input + ' ',
+ 'text/html'
+ );
+ root = doc.getElementById('turndown-root');
+ } else {
+ root = input.cloneNode(true);
+ }
+ collapseWhitespace({
+ element: root,
+ isBlock: isBlock,
+ isVoid: isVoid
+ });
+
+ return root
+}
+
+var _htmlParser;
+function htmlParser () {
+ _htmlParser = _htmlParser || new HTMLParser();
+ return _htmlParser
+}
+
+function Node (node) {
+ node.isBlock = isBlock(node);
+ node.isCode = node.nodeName.toLowerCase() === 'code' || node.parentNode.isCode;
+ node.isBlank = isBlank(node);
+ node.flankingWhitespace = flankingWhitespace(node);
+ return node
+}
+
+function isBlank (node) {
+ return (
+ ['A', 'TH', 'TD', 'IFRAME', 'SCRIPT', 'AUDIO', 'VIDEO'].indexOf(node.nodeName) === -1 &&
+ /^\s*$/i.test(node.textContent) &&
+ !isVoid(node) &&
+ !hasVoid(node)
+ )
+}
+
+function flankingWhitespace (node) {
+ var leading = '';
+ var trailing = '';
+
+ if (!node.isBlock) {
+ var hasLeading = /^[ \r\n\t]/.test(node.textContent);
+ var hasTrailing = /[ \r\n\t]$/.test(node.textContent);
+
+ if (hasLeading && !isFlankedByWhitespace('left', node)) {
+ leading = ' ';
+ }
+ if (hasTrailing && !isFlankedByWhitespace('right', node)) {
+ trailing = ' ';
+ }
+ }
+
+ return { leading: leading, trailing: trailing }
+}
+
+function isFlankedByWhitespace (side, node) {
+ var sibling;
+ var regExp;
+ var isFlanked;
+
+ if (side === 'left') {
+ sibling = node.previousSibling;
+ regExp = / $/;
+ } else {
+ sibling = node.nextSibling;
+ regExp = /^ /;
+ }
+
+ if (sibling) {
+ if (sibling.nodeType === 3) {
+ isFlanked = regExp.test(sibling.nodeValue);
+ } else if (sibling.nodeType === 1 && !isBlock(sibling)) {
+ isFlanked = regExp.test(sibling.textContent);
+ }
+ }
+ return isFlanked
+}
+
+var reduce = Array.prototype.reduce;
+var leadingNewLinesRegExp = /^\n*/;
+var trailingNewLinesRegExp = /\n*$/;
+var escapes = [
+ [/\\/g, '\\\\'],
+ [/\*/g, '\\*'],
+ [/^-/g, '\\-'],
+ [/^\+ /g, '\\+ '],
+ [/^(=+)/g, '\\$1'],
+ [/^(#{1,6}) /g, '\\$1 '],
+ [/`/g, '\\`'],
+ [/^~~~/g, '\\~~~'],
+ [/\[/g, '\\['],
+ [/\]/g, '\\]'],
+ [/^>/g, '\\>'],
+ [/_/g, '\\_'],
+ [/^(\d+)\. /g, '$1\\. ']
+];
+escapes = [];
+
+function TurndownService (options) {
+ if (!(this instanceof TurndownService)) return new TurndownService(options)
+
+ var defaults = {
+ rules: rules,
+ headingStyle: 'setext',
+ hr: '* * *',
+ bulletListMarker: '*',
+ codeBlockStyle: 'indented',
+ fence: '```',
+ emDelimiter: '_',
+ strongDelimiter: '**',
+ linkStyle: 'inlined',
+ linkReferenceStyle: 'full',
+ br: ' ',
+ blankReplacement: function (content, node) {
+ return node.isBlock ? '\n\n' : ''
+ },
+ keepReplacement: function (content, node) {
+ return node.isBlock ? '\n\n' + node.outerHTML + '\n\n' : node.outerHTML
+ },
+ defaultReplacement: function (content, node) {
+ return node.isBlock ? '\n\n' + content + '\n\n' : content
+ }
+ };
+ this.options = extend({}, defaults, options);
+ this.rules = new Rules(this.options);
+}
+
+TurndownService.prototype = {
+ /**
+ * The entry point for converting a string or DOM node to Markdown
+ * @public
+ * @param {String|HTMLElement} input The string or DOM node to convert
+ * @returns A Markdown representation of the input
+ * @type String
+ */
+
+ turndown: function (input) {
+ if (!canConvert(input)) {
+ throw new TypeError(
+ input + ' is not a string, or an element/document/fragment node.'
+ )
+ }
+
+ if (input === '') return ''
+
+ var output = process.call(this, new RootNode(input));
+ return postProcess.call(this, output)
+ },
+
+ /**
+ * Add one or more plugins
+ * @public
+ * @param {Function|Array} plugin The plugin or array of plugins to add
+ * @returns The Turndown instance for chaining
+ * @type Object
+ */
+
+ use: function (plugin) {
+ if (Array.isArray(plugin)) {
+ for (var i = 0; i < plugin.length; i++) this.use(plugin[i]);
+ } else if (typeof plugin === 'function') {
+ plugin(this);
+ } else {
+ throw new TypeError('plugin must be a Function or an Array of Functions')
+ }
+ return this
+ },
+
+ /**
+ * Adds a rule
+ * @public
+ * @param {String} key The unique key of the rule
+ * @param {Object} rule The rule
+ * @returns The Turndown instance for chaining
+ * @type Object
+ */
+
+ addRule: function (key, rule) {
+ this.rules.add(key, rule);
+ return this
+ },
+
+ /**
+ * Keep a node (as HTML) that matches the filter
+ * @public
+ * @param {String|Array|Function} filter The unique key of the rule
+ * @returns The Turndown instance for chaining
+ * @type Object
+ */
+
+ keep: function (filter) {
+ this.rules.keep(filter);
+ return this
+ },
+
+ /**
+ * Remove a node that matches the filter
+ * @public
+ * @param {String|Array|Function} filter The unique key of the rule
+ * @returns The Turndown instance for chaining
+ * @type Object
+ */
+
+ remove: function (filter) {
+ this.rules.remove(filter);
+ return this
+ },
+
+ /**
+ * Escapes Markdown syntax
+ * @public
+ * @param {String} string The string to escape
+ * @returns A string with Markdown syntax escaped
+ * @type String
+ */
+
+ escape: function (string) {
+ return escapes.reduce(function (accumulator, escape) {
+ return accumulator.replace(escape[0], escape[1])
+ }, string)
+ }
+};
+
+/**
+ * Reduces a DOM node down to its Markdown string equivalent
+ * @private
+ * @param {HTMLElement} parentNode The node to convert
+ * @returns A Markdown representation of the node
+ * @type String
+ */
+
+function process (parentNode) {
+ var self = this;
+ return reduce.call(parentNode.childNodes, function (output, node) {
+ node = new Node(node);
+
+ var replacement = '';
+ if (node.nodeType === 3) {
+ replacement = node.isCode ? node.nodeValue : self.escape(node.nodeValue);
+ } else if (node.nodeType === 1) {
+ replacement = replacementForNode.call(self, node);
+ }
+
+ return join(output, replacement)
+ }, '')
+}
+
+/**
+ * Appends strings as each rule requires and trims the output
+ * @private
+ * @param {String} output The conversion output
+ * @returns A trimmed version of the ouput
+ * @type String
+ */
+
+function postProcess (output) {
+ var self = this;
+ this.rules.forEach(function (rule) {
+ if (typeof rule.append === 'function') {
+ output = join(output, rule.append(self.options));
+ }
+ });
+
+ return output.replace(/^[\t\r\n]+/, '').replace(/[\t\r\n\s]+$/, '')
+}
+
+/**
+ * Converts an element node to its Markdown equivalent
+ * @private
+ * @param {HTMLElement} node The node to convert
+ * @returns A Markdown representation of the node
+ * @type String
+ */
+
+function replacementForNode (node) {
+ var rule = this.rules.forNode(node);
+ var content = process.call(this, node);
+ var whitespace = node.flankingWhitespace;
+ if (whitespace.leading || whitespace.trailing) content = content.trim();
+ return (
+ whitespace.leading +
+ rule.replacement(content, node, this.options) +
+ whitespace.trailing
+ )
+}
+
+/**
+ * Determines the new lines between the current output and the replacement
+ * @private
+ * @param {String} output The current conversion output
+ * @param {String} replacement The string to append to the output
+ * @returns The whitespace to separate the current output and the replacement
+ * @type String
+ */
+
+function separatingNewlines (output, replacement) {
+ var newlines = [
+ output.match(trailingNewLinesRegExp)[0],
+ replacement.match(leadingNewLinesRegExp)[0]
+ ].sort();
+ var maxNewlines = newlines[newlines.length - 1];
+ return maxNewlines.length < 2 ? maxNewlines : '\n\n'
+}
+
+function join (string1, string2) {
+ var separator = separatingNewlines(string1, string2);
+
+ // Remove trailing/leading newlines and replace with separator
+ string1 = string1.replace(trailingNewLinesRegExp, '');
+ string2 = string2.replace(leadingNewLinesRegExp, '');
+
+ return string1 + separator + string2
+}
+
+/**
+ * Determines whether an input can be converted
+ * @private
+ * @param {String|HTMLElement} input Describe this parameter
+ * @returns Describe what it returns
+ * @type String|Object|Array|Boolean|Number
+ */
+
+function canConvert (input) {
+ return (
+ input != null && (
+ typeof input === 'string' ||
+ (input.nodeType && (
+ input.nodeType === 1 || input.nodeType === 9 || input.nodeType === 11
+ ))
+ )
+ )
+}
+
+return TurndownService;
+
+}());
+
+
+module.exports = TurndownService;
\ No newline at end of file
diff --git a/src/vender/webdav.js b/src/vender/webdav.js
new file mode 100644
index 000000000..65c800536
--- /dev/null
+++ b/src/vender/webdav.js
@@ -0,0 +1,164 @@
+/* A simple WebDav implementation in JavaScript
+ https://github.com/aslakhellesoy/webdavjs @license MIT
+*/
+var WebDAV = {
+ GET: function(url, callback) {
+ return this.request('GET', url, {}, null, 'text', callback);
+ },
+
+ PROPFIND: function(url, callback) {
+ return this.request('PROPFIND', url, {
+ Depth: "1"
+ }, null, 'xml', callback);
+ },
+
+ MKCOL: function(url, callback) {
+ return this.request('MKCOL', url, {}, null, 'text', callback);
+ },
+
+ DELETE: function(url, callback) {
+ return this.request('DELETE', url, {}, null, 'text', callback);
+ },
+
+ PUT: function(url, data, callback) {
+ return this.request('PUT', url, {}, data, 'text', callback);
+ },
+
+ Author: function(user, password) {
+ this.user = user;
+ this.password = password;
+ },
+
+ request: function(verb, url, headers, data, type, callback) {
+ var xhr = new XMLHttpRequest();
+ var body = function() {
+ var b = xhr.responseText;
+ if (type == 'xml') {
+ var xml = xhr.responseXML;
+ if (xml) {
+ b = xml.firstChild.nextSibling ? xml.firstChild.nextSibling : xml.firstChild;
+ }
+ }
+ return b;
+ };
+
+ if (callback) {
+ xhr.onreadystatechange = function() {
+ if (xhr.readyState === XMLHttpRequest.DONE && verb == "PROPFIND") {
+ var b = body();
+ if (b) {
+ callback(b);
+ }
+ } else if (xhr.readyState === XMLHttpRequest.DONE) {
+ callback(xhr);
+ }
+ };
+ }
+ xhr.open(verb, url, !! callback);
+ xhr.setRequestHeader("Content-Type", "text/xml; charset=UTF-8");
+ this.user && this.password &&
+ xhr.setRequestHeader("Authorization", "Basic " + btoa(this.user + ":" + this.password))
+ for (var header in headers) {
+ xhr.setRequestHeader(header, headers[header]);
+ }
+ xhr.send(data);
+
+ if (!callback) {
+ return body();
+ }
+ }
+};
+
+// An Object-oriented API around WebDAV.
+WebDAV.Fs = function(rootUrl, user, password) {
+ WebDAV.Author(user, password);
+ this.rootUrl = rootUrl;
+ var fs = this;
+
+ this.file = function(href) {
+ this.type = 'file';
+
+ this.url = fs.urlFor(href);
+
+ this.name = fs.nameFor(this.url);
+
+ this.read = function(callback) {
+ return WebDAV.GET(this.url, callback);
+ };
+
+ this.write = function(data, callback) {
+ return WebDAV.PUT(this.url, data, callback);
+ };
+
+ this.rm = function(callback) {
+ return WebDAV.DELETE(this.url, callback);
+ };
+
+ return this;
+ };
+
+ this.dir = function(href) {
+ this.type = 'dir';
+
+ this.url = fs.urlFor(href);
+
+ this.name = fs.nameFor(this.url);
+
+ this.children = function(callback) {
+ var childrenFunc = function(doc) {
+ if (doc.childNodes == null) {
+ throw ('No such directory: ' + url);
+ }
+ var result = [];
+ // Start at 1, because the 0th is the same as self.
+ for (var i = 1; i < doc.childNodes.length; i++) {
+ var response = doc.childNodes[i];
+ var href = decodeURI( response.getElementsByTagName('d:href')[0].firstChild.nodeValue.replace(/\/$/, ''));
+ var propstat = response.getElementsByTagName('d:propstat')[0];
+ var prop = propstat.getElementsByTagName('d:prop')[0];
+ var resourcetype = prop.getElementsByTagName('d:resourcetype')[0];
+ var collection = resourcetype.getElementsByTagName('d:collection')[0];
+
+ if (collection) {
+ result[i - 1] = new fs.dir(href);
+ } else {
+ result[i - 1] = new fs.file(href);
+ }
+ }
+ return result;
+ };
+
+ if (callback) {
+ WebDAV.PROPFIND(this.url, function(doc) {
+ callback(childrenFunc(doc));
+ });
+ } else {
+ return childrenFunc(WebDAV.PROPFIND(this.url));
+ }
+ };
+
+ this.rm = function(callback) {
+ return WebDAV.DELETE(this.url, callback);
+ };
+
+ this.mkdir = function(callback) {
+ return WebDAV.MKCOL(this.url, callback);
+ };
+
+ return this;
+ };
+
+ this.urlFor = function(href) {
+ return (/^http/.test(href) ? href : this.rootUrl + href);
+ };
+
+ this.nameFor = function(url) {
+ return url.replace(/.*\/(.*)/, '$1');
+ };
+
+ return this;
+};
+
+if (typeof module !== 'undefined') {
+ module.exports = WebDAV;
+}
\ No newline at end of file
diff --git a/src/website_list.json b/src/website_list.json
index db5ccba98..ec76a87c6 100644
--- a/src/website_list.json
+++ b/src/website_list.json
@@ -36,8 +36,8 @@
"name" : "36kr.com",
"url" : "http://36kr.com/p/",
"title" : "",
- "desc" : "",
- "include" : "",
+ "desc" : "",
+ "include" : "
",
"exclude" : [
"
",
"
",
@@ -47,10 +47,10 @@
]
},{
"name" : "pingwest.com",
- "url" : "http://www.pingwest.com/",
- "title" : "",
+ "url" : "http*://www.pingwest.com/a/*",
+ "title" : "",
"desc" : "",
- "include" : "",
+ "include" : "
",
"exclude" : [
"",
+ "desc" : "[[{$('meta[name=description]').attr('content')}]]",
+ "include" : "",
+ "exclude" : [
+ ""
+ ]
},{
"name" : "jianshu.com",
"url" : "http://www.jianshu.com/p/",
@@ -302,9 +311,9 @@
},{
"name" : "waerfa.com",
"url" : "http://www.waerfa.com/",
- "title" : "
",
+ "title" : "",
"desc" : "",
- "include" : "",
+ "include" : "
",
"exclude" : [
"
"
]
@@ -321,7 +330,7 @@
"name" : "article.guokr.com",
"url" : "http://www.guokr.com/article/",
"title" : "
",
- "desc" : "[[{$('meta[name=description]').attr('content')}]]",
+ "desc" : "[[{$('meta[name=Description]').attr('content')}]]",
"include" : "",
"exclude" : [
"
",
@@ -386,6 +395,24 @@
"exclude" : [
""
]
+ },{
+ "name" : "book.douban.com",
+ "url" : "https://book.douban.com/reading/*",
+ "title" : "
",
+ "desc" : "",
+ "include" : "",
+ "exclude" : [
+ ""
+ ]
+ },{
+ "name" : "people.douban.com",
+ "url" : "https://www.douban.com/people/*/status/*",
+ "title" : "
",
+ "desc" : "",
+ "include" : "",
+ "exclude" : [
+ ""
+ ]
},{
"name" : "douban.com",
"url" : "https://www.douban.com/*",
@@ -487,7 +514,8 @@
"
",
"
",
"[[/src=\\S+(ds-logo-1-2-64)\\S+'/]]",
- "[[/src=\\S+(down)\\S+'/]]"
+ "[[/src=\\S+(down)\\S+'/]]",
+ "
"
]
},{
"name" : "free.apprcn.com",
@@ -752,6 +780,15 @@
"exclude" : [
""
]
+ },{
+ "name" : "iplaysoft.com",
+ "url" : "https://www.iplaysoft.com/*.html",
+ "title" : "",
+ "desc" : "",
+ "include" : "",
+ "exclude" : [
+ ""
+ ]
},{
"name" : "blog.jobbole.com",
"url" : "http://blog.jobbole.com/*/",
@@ -963,7 +1000,7 @@
"desc" : "",
"include" : "
",
"exclude" : [
- "[[/src=\\S+(liiLIZF8Uh6yM.jpg)\\S+/]]"
+ ""
]
},{
"name" : "ifeve.com",
@@ -1020,10 +1057,10 @@
"name" : "my.oschina.net",
"url" : "https://my.oschina.net/**/*/blog/*",
"title" : "
",
- "desc" : "",
+ "desc" : "",
"include" : "
",
"exclude" : [
- ""
+ "[[/src=\\S+(hot3)\\S+'/]]"
]
},{
"name" : "oschina.net",
@@ -1044,6 +1081,24 @@
"exclude" : [
""
]
+ },{
+ "name" : "news.iteye.com",
+ "url" : "http*://www.iteye.com/news/*",
+ "title" : "
",
+ "desc" : "",
+ "include" : "",
+ "exclude" : [
+ ""
+ ]
+ },{
+ "name" : "blog.iteye.com",
+ "url" : "http*://*.iteye.com/blog/*",
+ "title" : "
",
+ "desc" : "",
+ "include" : "",
+ "exclude" : [
+ ""
+ ]
},{
"name" : "geek.csdn.net",
"url" : "http*://geek.csdn.net/news/detail/*",
@@ -1088,7 +1143,7 @@
]
},{
"name" : "freebuf.com",
- "url" : "http://www.freebuf.com/**/*/*.html",
+ "url" : "http*://www.freebuf.com/**/*/*.html",
"title" : "[[{$('.title h2').text()}]]",
"desc" : "",
"include" : "
",
@@ -1124,7 +1179,7 @@
]
},{
"name" : "cnblogs.com",
- "url" : "http://www.cnblogs.com/**/*/*.html",
+ "url" : "https://www.cnblogs.com/**/*/*.html",
"title" : "
",
"desc" : "",
"include" : "",
@@ -1768,14 +1823,25 @@
"
",
"