Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-notion-contents

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-notion-contents - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

29

lib/utils/buildHtml.js

@@ -28,3 +28,3 @@ "use strict";

const data = yield page.evaluate(() => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
const contentEditable$ = document.querySelectorAll('div[contenteditable=true]');

@@ -34,2 +34,6 @@ (_a = contentEditable$) === null || _a === void 0 ? void 0 : _a.forEach((item) => {

});
const control$ = document.querySelectorAll('div.notion-page-controls');
(_b = control$) === null || _b === void 0 ? void 0 : _b.forEach((item) => {
item.textContent = '';
});
const img$ = document.querySelectorAll('#notion-app img');

@@ -81,6 +85,7 @@ img$.forEach((item) => {

if (content$ != null) {
const emoji$ = content$.parentElement.querySelector('div').querySelector('.notion-record-icon');
const title$ = content$.parentElement.querySelector('div[placeholder="Untitled"]');
const titleString = (_e = (_c = (_b = emoji$) === null || _b === void 0 ? void 0 : _b.textContent, (_c !== null && _c !== void 0 ? _c : '' + ((_d = title$) === null || _d === void 0 ? void 0 : _d.textContent))), (_e !== null && _e !== void 0 ? _e : ''));
const title = (_g = (_f = title$) === null || _f === void 0 ? void 0 : _f.innerHTML, (_g !== null && _g !== void 0 ? _g : ''));
const wrapper$ = content$.parentElement;
const cover$ = (_c = wrapper$.querySelector('img')) === null || _c === void 0 ? void 0 : _c.parentElement;
const title$ = (_d = wrapper$.querySelector('div[placeholder="Untitled"]')) === null || _d === void 0 ? void 0 : _d.parentElement.parentElement;
const titleString = (_f = (_e = title$) === null || _e === void 0 ? void 0 : _e.textContent, (_f !== null && _f !== void 0 ? _f : ''));
const title = (_h = (_g = cover$) === null || _g === void 0 ? void 0 : _g.innerHTML, (_h !== null && _h !== void 0 ? _h : '')) + (_k = (_j = title$) === null || _j === void 0 ? void 0 : _j.innerHTML, (_k !== null && _k !== void 0 ? _k : ''));
const content = content$.innerHTML;

@@ -93,5 +98,5 @@ return {

}
const view$ = (_h = document
const view$ = (_l = document
.getElementById('notion-app')
.querySelectorAll('.notion-board-view, .notion-list-view, .notion-table-view, .notion-gallery-view')) === null || _h === void 0 ? void 0 : _h[0];
.querySelectorAll('.notion-board-view, .notion-list-view, .notion-table-view, .notion-gallery-view')) === null || _l === void 0 ? void 0 : _l[0];
if (view$ == null) {

@@ -101,7 +106,9 @@ return null;

{
const title$ = (_j = view$.parentElement.parentElement.querySelector('div[placeholder="Untitled"]')) === null || _j === void 0 ? void 0 : _j.parentElement.parentElement;
const wrapper$ = view$.parentElement.parentElement;
const cover$ = (_m = wrapper$.querySelector('img')) === null || _m === void 0 ? void 0 : _m.parentElement;
const title$ = (_o = wrapper$.querySelector('div[placeholder="Untitled"]')) === null || _o === void 0 ? void 0 : _o.parentElement.parentElement;
const content$ = title$.nextElementSibling;
const titleString = (_l = (_k = title$) === null || _k === void 0 ? void 0 : _k.textContent, (_l !== null && _l !== void 0 ? _l : ''));
const title = (_o = (_m = title$) === null || _m === void 0 ? void 0 : _m.innerHTML, (_o !== null && _o !== void 0 ? _o : ''));
const content = (_q = (_p = content$) === null || _p === void 0 ? void 0 : _p.innerHTML, (_q !== null && _q !== void 0 ? _q : ''));
const titleString = (_q = (_p = title$) === null || _p === void 0 ? void 0 : _p.textContent, (_q !== null && _q !== void 0 ? _q : ''));
const title = (_s = (_r = cover$) === null || _r === void 0 ? void 0 : _r.innerHTML, (_s !== null && _s !== void 0 ? _s : '')) + (_u = (_t = title$) === null || _t === void 0 ? void 0 : _t.innerHTML, (_u !== null && _u !== void 0 ? _u : ''));
const content = (_w = (_v = content$) === null || _v === void 0 ? void 0 : _v.innerHTML, (_w !== null && _w !== void 0 ? _w : ''));
const resource = view$.innerHTML;

@@ -108,0 +115,0 @@ return {

{
"name": "get-notion-contents",
"version": "2.0.4",
"version": "2.0.5",
"description": "Get contents from notion",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc