Skip to content

Commit

Permalink
fix autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
mayneyao committed Mar 1, 2020
1 parent 548c845 commit 37bfd61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nplus/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NotionPlus",
"version": "2.0.0",
"version": "2.0.1",
"description": "Programming in Notion.so",
"permissions": [
"storage"
Expand Down
4 changes: 2 additions & 2 deletions nplus/src/content-scripts/plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const handleKeyPress = (e: KeyboardEvent, actionCode: any) => {
if (e.code === "ArrowRight") {
const searchRes = document.querySelectorAll(`#notion-app > div > div.notion-overlay-container.notion-default-overlay-container >
div > div > div > div > div > div > section > div > div > div`)
const selectItem = searchRes && Array.from(searchRes).find(item => (item as HTMLLIElement).style.background === "rgba(55, 53, 47, 0.08)")
const selectItem = searchRes && Array.from(searchRes).find(item => (item as HTMLLIElement).style.backgroundColor === "rgba(55, 53, 47, 0.08)")
if (selectItem) {
const selectPageText = (selectItem!.firstChild!.childNodes[1].firstChild! as HTMLLIElement).innerText;
// console.log(selectPageText);
Expand All @@ -96,6 +96,6 @@ const loadNotionPlus = (actionCode: any) => {
console.warn("请在 NotionPlus 选项配置页中填入 ActionTableUrl,否则插件不会正常工作")
}
loadNotionPlus(actionCode)
console.log('NotionPlus V2.0.0');
console.log('NotionPlus V2.0.1');
// console.log('try `const data = await nb.fetch(window.location.href)` via browser console');
})();

0 comments on commit 37bfd61

Please sign in to comment.