Skip to content

Commit

Permalink
Merge pull request #67 from jparkerweb/develop
Browse files Browse the repository at this point in the history
v1.10.9
  • Loading branch information
jparkerweb authored Jan 25, 2025
2 parents 3d19524 + 2fdca68 commit adab892
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 26 deletions.
12 changes: 6 additions & 6 deletions .vault/rich-foot-example/.obsidian/plugins/rich-foot/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ var ReleaseNotesModal = class extends import_obsidian.Modal {
};

// virtual-module:virtual:release-notes
var releaseNotes = '<h2>\u{1F6D1} Exclude Me Please</h2>\n<h2>[1.10.8] - 2025-01-25</h2>\n<h3>\u2728 Added</h3>\n<ul>\n<li>Outlink collections now include embedded notes</li>\n</ul>\n<h3>\u{1F41B} Fixed</h3>\n<ul>\n<li>Fixed issue with Rich Foot not being applied in Reading Mode if the note has an embedded note</li>\n</ul>\n<h3>[1.10.7] - 2025-01-13</h3>\n<h4>\u{1F4E6} Updated</h4>\n<ul>\n<li>Updated <code>css</code> variables to support the <code>Minimal</code> theme</li>\n</ul>\n<h3>[1.10.6] - 2025-01-10</h3>\n<h4>\u{1F4E6} Updated</h4>\n<ul>\n<li>Adjusted <code>css</code> padding values to be compatible with <code>Typewriter Scroll</code> plugin</li>\n</ul>\n<h3>[1.10.5] - 2024-12-26</h3>\n<h4>\u{1F4E6} Updated</h4>\n<ul>\n<li>Support for more date formats in <code>frontmatter</code> created/modified fields (ISO, space-separated, and just date)</li>\n</ul>\n<h3>[1.10.4] - 2024-12-23</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Fixed issue with Rich Foot not loading all user defined colors when Obsidian is restarted</li>\n</ul>\n<h3>[1.10.3] - 2024-12-14</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Improved parent selector matching to properly detect and exclude Rich Foot when specified selectors are present in the view or its parent elements</li>\n</ul>\n<h3>[1.10.2] - 2024-12-11</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Missing <code>Excluded Folders</code> section in the settings</li>\n</ul>\n<h3>[1.10.1] - 2024-12-10</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Extra padding on the bottom of the editor in Canvas / Kanban Cards</li>\n</ul>\n<h3>[1.10.0] - 2024-12-08</h3>\n<h4>\u2728 Added</h4>\n<ul>\n<li>Exclusion rule via <code>frontmatter</code> field</li>\n<li>Custom exclusions using specified DOM parent selectors for advanced control</li>\n</ul>\n<p><a href="https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/rich-foot/rich-foot-v1.10.0.jpg"><img src="https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/rich-foot/rich-foot-v1.10.0.jpg" alt="screenshot"></a></p>\n';
var releaseNotes = '<h2>\u{1F6D1} Exclude Me Please</h2>\n<h2>[1.10.9] - 2025-01-25</h2>\n<h3>\u{1F41B} Fixed</h3>\n<ul>\n<li>Addressed issue with Rich Foot being duplicated when a note was opened in a &quot;new window&quot;</li>\n</ul>\n<h2>[1.10.8] - 2025-01-25</h2>\n<h3>\u2728 Added</h3>\n<ul>\n<li>Outlink collections now include embedded notes</li>\n</ul>\n<h3>\u{1F41B} Fixed</h3>\n<ul>\n<li>Fixed issue with Rich Foot not being applied in Reading Mode if the note has an embedded note</li>\n</ul>\n<h3>[1.10.7] - 2025-01-13</h3>\n<h4>\u{1F4E6} Updated</h4>\n<ul>\n<li>Updated <code>css</code> variables to support the <code>Minimal</code> theme</li>\n</ul>\n<h3>[1.10.6] - 2025-01-10</h3>\n<h4>\u{1F4E6} Updated</h4>\n<ul>\n<li>Adjusted <code>css</code> padding values to be compatible with <code>Typewriter Scroll</code> plugin</li>\n</ul>\n<h3>[1.10.5] - 2024-12-26</h3>\n<h4>\u{1F4E6} Updated</h4>\n<ul>\n<li>Support for more date formats in <code>frontmatter</code> created/modified fields (ISO, space-separated, and just date)</li>\n</ul>\n<h3>[1.10.4] - 2024-12-23</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Fixed issue with Rich Foot not loading all user defined colors when Obsidian is restarted</li>\n</ul>\n<h3>[1.10.3] - 2024-12-14</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Improved parent selector matching to properly detect and exclude Rich Foot when specified selectors are present in the view or its parent elements</li>\n</ul>\n<h3>[1.10.2] - 2024-12-11</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Missing <code>Excluded Folders</code> section in the settings</li>\n</ul>\n<h3>[1.10.1] - 2024-12-10</h3>\n<h4>\u{1F41B} Fixed</h4>\n<ul>\n<li>Extra padding on the bottom of the editor in Canvas / Kanban Cards</li>\n</ul>\n<h3>[1.10.0] - 2024-12-08</h3>\n<h4>\u2728 Added</h4>\n<ul>\n<li>Exclusion rule via <code>frontmatter</code> field</li>\n<li>Custom exclusions using specified DOM parent selectors for advanced control</li>\n</ul>\n<p><a href="https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/rich-foot/rich-foot-v1.10.0.jpg"><img src="https://raw.githubusercontent.com/jparkerweb/ref/refs/heads/main/equill-labs/rich-foot/rich-foot-v1.10.0.jpg" alt="screenshot"></a></p>\n';

// src/settings.js
var import_obsidian2 = require("obsidian");
Expand Down Expand Up @@ -787,7 +787,7 @@ var RichFootPlugin = class extends import_obsidian3.Plugin {
return;
}
if (this.shouldExcludeFile(file.path)) {
const existingRichFoots2 = document.querySelectorAll(".rich-foot");
const existingRichFoots2 = view.contentEl.querySelectorAll(".rich-foot");
existingRichFoots2.forEach((el) => el.remove());
return;
}
Expand All @@ -809,7 +809,7 @@ var RichFootPlugin = class extends import_obsidian3.Plugin {
}
if ((_h = (_g = this.settings) == null ? void 0 : _g.excludedParentSelectors) == null ? void 0 : _h.some((selector) => {
try {
const matchingElements = document.querySelectorAll(selector);
const matchingElements = content.querySelectorAll(selector);
return Array.from(matchingElements).some(
(el) => el === container || el.contains(container)
);
Expand All @@ -818,15 +818,15 @@ var RichFootPlugin = class extends import_obsidian3.Plugin {
return false;
}
})) {
const existingRichFoots2 = document.querySelectorAll(".rich-foot");
const existingRichFoots2 = view.contentEl.querySelectorAll(".rich-foot");
existingRichFoots2.forEach((el) => el.remove());
return;
}
const existingRichFoots = document.querySelectorAll(".rich-foot");
const existingRichFoots = view.contentEl.querySelectorAll(".rich-foot");
existingRichFoots.forEach((el) => el.remove());
this.disconnectObservers();
const richFoot = await this.createRichFoot(file);
const newCheck = document.querySelectorAll(".rich-foot");
const newCheck = view.contentEl.querySelectorAll(".rich-foot");
if (newCheck.length > 0) {
newCheck.forEach((el) => el.remove());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "rich-foot",
"name": "Rich Foot",
"version": "1.10.8",
"version": "1.10.9",
"minAppVersion": "1.5.0",
"description": "Adds backlink tags and created/modified dates to the footer of your notes.",
"author": "Justin Parker (eQui\\\\ Labs)",
Expand Down
34 changes: 22 additions & 12 deletions .vault/rich-foot-example/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"type": "split",
"children": [
{
"id": "fbb1972d09fe87dc",
"id": "a294327416f762c9",
"type": "tabs",
"children": [
{
"id": "946d262197156fcf",
"id": "934f926a39fbc7ea",
"type": "leaf",
"state": {
"type": "markdown",
Expand Down Expand Up @@ -3919,6 +3919,16 @@
{
"id": "0d004a3f9d44c37f",
"type": "leaf",
"state": {
"type": "empty",
"state": {},
"icon": "lucide-file",
"title": "New tab"
}
},
{
"id": "0a9c94949116cd24",
"type": "leaf",
"state": {
"type": "Saved Queries View",
"state": {},
Expand All @@ -3927,7 +3937,7 @@
}
},
{
"id": "0a9c94949116cd24",
"id": "d4cd6a1735ae60c9",
"type": "leaf",
"state": {
"type": "Saved Queries View",
Expand All @@ -3937,7 +3947,7 @@
}
}
],
"currentTab": 383
"currentTab": 384
}
],
"direction": "horizontal",
Expand All @@ -3957,20 +3967,20 @@
"obsidian-kanban:Create new board": false
}
},
"active": "0a9c94949116cd24",
"active": "934f926a39fbc7ea",
"lastOpenFiles": [
"Untitled.md",
"misc-notes/link test 2.md",
"misc-notes/one.md",
"releases/v1.7.0 - 📆 Dates Your Way.md",
"releases/v1.8.0 - 🫣 Page Preview Support.md",
"releases/v1.9.0 - 🥙 Stuffed Links.md",
"releases/v1.10.0 - 🛑 Exclude Me Please.md",
"🦶 Rich Foot.md",
"Untitled.md",
"misc-notes/link test.md",
"exclude/no rich-feet here.md",
"releases/v1.10.0 - 🛑 Exclude Me Please.md",
"misc-notes/link test 2.md",
"misc-notes/two.md",
"misc-notes/three.md",
"misc-notes/one.md",
"releases/v1.8.0 - 🫣 Page Preview Support.md",
"releases/v1.9.0 - 🥙 Stuffed Links.md",
"releases/v1.7.0 - 📆 Dates Your Way.md",
"images/rich-feet-3.jpg",
"images/rich-feet-2.jpg",
"images/rich-feet.jpg",
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to Rich Foot will be documented in this file.

## [1.10.9] - 2025-01-25
### 🐛 Fixed
- Addressed issue with Rich Foot being duplicated when a note was opened in a "new window"

## [1.10.8] - 2025-01-25
### ✨ Added
- Outlink collections now include embedded notes
Expand Down
4 changes: 4 additions & 0 deletions UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 🛑 Exclude Me Please

## [1.10.9] - 2025-01-25
### 🐛 Fixed
- Addressed issue with Rich Foot being duplicated when a note was opened in a "new window"

## [1.10.8] - 2025-01-25
### ✨ Added
- Outlink collections now include embedded notes
Expand Down
Binary file modified example-vault.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "rich-foot",
"name": "Rich Foot",
"version": "1.10.8",
"version": "1.10.9",
"minAppVersion": "1.5.0",
"description": "Adds backlink tags and created/modified dates to the footer of your notes.",
"author": "Justin Parker (eQui\\\\ Labs)",
Expand Down
15 changes: 9 additions & 6 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ class RichFootPlugin extends Plugin {

// Check if the current file is in an excluded folder or has excluded parent
if (this.shouldExcludeFile(file.path)) {
const existingRichFoots = document.querySelectorAll('.rich-foot');
// Only remove rich-foot elements within this view's container
const existingRichFoots = view.contentEl.querySelectorAll('.rich-foot');
existingRichFoots.forEach(el => el.remove());
return;
}
Expand Down Expand Up @@ -240,7 +241,7 @@ class RichFootPlugin extends Plugin {
// Additional check for excluded parent selectors directly on the container
if (this.settings?.excludedParentSelectors?.some(selector => {
try {
const matchingElements = document.querySelectorAll(selector);
const matchingElements = content.querySelectorAll(selector);
return Array.from(matchingElements).some(el =>
el === container ||
el.contains(container)
Expand All @@ -250,13 +251,14 @@ class RichFootPlugin extends Plugin {
return false;
}
})) {
const existingRichFoots = document.querySelectorAll('.rich-foot');
// Only remove rich-foot elements within this view's container
const existingRichFoots = view.contentEl.querySelectorAll('.rich-foot');
existingRichFoots.forEach(el => el.remove());
return;
}

// Remove ALL existing Rich Foot elements from the document BEFORE creating new one
const existingRichFoots = document.querySelectorAll('.rich-foot');
// Remove existing Rich Foot elements only from this view's container
const existingRichFoots = view.contentEl.querySelectorAll('.rich-foot');
existingRichFoots.forEach(el => el.remove());

// Disconnect observers
Expand All @@ -266,7 +268,8 @@ class RichFootPlugin extends Plugin {
const richFoot = await this.createRichFoot(file);

// Double check no rich-foot was added while we were creating this one
const newCheck = document.querySelectorAll('.rich-foot');
// Only check within this view's container
const newCheck = view.contentEl.querySelectorAll('.rich-foot');
if (newCheck.length > 0) {
newCheck.forEach(el => el.remove());
}
Expand Down

0 comments on commit adab892

Please sign in to comment.