MacBook-Pro-de-Oscar.local 2025-9-17:14:28:23
This commit is contained in:
2
.obsidian/appearance.json
vendored
2
.obsidian/appearance.json
vendored
@@ -47,5 +47,5 @@
|
||||
"showViewHeader": true,
|
||||
"translucency": false,
|
||||
"nativeMenus": false,
|
||||
"showRibbon": false
|
||||
"showRibbon": true
|
||||
}
|
@@ -119,8 +119,9 @@
|
||||
"mdCSS": "",
|
||||
"scriptEngineSettings": {},
|
||||
"defaultTrayMode": true,
|
||||
"previousRelease": "2.15.2",
|
||||
"previousRelease": "2.15.3",
|
||||
"showReleaseNotes": true,
|
||||
"compareManifestToPluginVersion": true,
|
||||
"showNewVersionNotification": true,
|
||||
"latexBoilerplate": "\\color{blue}",
|
||||
"latexPreambleLocation": "preamble.sty",
|
||||
|
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "obsidian-excalidraw-plugin",
|
||||
"name": "Excalidraw",
|
||||
"version": "2.15.2",
|
||||
"version": "2.15.3",
|
||||
"minAppVersion": "1.5.7",
|
||||
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
|
||||
"author": "Zsolt Viczian",
|
||||
|
@@ -83,7 +83,7 @@
|
||||
"Appearance-dark@@theme-dark-style-select": "theme-dark-background-darker",
|
||||
"Appearance-dark@@card-layout-open-dark": true,
|
||||
"Plugin@@colorful-checkbox": false,
|
||||
"pane-relief@@pr-sliding-panes-desktop-width": "calc(40vw - 0.6*var(--ribbon-width))",
|
||||
"pane-relief@@pr-sliding-panes-desktop-width": "calc(50vw - 0.6*var(--ribbon-width))",
|
||||
"minimal-edge-settings@@disable-border": false,
|
||||
"minimal-edge-settings@@background-theme": "eclipse-theme",
|
||||
"minimal-style@@file-header-font-size": "1.2em",
|
||||
|
315
.obsidian/plugins/obsidian-task-progress-bar/main.js
vendored
315
.obsidian/plugins/obsidian-task-progress-bar/main.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "obsidian-task-progress-bar",
|
||||
"name": "Task Genius",
|
||||
"version": "9.8.7",
|
||||
"version": "9.8.10",
|
||||
"minAppVersion": "0.15.2",
|
||||
"description": "Comprehensive task management that includes progress bars, task status cycling, and advanced task tracking features.",
|
||||
"author": "Boninall",
|
||||
|
File diff suppressed because one or more lines are too long
@@ -94,6 +94,254 @@ class CSSLink {
|
||||
}
|
||||
}
|
||||
|
||||
function clearExtraAttributes(link) {
|
||||
Object.values(link.attributes).forEach(attr => {
|
||||
if (attr.name.includes("data-link")) {
|
||||
link.removeAttribute(attr.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
function fetchTargetAttributesSync(app, settings, dest, addDataHref) {
|
||||
var _a;
|
||||
let new_props = { tags: "" };
|
||||
const cache = app.metadataCache.getFileCache(dest);
|
||||
if (!cache)
|
||||
return new_props;
|
||||
const frontmatter = cache.frontmatter;
|
||||
if (frontmatter) {
|
||||
settings.targetAttributes.forEach(attribute => {
|
||||
if (Object.keys(frontmatter).includes(attribute)) {
|
||||
if (attribute === 'tag' || attribute === 'tags') {
|
||||
new_props['tags'] += frontmatter[attribute];
|
||||
}
|
||||
else {
|
||||
new_props[attribute] = frontmatter[attribute];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (settings.targetTags) {
|
||||
new_props["tags"] += obsidian.getAllTags(cache).join(' ');
|
||||
}
|
||||
if (addDataHref) {
|
||||
new_props['data-href'] = dest.basename;
|
||||
}
|
||||
new_props['path'] = dest.path;
|
||||
//@ts-ignore
|
||||
const getResults = (api) => {
|
||||
const page = api.page(dest.path);
|
||||
if (!page) {
|
||||
return;
|
||||
}
|
||||
settings.targetAttributes.forEach((field) => {
|
||||
const value = page[field];
|
||||
if (value)
|
||||
new_props[field] = value;
|
||||
});
|
||||
};
|
||||
if (settings.getFromInlineField && app.plugins.enabledPlugins.has("dataview")) {
|
||||
const api = (_a = app.plugins.plugins.dataview) === null || _a === void 0 ? void 0 : _a.api;
|
||||
if (api) {
|
||||
getResults(api);
|
||||
}
|
||||
// This is crashing for some people. I think ignoring it will be ok.
|
||||
// else
|
||||
// this.plugin.registerEvent(
|
||||
// app.metadataCache.on("dataview:api-ready", (api: any) =>
|
||||
// getResults(api)
|
||||
// )
|
||||
// );
|
||||
}
|
||||
// Replace spaces with hyphens in the keys of new_props
|
||||
const hyphenated_props = {};
|
||||
for (const key in new_props) {
|
||||
const hyphenatedKey = key.replace(/ /g, '-');
|
||||
hyphenated_props[hyphenatedKey] = new_props[key];
|
||||
}
|
||||
new_props = hyphenated_props;
|
||||
return new_props;
|
||||
}
|
||||
function processKey(key) {
|
||||
// Replace spaces with hyphens (v0.13.4+)
|
||||
return key.replace(/ /g, '-');
|
||||
}
|
||||
function processValue(key, value) {
|
||||
// TODO: This is a hack specifically for Emile's setup. Should be commented in releases.
|
||||
if (key.contains("publishedIn") && (value === null || value === void 0 ? void 0 : value.length) && value.length === 1 && value[0].startsWith && value[0].startsWith("[[") && value[0].endsWith("]]")) {
|
||||
return value[0].slice(2, -2);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
function setLinkNewProps(link, new_props) {
|
||||
// @ts-ignore
|
||||
for (const a of link.attributes) {
|
||||
if (a.name.includes("data-link") && !(a.name in new_props)) {
|
||||
link.removeAttribute(a.name);
|
||||
}
|
||||
}
|
||||
Object.keys(new_props).forEach(key => {
|
||||
const dom_key = processKey(key);
|
||||
const name = "data-link-" + dom_key;
|
||||
const curValue = link.getAttribute(name);
|
||||
const newValue = processValue(key, new_props[key]);
|
||||
// Only update if value is different
|
||||
if (!newValue || curValue != newValue) {
|
||||
link.setAttribute(name, newValue);
|
||||
if ((newValue === null || newValue === void 0 ? void 0 : newValue.startsWith) && (newValue.startsWith('http') || newValue.startsWith('data:'))) {
|
||||
link.style.setProperty(`--data-link-${dom_key}`, `url(${newValue})`);
|
||||
}
|
||||
else {
|
||||
link.style.setProperty(`--data-link-${dom_key}`, newValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!link.hasClass("data-link-icon")) {
|
||||
link.addClass("data-link-icon");
|
||||
}
|
||||
if (!link.hasClass("data-link-icon-after")) {
|
||||
link.addClass("data-link-icon-after");
|
||||
}
|
||||
if (!link.hasClass("data-link-text")) {
|
||||
link.addClass("data-link-text");
|
||||
}
|
||||
}
|
||||
function updateLinkExtraAttributes(app, settings, link, destName) {
|
||||
var _a, _b;
|
||||
const linkHref = (_b = (_a = link.getAttribute('href')) === null || _a === void 0 ? void 0 : _a.split('#')) === null || _b === void 0 ? void 0 : _b[0];
|
||||
if (linkHref) {
|
||||
const dest = app.metadataCache.getFirstLinkpathDest(linkHref, destName);
|
||||
if (dest) {
|
||||
const new_props = fetchTargetAttributesSync(app, settings, dest, false);
|
||||
setLinkNewProps(link, new_props);
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateDivExtraAttributes(app, settings, link, destName, linkName, filter_collapsible = false) {
|
||||
if (filter_collapsible && link.parentElement.getAttribute("class").contains('mod-collapsible'))
|
||||
return; // Bookmarks Folder
|
||||
if (!linkName) {
|
||||
linkName = link.textContent;
|
||||
}
|
||||
if (!!link.parentElement.getAttribute('data-path')) {
|
||||
// File Browser
|
||||
linkName = link.parentElement.getAttribute('data-path');
|
||||
}
|
||||
else if (link.parentElement.getAttribute("class") == "suggestion-content" && !!link.nextElementSibling) {
|
||||
// Auto complete
|
||||
linkName = link.nextElementSibling.textContent + linkName;
|
||||
}
|
||||
const dest = app.metadataCache.getFirstLinkpathDest(obsidian.getLinkpath(linkName), destName);
|
||||
if (dest) {
|
||||
const new_props = fetchTargetAttributesSync(app, settings, dest, true);
|
||||
setLinkNewProps(link, new_props);
|
||||
}
|
||||
}
|
||||
function updateElLinks(app, plugin, el, ctx) {
|
||||
const settings = plugin.settings;
|
||||
const links = el.querySelectorAll('a.internal-link');
|
||||
const destName = ctx.sourcePath.replace(/(.*).md/, "$1");
|
||||
links.forEach((link) => {
|
||||
updateLinkExtraAttributes(app, settings, link, destName);
|
||||
});
|
||||
}
|
||||
function updatePropertiesPane(propertiesEl, file, app, plugin) {
|
||||
var _a;
|
||||
const frontmatter = (_a = app.metadataCache.getCache(file.path)) === null || _a === void 0 ? void 0 : _a.frontmatter;
|
||||
if (!!frontmatter) {
|
||||
const nodes = propertiesEl.querySelectorAll("div.internal-link > .multi-select-pill-content");
|
||||
for (let i = 0; i < nodes.length; ++i) {
|
||||
const el = nodes[i];
|
||||
const linkText = el.textContent;
|
||||
const keyEl = el.parentElement.parentElement.parentElement.parentElement.children[0].children[1];
|
||||
// @ts-ignore
|
||||
const key = keyEl.value;
|
||||
const listOfLinks = frontmatter[key];
|
||||
let foundS = null;
|
||||
if (!listOfLinks) {
|
||||
continue;
|
||||
}
|
||||
for (const s of listOfLinks) {
|
||||
if (s.length > 4 && s.startsWith("[[") && s.endsWith("]]")) {
|
||||
const slicedS = s.slice(2, -2);
|
||||
const split = slicedS.split("|");
|
||||
if (split.length == 1 && split[0] == linkText) {
|
||||
foundS = split[0];
|
||||
break;
|
||||
}
|
||||
else if (split.length == 2 && split[1] == linkText) {
|
||||
foundS = split[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!!foundS) {
|
||||
updateDivExtraAttributes(plugin.app, plugin.settings, el, "", foundS);
|
||||
}
|
||||
}
|
||||
const singleNodes = propertiesEl.querySelectorAll("div.metadata-link-inner");
|
||||
for (let i = 0; i < singleNodes.length; ++i) {
|
||||
const el = singleNodes[i];
|
||||
const linkText = el.textContent;
|
||||
const keyEl = el.parentElement.parentElement.parentElement.children[0].children[1];
|
||||
// @ts-ignore
|
||||
const key = keyEl.value;
|
||||
const link = frontmatter[key];
|
||||
if (!link) {
|
||||
continue;
|
||||
}
|
||||
let foundS = null;
|
||||
if ((link === null || link === void 0 ? void 0 : link.length) > 4 && link.startsWith("[[") && link.endsWith("]]")) {
|
||||
const slicedS = link.slice(2, -2);
|
||||
const split = slicedS.split("|");
|
||||
if (split.length == 1 && split[0] == linkText) {
|
||||
foundS = split[0];
|
||||
}
|
||||
else if (split.length == 2 && split[1] == linkText) {
|
||||
foundS = split[0];
|
||||
}
|
||||
}
|
||||
if (!!foundS) {
|
||||
updateDivExtraAttributes(plugin.app, plugin.settings, el, "", foundS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateVisibleLinks(app, plugin) {
|
||||
const settings = plugin.settings;
|
||||
app.workspace.iterateRootLeaves((leaf) => {
|
||||
var _a, _b;
|
||||
if (leaf.view instanceof obsidian.MarkdownView && leaf.view.file) {
|
||||
const file = leaf.view.file;
|
||||
const cachedFile = app.metadataCache.getFileCache(file);
|
||||
// @ts-ignore
|
||||
const metadata = (_b = (_a = leaf.view) === null || _a === void 0 ? void 0 : _a.metadataEditor) === null || _b === void 0 ? void 0 : _b.contentEl;
|
||||
if (!!metadata) {
|
||||
updatePropertiesPane(metadata, file, app, plugin);
|
||||
}
|
||||
//@ts-ignore
|
||||
const tabHeader = leaf.tabHeaderInnerTitleEl;
|
||||
if (settings.enableTabHeader) {
|
||||
// Supercharge tab headers
|
||||
updateDivExtraAttributes(app, settings, tabHeader, "", file.path);
|
||||
}
|
||||
else {
|
||||
clearExtraAttributes(tabHeader);
|
||||
}
|
||||
if (cachedFile === null || cachedFile === void 0 ? void 0 : cachedFile.links) {
|
||||
cachedFile.links.forEach((link) => {
|
||||
const fileName = file.path.replace(/(.*).md/, "$1");
|
||||
const dest = app.metadataCache.getFirstLinkpathDest(link.link, fileName);
|
||||
if (dest) {
|
||||
const new_props = fetchTargetAttributesSync(app, settings, dest, false);
|
||||
const internalLinks = leaf.view.containerEl.querySelectorAll(`a.internal-link[href="${link.link}"]`);
|
||||
internalLinks.forEach((internalLink) => setLinkNewProps(internalLink, new_props));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function displayText(link, settings) {
|
||||
if (link.type === 'tag') {
|
||||
if (!link.value) {
|
||||
@@ -191,7 +439,7 @@ class CSSBuilderModal extends obsidian.Modal {
|
||||
.setDesc("What attribute to target? Make sure to first add target attributes to the settings at the top!")
|
||||
.addDropdown(dc => {
|
||||
plugin.settings.targetAttributes.forEach((attribute) => {
|
||||
const dom_attribute = attribute.replace(/ /g, '-');
|
||||
const dom_attribute = processKey(attribute);
|
||||
dc.addOption(dom_attribute, attribute);
|
||||
if (dom_attribute === cssLink.name) {
|
||||
dc.setValue(dom_attribute);
|
||||
@@ -560,239 +808,6 @@ function buildCSS(selectors, plugin) {
|
||||
});
|
||||
}
|
||||
|
||||
function clearExtraAttributes(link) {
|
||||
Object.values(link.attributes).forEach(attr => {
|
||||
if (attr.name.includes("data-link")) {
|
||||
link.removeAttribute(attr.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
function fetchTargetAttributesSync(app, settings, dest, addDataHref) {
|
||||
var _a;
|
||||
let new_props = { tags: "" };
|
||||
const cache = app.metadataCache.getFileCache(dest);
|
||||
if (!cache)
|
||||
return new_props;
|
||||
const frontmatter = cache.frontmatter;
|
||||
if (frontmatter) {
|
||||
settings.targetAttributes.forEach(attribute => {
|
||||
if (Object.keys(frontmatter).includes(attribute)) {
|
||||
if (attribute === 'tag' || attribute === 'tags') {
|
||||
new_props['tags'] += frontmatter[attribute];
|
||||
}
|
||||
else {
|
||||
new_props[attribute] = frontmatter[attribute];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (settings.targetTags) {
|
||||
new_props["tags"] += obsidian.getAllTags(cache).join(' ');
|
||||
}
|
||||
if (addDataHref) {
|
||||
new_props['data-href'] = dest.basename;
|
||||
}
|
||||
new_props['path'] = dest.path;
|
||||
//@ts-ignore
|
||||
const getResults = (api) => {
|
||||
const page = api.page(dest.path);
|
||||
if (!page) {
|
||||
return;
|
||||
}
|
||||
settings.targetAttributes.forEach((field) => {
|
||||
const value = page[field];
|
||||
if (value)
|
||||
new_props[field] = value;
|
||||
});
|
||||
};
|
||||
if (settings.getFromInlineField && app.plugins.enabledPlugins.has("dataview")) {
|
||||
const api = (_a = app.plugins.plugins.dataview) === null || _a === void 0 ? void 0 : _a.api;
|
||||
if (api) {
|
||||
getResults(api);
|
||||
}
|
||||
else
|
||||
this.plugin.registerEvent(this.app.metadataCache.on("dataview:api-ready", (api) => getResults(api)));
|
||||
}
|
||||
// Replace spaces with hyphens in the keys of new_props
|
||||
const hyphenated_props = {};
|
||||
for (const key in new_props) {
|
||||
const hyphenatedKey = key.replace(/ /g, '-');
|
||||
hyphenated_props[hyphenatedKey] = new_props[key];
|
||||
}
|
||||
new_props = hyphenated_props;
|
||||
return new_props;
|
||||
}
|
||||
function setLinkNewProps(link, new_props) {
|
||||
// @ts-ignore
|
||||
for (const a of link.attributes) {
|
||||
if (a.name.includes("data-link") && !(a.name in new_props)) {
|
||||
link.removeAttribute(a.name);
|
||||
}
|
||||
}
|
||||
Object.keys(new_props).forEach(key => {
|
||||
// Replace spaces with hyphens (v0.13.4+)
|
||||
const dom_key = key.replace(/ /g, '-');
|
||||
const name = "data-link-" + dom_key;
|
||||
const newValue = new_props[key];
|
||||
const curValue = link.getAttribute(name);
|
||||
// Only update if value is different
|
||||
if (!newValue || curValue != newValue) {
|
||||
link.setAttribute(name, newValue);
|
||||
if ((newValue === null || newValue === void 0 ? void 0 : newValue.startsWith) && (newValue.startsWith('http') || newValue.startsWith('data:'))) {
|
||||
link.style.setProperty(`--data-link-${dom_key}`, `url(${newValue})`);
|
||||
}
|
||||
else {
|
||||
link.style.setProperty(`--data-link-${dom_key}`, newValue);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!link.hasClass("data-link-icon")) {
|
||||
link.addClass("data-link-icon");
|
||||
}
|
||||
if (!link.hasClass("data-link-icon-after")) {
|
||||
link.addClass("data-link-icon-after");
|
||||
}
|
||||
if (!link.hasClass("data-link-text")) {
|
||||
link.addClass("data-link-text");
|
||||
}
|
||||
}
|
||||
function updateLinkExtraAttributes(app, settings, link, destName) {
|
||||
var _a, _b;
|
||||
const linkHref = (_b = (_a = link.getAttribute('href')) === null || _a === void 0 ? void 0 : _a.split('#')) === null || _b === void 0 ? void 0 : _b[0];
|
||||
if (linkHref) {
|
||||
const dest = app.metadataCache.getFirstLinkpathDest(linkHref, destName);
|
||||
if (dest) {
|
||||
const new_props = fetchTargetAttributesSync(app, settings, dest, false);
|
||||
setLinkNewProps(link, new_props);
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateDivExtraAttributes(app, settings, link, destName, linkName, filter_collapsible = false) {
|
||||
if (filter_collapsible && link.parentElement.getAttribute("class").contains('mod-collapsible'))
|
||||
return; // Bookmarks Folder
|
||||
if (!linkName) {
|
||||
linkName = link.textContent;
|
||||
}
|
||||
if (!!link.parentElement.getAttribute('data-path')) {
|
||||
// File Browser
|
||||
linkName = link.parentElement.getAttribute('data-path');
|
||||
}
|
||||
else if (link.parentElement.getAttribute("class") == "suggestion-content" && !!link.nextElementSibling) {
|
||||
// Auto complete
|
||||
linkName = link.nextElementSibling.textContent + linkName;
|
||||
}
|
||||
const dest = app.metadataCache.getFirstLinkpathDest(obsidian.getLinkpath(linkName), destName);
|
||||
if (dest) {
|
||||
const new_props = fetchTargetAttributesSync(app, settings, dest, true);
|
||||
setLinkNewProps(link, new_props);
|
||||
}
|
||||
}
|
||||
function updateElLinks(app, plugin, el, ctx) {
|
||||
const settings = plugin.settings;
|
||||
const links = el.querySelectorAll('a.internal-link');
|
||||
const destName = ctx.sourcePath.replace(/(.*).md/, "$1");
|
||||
links.forEach((link) => {
|
||||
updateLinkExtraAttributes(app, settings, link, destName);
|
||||
});
|
||||
}
|
||||
function updatePropertiesPane(propertiesEl, file, app, plugin) {
|
||||
var _a;
|
||||
const frontmatter = (_a = app.metadataCache.getCache(file.path)) === null || _a === void 0 ? void 0 : _a.frontmatter;
|
||||
if (!!frontmatter) {
|
||||
const nodes = propertiesEl.querySelectorAll("div.internal-link > .multi-select-pill-content");
|
||||
for (let i = 0; i < nodes.length; ++i) {
|
||||
const el = nodes[i];
|
||||
const linkText = el.textContent;
|
||||
const keyEl = el.parentElement.parentElement.parentElement.parentElement.children[0].children[1];
|
||||
// @ts-ignore
|
||||
const key = keyEl.value;
|
||||
const listOfLinks = frontmatter[key];
|
||||
let foundS = null;
|
||||
if (!listOfLinks) {
|
||||
continue;
|
||||
}
|
||||
for (const s of listOfLinks) {
|
||||
if (s.length > 4 && s.startsWith("[[") && s.endsWith("]]")) {
|
||||
const slicedS = s.slice(2, -2);
|
||||
const split = slicedS.split("|");
|
||||
if (split.length == 1 && split[0] == linkText) {
|
||||
foundS = split[0];
|
||||
break;
|
||||
}
|
||||
else if (split.length == 2 && split[1] == linkText) {
|
||||
foundS = split[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!!foundS) {
|
||||
updateDivExtraAttributes(plugin.app, plugin.settings, el, "", foundS);
|
||||
}
|
||||
}
|
||||
const singleNodes = propertiesEl.querySelectorAll("div.metadata-link-inner");
|
||||
for (let i = 0; i < singleNodes.length; ++i) {
|
||||
const el = singleNodes[i];
|
||||
const linkText = el.textContent;
|
||||
const keyEl = el.parentElement.parentElement.parentElement.children[0].children[1];
|
||||
// @ts-ignore
|
||||
const key = keyEl.value;
|
||||
const link = frontmatter[key];
|
||||
if (!link) {
|
||||
continue;
|
||||
}
|
||||
let foundS = null;
|
||||
if ((link === null || link === void 0 ? void 0 : link.length) > 4 && link.startsWith("[[") && link.endsWith("]]")) {
|
||||
const slicedS = link.slice(2, -2);
|
||||
const split = slicedS.split("|");
|
||||
if (split.length == 1 && split[0] == linkText) {
|
||||
foundS = split[0];
|
||||
}
|
||||
else if (split.length == 2 && split[1] == linkText) {
|
||||
foundS = split[0];
|
||||
}
|
||||
}
|
||||
if (!!foundS) {
|
||||
updateDivExtraAttributes(plugin.app, plugin.settings, el, "", foundS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateVisibleLinks(app, plugin) {
|
||||
const settings = plugin.settings;
|
||||
app.workspace.iterateRootLeaves((leaf) => {
|
||||
var _a, _b;
|
||||
if (leaf.view instanceof obsidian.MarkdownView && leaf.view.file) {
|
||||
const file = leaf.view.file;
|
||||
const cachedFile = app.metadataCache.getFileCache(file);
|
||||
// @ts-ignore
|
||||
const metadata = (_b = (_a = leaf.view) === null || _a === void 0 ? void 0 : _a.metadataEditor) === null || _b === void 0 ? void 0 : _b.contentEl;
|
||||
if (!!metadata) {
|
||||
updatePropertiesPane(metadata, file, app, plugin);
|
||||
}
|
||||
//@ts-ignore
|
||||
const tabHeader = leaf.tabHeaderInnerTitleEl;
|
||||
if (settings.enableTabHeader) {
|
||||
// Supercharge tab headers
|
||||
updateDivExtraAttributes(app, settings, tabHeader, "", file.path);
|
||||
}
|
||||
else {
|
||||
clearExtraAttributes(tabHeader);
|
||||
}
|
||||
if (cachedFile === null || cachedFile === void 0 ? void 0 : cachedFile.links) {
|
||||
cachedFile.links.forEach((link) => {
|
||||
const fileName = file.path.replace(/(.*).md/, "$1");
|
||||
const dest = app.metadataCache.getFirstLinkpathDest(link.link, fileName);
|
||||
if (dest) {
|
||||
const new_props = fetchTargetAttributesSync(app, settings, dest, false);
|
||||
const internalLinks = leaf.view.containerEl.querySelectorAll(`a.internal-link[href="${link.link}"]`);
|
||||
internalLinks.forEach((internalLink) => setLinkNewProps(internalLink, new_props));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
class SuperchargedLinksSettingTab extends obsidian.PluginSettingTab {
|
||||
constructor(app, plugin) {
|
||||
super(app, plugin);
|
||||
@@ -865,6 +880,16 @@ Styling can be done using the Style Settings plugin.
|
||||
this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName('Enable in Bases')
|
||||
.setDesc('If true, this will also supercharge Obsidian Bases.')
|
||||
.addToggle(toggle => {
|
||||
toggle.setValue(this.plugin.settings.enableBases);
|
||||
toggle.onChange(value => {
|
||||
this.plugin.settings.enableBases = value;
|
||||
this.plugin.saveSettings();
|
||||
});
|
||||
});
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName('Enable in Plugins')
|
||||
.setDesc('If true, this will also supercharge plugins like the backlinks and forward links panels.')
|
||||
@@ -1022,7 +1047,7 @@ Styling can be done using the Style Settings plugin.
|
||||
const DEFAULT_SETTINGS = {
|
||||
targetAttributes: [],
|
||||
targetTags: true,
|
||||
getFromInlineField: true,
|
||||
getFromInlineField: false,
|
||||
enableTabHeader: true,
|
||||
activateSnippet: true,
|
||||
enableEditor: true,
|
||||
@@ -1030,6 +1055,7 @@ const DEFAULT_SETTINGS = {
|
||||
enableBacklinks: true,
|
||||
enableQuickSwitcher: true,
|
||||
enableSuggestor: true,
|
||||
enableBases: true,
|
||||
selectors: []
|
||||
};
|
||||
|
||||
@@ -1053,7 +1079,7 @@ function buildCMViewPlugin(app, _settings) {
|
||||
headerEl.style.setProperty(`--${key}`, `url(${this.attributes[key]})`);
|
||||
}
|
||||
else {
|
||||
headerEl.style.setProperty(`--${key}`, this.attributes[key]);
|
||||
headerEl.style.setProperty(`--${key}`, processValue(key, this.attributes[key]));
|
||||
}
|
||||
}
|
||||
if (this.after) {
|
||||
@@ -1297,7 +1323,7 @@ class SuperchargedLinks extends obsidian.Plugin {
|
||||
plugin.registerViewType('recent-files', plugin, '.nav-file-title-content');
|
||||
plugin.registerViewType('bookmarks', plugin, '.tree-item-inner', false, true);
|
||||
// @ts-ignore
|
||||
if ((_k = (_j = (_h = (_g = plugin.app) === null || _g === void 0 ? void 0 : _g.internalPlugins) === null || _h === void 0 ? void 0 : _h.plugins) === null || _j === void 0 ? void 0 : _j.bases) === null || _k === void 0 ? void 0 : _k.enabled) {
|
||||
if (((_k = (_j = (_h = (_g = plugin.app) === null || _g === void 0 ? void 0 : _g.internalPlugins) === null || _h === void 0 ? void 0 : _h.plugins) === null || _j === void 0 ? void 0 : _j.bases) === null || _k === void 0 ? void 0 : _k.enabled) && plugin.settings.enableBases) {
|
||||
// console.log('Supercharged links: Enabling bases support');
|
||||
plugin.registerViewType('bases', plugin, '.internal-link');
|
||||
// For embedded bases
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "supercharged-links-obsidian",
|
||||
"name": "Supercharged Links",
|
||||
"version": "0.13.5",
|
||||
"version": "0.13.6",
|
||||
"minAppVersion": "1.9.10",
|
||||
"description": "Add properties and menu options to links and style them!",
|
||||
"author": "mdelobelle & Emile",
|
||||
|
24
.obsidian/plugins/unicode-search/main.js
vendored
24
.obsidian/plugins/unicode-search/main.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "unicode-search",
|
||||
"name": "Unicode Search",
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"minAppVersion": "1.8.7",
|
||||
"description": "Search and insert Unicode characters into your editor",
|
||||
"author": "BambusControl",
|
||||
|
@@ -8,4 +8,5 @@ aliases:
|
||||
|
||||
> [!definition] Définition
|
||||
> Soit $\mathcal{F}$ l'ensemble des formules propositionnelles
|
||||
^definition
|
||||
^definition
|
||||
|
||||
|
Reference in New Issue
Block a user