gatsby-source-notion-database
Advanced tools
Comparing version 0.6.6 to 0.6.7
{ | ||
"name": "gatsby-source-notion-database", | ||
"version": "0.6.6", | ||
"version": "0.6.7", | ||
"description": "Load data from Notion's database", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,3 +20,3 @@ const puppeteer = require('puppeteer'); | ||
}) | ||
// TOC 链接转化 | ||
@@ -59,2 +59,8 @@ let qs = "#notion-app > div > div.notion-cursor-listener > div > div.notion-scroller.vertical.horizontal > div.notion-page-content > div > div:nth-child(1) > div > a" | ||
// bookmark 修复,notion更改了 bookmark block 的生成规则,a 标签内没有 href了 | ||
document.querySelectorAll("#notion-app > div > div.notion-cursor-listener > div > div.notion-scroller.vertical.horizontal > div.notion-page-content > div[data-block-id] > div > div > a").forEach(a => { | ||
if (!a.href) { | ||
a.href = a.querySelector("div > div:first-child > div:last-child").innerText | ||
} | ||
}) | ||
// 表格视图 CSS 修复 | ||
@@ -61,0 +67,0 @@ document.querySelectorAll("div.notion-scroller.horizontal").forEach(item => { |
12806
233