Skip to content

Commit

Permalink
fixed 主页数据无法正常获取
Browse files Browse the repository at this point in the history
  • Loading branch information
cumany committed Sep 10, 2022
1 parent 1889acd commit 2d80b08
Show file tree
Hide file tree
Showing 59 changed files with 106,473 additions and 1,518 deletions.
2 changes: 1 addition & 1 deletion .obsidian/.diary-stats

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .obsidian/appearance.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"baseFontSize": 17,
"baseFontSize": 16,
"theme": "moonstone",
"cssTheme": "Blue Topaz",
"enabledCssSnippets": [
Expand Down
11 changes: 6 additions & 5 deletions .obsidian/community-plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"obsidian-react-components",
"buttons",
"obsidian-reveal-active-file",
"obsidian-query-control",
"folder-note-plugin",
"file-tree-alternative",
"quickadd",
Expand All @@ -51,14 +50,16 @@
"obsidian-memos",
"waypoint",
"obsidian42-brat",
"obsidian-admonition",
"obsidian-virtual-hotkey-keyboard",
"table-editor-obsidian",
"Enhanced-editing",
"obsidian-table-generator",
"metaedit",
"quick-explorer",
"ob-table-enhancer",
"obsidian-admonition",
"obsidian-emoji-toolbar",
"obsidian-table-generator",
"templater-obsidian",
"obsidian-editing-toolbar",
"templater-obsidian"
"ob-table-enhancer",
"obsidian-better-command-palette"
]
9 changes: 0 additions & 9 deletions .obsidian/hotkeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@
"key": "D"
}
],
"obsidian-hover-editor:convert-active-pane-to-popover": [
{
"modifiers": [
"Mod",
"Shift"
],
"key": "V"
}
],
"markdown-prettifier:markdown-prettifier-run": [
{
"modifiers": [
Expand Down
113 changes: 62 additions & 51 deletions .obsidian/plugins/Obsidian-editing-toolbar/data.json

Large diffs are not rendered by default.

98 changes: 49 additions & 49 deletions .obsidian/plugins/Obsidian-editing-toolbar/main.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion .obsidian/plugins/Obsidian-editing-toolbar/manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
{"id":"obsidian-editing-toolbar","name":"Obsidian Editing Toolbar","version":"2.0.3","minAppVersion":"0.9.12","description":"The Obsidian Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.","author":"Cuman","authorUrl":"https://github.com/cumany/obsidian-editing-toolbar","isDesktopOnly":true}
{
"id": "obsidian-editing-toolbar",
"name": "Obsidian Editing Toolbar",
"version": "2.0.6",
"minAppVersion": "0.9.12",
"description": "The Obsidian Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.",
"author": "Cuman",
"authorUrl": "https://github.com/cumany/obsidian-editing-toolbar",
"isDesktopOnly": true
}
20 changes: 10 additions & 10 deletions .obsidian/plugins/dataview/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .obsidian/plugins/dataview/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "dataview",
"name": "Dataview",
"version": "0.5.43",
"version": "0.5.45",
"minAppVersion": "0.13.11",
"description": "Complex data views for the data-obsessed.",
"author": "Michael Brenan <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion .obsidian/plugins/dataview/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

.table-view-table > tbody > tr:hover {
background-color: var(--text-selection);
background-color: var(--text-selection) !important;
}

.table-view-table > thead > tr > th {
Expand Down
64 changes: 32 additions & 32 deletions .obsidian/plugins/dbfolder/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .obsidian/plugins/dbfolder/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "dbfolder",
"name": "DB Folder",
"version": "2.3.6",
"version": "2.4.0",
"minAppVersion": "0.15.9",
"description": "Folder with the capability to store and retrieve data from a folder like database",
"author": "RafaelGB",
Expand Down
6 changes: 6 additions & 0 deletions .obsidian/plugins/dbfolder/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,12 @@ span.text-align-right {
justify-content: flex-end;
}

.database-plugin__text-align-left {
display: flex;
text-align: left;
justify-content: flex-start;
}

.cell-padding {
padding: 0.5rem;
}
Expand Down
3 changes: 2 additions & 1 deletion .obsidian/plugins/ob-table-enhancer/data.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"enableFloatingToolBar": true
"enableFloatingToolBar": true,
"enableInReadingMode": false
}
80 changes: 20 additions & 60 deletions .obsidian/plugins/ob-table-enhancer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ var TableEditor = class {
break;
}
table2.toRowIndex = i;
const tableId2 = TableEditor.getIdentifier(table2);
if (this.tables.get(tableId2))
continue;
this.tables.set(tableId2, table2);
this.tables.set(TableEditor.getIdentifier(table2), table2);
}
}
if (existNonStandardTable) {
Expand Down Expand Up @@ -371,10 +368,6 @@ var TableEditor = class {
const text = "| Col 1 | Col 2 |\n|---|---|\n| xxxx | xxxx |\n";
insertLineBelowWithText(editor, rowIndex, text);
await markdownView.save();
const firstCell = activeDocument.querySelector("#\u2C9C00");
if (firstCell instanceof HTMLTableCellElement) {
firstCell.click();
}
}
}
async swapCols(tableId2, colIndex1, colIndex2) {
Expand Down Expand Up @@ -415,16 +408,16 @@ var TableEditor = class {
const rowNum = table2.cells.length;
for (let i2 = 0; i2 < rowNum; i2++) {
const str2 = table2.cells[i2][0];
if (str2 && !str2.match(/[!<>*#\[\]`$=]/))
result.push(str2.replace(/[\r\n\t\f\v \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\ufeff]/g, ""));
if (str2 && str2.trim() != "" && !str2.match(/[!<>*#\[\]`$=]/))
result.push(str2.trim());
}
let i = table2.cells[0].length;
while (i--) {
const str2 = table2.cells[0][i];
if (str2 && !str2.match(/[!<>*#\[\]`$=]/))
result.push(str2.replace(/[\r\n\t\f\v \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\ufeff]/g, ""));
if (str2 && str2.trim() != "" && !str2.match(/[!<>*#\[\]`$=]/))
result.push(str2.trim());
}
let resultStr = result.join("");
let resultStr = result.join("").replace(/\s/g, "");
if (resultStr.length == 0)
return "\u7A7A\u8868";
resultStr += table2.cells.length.toString();
Expand Down Expand Up @@ -913,7 +906,7 @@ var ToolBar = class {
}
}
tryShowFor(cell) {
if (!this.plugin.settings.enableInReadingMode && inReadingView())
if (inReadingView())
return;
if (this.hideTimeout)
clearTimeout(this.hideTimeout);
Expand Down Expand Up @@ -985,20 +978,12 @@ var ObTableEnhancerSettingTab = class extends import_obsidian4.PluginSettingTab
await this.plugin.saveSettings();
});
});
new import_obsidian4.Setting(containerEl).setName("Enable in reading mode").addToggle((component) => {
component.setValue(this.plugin.settings.enableInReadingMode);
component.onChange(async (val) => {
this.plugin.settings.enableInReadingMode = val;
await this.plugin.saveSettings();
});
});
}
};

// main.ts
var DEFAULT_SETTINGS = {
enableFloatingToolBar: false,
enableInReadingMode: false
enableFloatingToolBar: false
};
var MyPlugin = class extends import_obsidian5.Plugin {
async onload() {
Expand Down Expand Up @@ -1235,7 +1220,7 @@ var MyPlugin = class extends import_obsidian5.Plugin {
var _a2;
e.preventDefault();
e.stopPropagation();
if (this.ctrl || !this.settings.enableInReadingMode && inReadingView())
if (this.ctrl || inReadingView())
return;
if (cellEl.getAttr("contenteditable") == "true" || !this.hoverTableId)
return;
Expand Down Expand Up @@ -1270,7 +1255,7 @@ var MyPlugin = class extends import_obsidian5.Plugin {
this.addCommand({
id: "insert2x2table",
name: "Insert 2x2 table",
editorCallback: async (editor, view) => {
callback: async () => {
await this.tableEditor.parseActiveFile();
await this.tableEditor.createMinimalNewTable();
}
Expand All @@ -1292,37 +1277,12 @@ var MyPlugin = class extends import_obsidian5.Plugin {
(_c = activeWindow.getSelection()) == null ? void 0 : _c.removeAllRanges();
});
});
menu.addItem(async (item) => {
item.setTitle("Copy as Markdown");
item.onClick(async (e) => {
if (!this.hoverTableId)
return;
await this.tableEditor.parseActiveFile();
const table2 = this.tableEditor.tables.get(this.hoverTableId);
if (!table2)
return;
const markdownView = this.app.workspace.getActiveViewOfType(import_obsidian5.MarkdownView);
if (markdownView instanceof import_obsidian5.MarkdownView) {
const editor2 = markdownView.editor;
const tableMd = [];
let firstRowCells = table2.cells[0];
firstRowCells = firstRowCells.map((s) => `${s}\u3000`);
const firstRow = TableEditor.rowCells2rowString(firstRowCells);
tableMd.push(firstRow);
for (let i = table2.fromRowIndex + 1; i < table2.toRowIndex; i++)
tableMd.push(editor2.getLine(i));
await navigator.clipboard.writeText(tableMd.join("\n"));
}
});
});
menu.addItem(async (item) => {
menu.addItem((item) => {
item.setTitle("Delete entire table");
item.onClick(async () => {
var _a;
if (!this.hoverTableId)
return;
if (this.editingCell)
await this.doneEdit(this.editingCell);
await this.tableEditor.parseActiveFile();
await ((_a = this.tableEditor) == null ? void 0 : _a.deleteEntireTable(this.hoverTableId));
});
Expand All @@ -1341,33 +1301,33 @@ var MyPlugin = class extends import_obsidian5.Plugin {
return;
cellElem.setAttr("contenteditable", false);
await this.tableEditor.update(this.hoverTableId, rowIndex, colIndex, cellElem.innerText.trim());
await this.tableEditor.parseActiveFile();
cellElem.classList.remove("is-editing");
if (this.suggestPopper)
this.suggestPopper.disable();
const markdownView = this.app.workspace.getActiveViewOfType(import_obsidian5.MarkdownView);
if (markdownView instanceof import_obsidian5.MarkdownView) {
const editor = markdownView.editor;
editor.blur();
}
await this.tableEditor.parseActiveFile();
cellElem.classList.remove("is-editing");
if (this.suggestPopper)
this.suggestPopper.disable();
this.editingCell = null;
}
getIdentifier(table2) {
const result = [];
const rowNum = table2.rows.length;
for (let i2 = 0; i2 < rowNum; i2++) {
const str2 = table2.rows[i2].cells[0].innerHTML.replace(/&nbsp;/gi, "");
if (str2 != "" && !str2.match(/ [!<>*#\[\]`$&=]/)) {
result.push(str2.replace(/[\r\n\t\f\v \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\ufeff]/g, ""));
if (str2 && str2.trim() != "" && !str2.match(/[!<>*#\[\]`$&=]/)) {
result.push(str2.trim());
}
}
let i = table2.rows[0].cells.length;
while (i--) {
const str2 = table2.rows[0].cells[i].innerHTML.replace(/&nbsp;/gi, "");
if (str2 && !str2.match(/[!<>*#\[\]`$&=]/))
result.push(str2.replace(/[\r\n\t\f\v \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\ufeff]/g, ""));
if (str2 && str2.trim() != "" && !str2.match(/[!<>*#\[\]`$&=]/))
result.push(str2.trim());
}
let resultStr = result.join("");
let resultStr = result.join("").replace(/\s/g, "");
if (resultStr.length == 0)
return "\u7A7A\u8868";
resultStr += table2.rows.length.toString();
Expand Down
11 changes: 10 additions & 1 deletion .obsidian/plugins/ob-table-enhancer/manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
{"id":"ob-table-enhancer","name":"Table Enhancer","version":"0.2.2","minAppVersion":"0.15.0","description":"Manipulate tables in Obsidian without editing source code","author":"stardust","authorUrl":"https://github.com/Stardusten/ob-table-enhancer","isDesktopOnly":false}
{
"id": "ob-table-enhancer",
"name": "Table Enhancer",
"version": "0.2.1",
"minAppVersion": "0.15.0",
"description": "Manipulate tables in Obsidian without editing source code",
"author": "stardust",
"authorUrl": "https://github.com/Stardusten/ob-table-enhancer",
"isDesktopOnly": false
}
64 changes: 0 additions & 64 deletions .obsidian/plugins/ob-table-enhancer/styles.css

This file was deleted.

2 changes: 1 addition & 1 deletion .obsidian/plugins/obsidian-bartender/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"21212843474944064247010",
"6265085974544384162810726",
"57095405447413761117063169",
"62064596709539842415194042"
"6036189987471360132348532"
],
"ribbonBarOrder": [
"79372327069941761204210982",
Expand Down
3 changes: 3 additions & 0 deletions .obsidian/plugins/obsidian-emoji-toolbar/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"twemojiActive": false
}
Loading

0 comments on commit 2d80b08

Please sign in to comment.