gatsby-source-notion-database
Advanced tools
Comparing version 0.5.9 to 0.6.0
{ | ||
"name": "gatsby-source-notion-database", | ||
"version": "0.5.9", | ||
"version": "0.6.0", | ||
"description": "Load data from Notion's database", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -48,5 +48,16 @@ const puppeteer = require('puppeteer'); | ||
// 表格视图 CSS 修复 | ||
document.querySelectorAll("div.notion-scroller.horizontal").forEach(item => { | ||
item.children[0].style.padding = 0 | ||
item.previousElementSibling.style.paddingLeft = 0 | ||
}) | ||
// 文章内容 | ||
let content = document.querySelector('#notion-app > div > div.notion-cursor-listener > div > div > div.notion-page-content') | ||
// 本地 build 时,如果在浏览器中 notion 是登录状态,获取到的文本是可编辑状态,需要处理一下。 | ||
let contenteditable = content.querySelectorAll("div[contenteditable=true]") | ||
contenteditable.forEach(i => { | ||
i.setAttribute("contenteditable", false) | ||
}) | ||
if (content) { | ||
@@ -53,0 +64,0 @@ return content.innerHTML |
24428
216