Squashed 'temp-repo/' content from commit 6688605
git-subtree-dir: temp-repo git-subtree-split: 6688605ad41f49d1eccead8d29421c658cad0100
This commit is contained in:
commit
ecdfa2f7c4
1258 changed files with 42112 additions and 0 deletions
10
.obsidian/plugins/calendar/data.json
vendored
Executable file
10
.obsidian/plugins/calendar/data.json
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"shouldConfirmBeforeCreate": false,
|
||||
"weekStart": "monday",
|
||||
"wordsPerDot": 250,
|
||||
"showWeeklyNote": true,
|
||||
"weeklyNoteFormat": "",
|
||||
"weeklyNoteTemplate": "",
|
||||
"weeklyNoteFolder": "",
|
||||
"localeOverride": "system-default"
|
||||
}
|
4457
.obsidian/plugins/calendar/main.js
vendored
Executable file
4457
.obsidian/plugins/calendar/main.js
vendored
Executable file
File diff suppressed because it is too large
Load diff
10
.obsidian/plugins/calendar/manifest.json
vendored
Executable file
10
.obsidian/plugins/calendar/manifest.json
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "calendar",
|
||||
"name": "Calendar",
|
||||
"description": "Calendar view of your daily notes",
|
||||
"version": "1.5.10",
|
||||
"author": "Liam Cain",
|
||||
"authorUrl": "https://github.com/liamcain/",
|
||||
"isDesktopOnly": false,
|
||||
"minAppVersion": "0.9.11"
|
||||
}
|
3745
.obsidian/plugins/copy-as-html/main.js
vendored
Executable file
3745
.obsidian/plugins/copy-as-html/main.js
vendored
Executable file
File diff suppressed because it is too large
Load diff
10
.obsidian/plugins/copy-as-html/manifest.json
vendored
Executable file
10
.obsidian/plugins/copy-as-html/manifest.json
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "copy-as-html",
|
||||
"name": "Copy as HTML",
|
||||
"version": "1.1.3",
|
||||
"minAppVersion": "0.12.0",
|
||||
"description": "This is a simple plugin that converts the selected markdown to HTML and copies it to the clipboard.",
|
||||
"author": "Bailey Jennings",
|
||||
"authorUrl": "https://twitter.com/Bailey_Jennings",
|
||||
"isDesktopOnly": false
|
||||
}
|
345
.obsidian/plugins/image-converter/data.json
vendored
Executable file
345
.obsidian/plugins/image-converter/data.json
vendored
Executable file
|
@ -0,0 +1,345 @@
|
|||
{
|
||||
"folderPresets": [
|
||||
{
|
||||
"type": "DEFAULT",
|
||||
"name": "Default (Obsidian setting)"
|
||||
},
|
||||
{
|
||||
"type": "ROOT",
|
||||
"name": "Root folder"
|
||||
},
|
||||
{
|
||||
"type": "CURRENT",
|
||||
"name": "Same folder as current note"
|
||||
}
|
||||
],
|
||||
"selectedFolderPreset": "Default (Obsidian setting)",
|
||||
"filenamePresets": [
|
||||
{
|
||||
"name": "Keep original name",
|
||||
"customTemplate": "{imagename}",
|
||||
"skipRenamePatterns": "",
|
||||
"conflictResolution": "increment"
|
||||
},
|
||||
{
|
||||
"name": "NoteName-Timestamp",
|
||||
"customTemplate": "{notename}-{timestamp}",
|
||||
"skipRenamePatterns": "",
|
||||
"conflictResolution": "increment"
|
||||
}
|
||||
],
|
||||
"selectedFilenamePreset": "Keep original name",
|
||||
"outputFormat": "NONE",
|
||||
"quality": 0.9,
|
||||
"colorDepth": 1,
|
||||
"pngquantQuality": "65-80",
|
||||
"ffmpegExecutablePath": "",
|
||||
"ffmpegCrf": 23,
|
||||
"ffmpegPreset": "medium",
|
||||
"resizeMode": "Fit",
|
||||
"desiredWidth": 600,
|
||||
"desiredHeight": 800,
|
||||
"desiredLongestEdge": 1000,
|
||||
"enlargeOrReduce": "Auto",
|
||||
"allowLargerFiles": false,
|
||||
"showPresetModal": {
|
||||
"folder": false,
|
||||
"filename": false
|
||||
},
|
||||
"subfolderTemplate": "",
|
||||
"conversionPresets": [
|
||||
{
|
||||
"name": "None",
|
||||
"outputFormat": "NONE",
|
||||
"quality": 100,
|
||||
"colorDepth": 1,
|
||||
"resizeMode": "None",
|
||||
"desiredWidth": 800,
|
||||
"desiredHeight": 600,
|
||||
"desiredLongestEdge": 1000,
|
||||
"enlargeOrReduce": "Auto",
|
||||
"allowLargerFiles": false,
|
||||
"skipConversionPatterns": "",
|
||||
"pngquantExecutablePath": "",
|
||||
"pngquantQuality": "65-80",
|
||||
"ffmpegExecutablePath": "",
|
||||
"ffmpegCrf": 23,
|
||||
"ffmpegPreset": "medium"
|
||||
},
|
||||
{
|
||||
"name": "WEBP (75, no resizing)",
|
||||
"outputFormat": "WEBP",
|
||||
"quality": 75,
|
||||
"colorDepth": 1,
|
||||
"resizeMode": "None",
|
||||
"desiredWidth": 800,
|
||||
"desiredHeight": 600,
|
||||
"desiredLongestEdge": 1000,
|
||||
"enlargeOrReduce": "Auto",
|
||||
"allowLargerFiles": false,
|
||||
"skipConversionPatterns": "",
|
||||
"pngquantExecutablePath": "",
|
||||
"pngquantQuality": "65-80",
|
||||
"ffmpegExecutablePath": "",
|
||||
"ffmpegCrf": 23,
|
||||
"ffmpegPreset": "medium"
|
||||
},
|
||||
{
|
||||
"name": "PNGQUANT (65-80, no resizing)",
|
||||
"outputFormat": "PNGQUANT",
|
||||
"quality": 75,
|
||||
"colorDepth": 1,
|
||||
"resizeMode": "None",
|
||||
"desiredWidth": 800,
|
||||
"desiredHeight": 600,
|
||||
"desiredLongestEdge": 1000,
|
||||
"enlargeOrReduce": "Auto",
|
||||
"allowLargerFiles": false,
|
||||
"skipConversionPatterns": "",
|
||||
"pngquantExecutablePath": "",
|
||||
"pngquantQuality": "65-80",
|
||||
"ffmpegExecutablePath": "",
|
||||
"ffmpegCrf": 23,
|
||||
"ffmpegPreset": "medium"
|
||||
}
|
||||
],
|
||||
"selectedConversionPreset": "WEBP (75, no resizing)",
|
||||
"globalPresets": [
|
||||
{
|
||||
"name": "WebP 75",
|
||||
"folderPreset": "Default (Obsidian setting)",
|
||||
"filenamePreset": "NoteName-Timestamp",
|
||||
"conversionPreset": "WEBP (75, no resizing)",
|
||||
"linkFormatPreset": "Default (Wikilink, Shortest)",
|
||||
"resizePreset": "Default (No Resize)"
|
||||
}
|
||||
],
|
||||
"selectedGlobalPreset": "",
|
||||
"linkFormatSettings": {
|
||||
"linkFormatPresets": [
|
||||
{
|
||||
"name": "Default (Wikilink, Shortest)",
|
||||
"linkFormat": "wikilink",
|
||||
"pathFormat": "shortest",
|
||||
"prependCurrentDir": false,
|
||||
"hideFolders": false
|
||||
},
|
||||
{
|
||||
"name": "Markdown, Relative",
|
||||
"linkFormat": "markdown",
|
||||
"pathFormat": "relative",
|
||||
"prependCurrentDir": true,
|
||||
"hideFolders": false
|
||||
}
|
||||
],
|
||||
"selectedLinkFormatPreset": "Default (Wikilink, Shortest)"
|
||||
},
|
||||
"nonDestructiveResizeSettings": {
|
||||
"resizePresets": [
|
||||
{
|
||||
"name": "Default (No Resize)",
|
||||
"resizeDimension": "none",
|
||||
"resizeScaleMode": "auto",
|
||||
"respectEditorMaxWidth": true,
|
||||
"maintainAspectRatio": true,
|
||||
"resizeUnits": "pixels"
|
||||
},
|
||||
{
|
||||
"name": "Width 500px",
|
||||
"resizeDimension": "width",
|
||||
"width": 500,
|
||||
"resizeScaleMode": "auto",
|
||||
"respectEditorMaxWidth": true,
|
||||
"maintainAspectRatio": true,
|
||||
"resizeUnits": "pixels"
|
||||
},
|
||||
{
|
||||
"name": "Height 800px",
|
||||
"resizeDimension": "height",
|
||||
"height": 800,
|
||||
"resizeScaleMode": "auto",
|
||||
"respectEditorMaxWidth": true,
|
||||
"maintainAspectRatio": true,
|
||||
"resizeUnits": "pixels"
|
||||
},
|
||||
{
|
||||
"name": "50% Width",
|
||||
"resizeDimension": "width",
|
||||
"width": 50,
|
||||
"resizeScaleMode": "auto",
|
||||
"respectEditorMaxWidth": true,
|
||||
"maintainAspectRatio": true,
|
||||
"resizeUnits": "percentage"
|
||||
},
|
||||
{
|
||||
"name": "Longest Edge 1000px",
|
||||
"resizeDimension": "longest-edge",
|
||||
"longestEdge": 1000,
|
||||
"resizeScaleMode": "auto",
|
||||
"respectEditorMaxWidth": true,
|
||||
"maintainAspectRatio": true,
|
||||
"resizeUnits": "pixels"
|
||||
},
|
||||
{
|
||||
"name": "Fit Editor",
|
||||
"resizeDimension": "editor-max-width",
|
||||
"resizeScaleMode": "auto",
|
||||
"respectEditorMaxWidth": true,
|
||||
"maintainAspectRatio": true,
|
||||
"resizeUnits": "pixels"
|
||||
},
|
||||
{
|
||||
"name": "Original Width",
|
||||
"resizeDimension": "original-width",
|
||||
"resizeScaleMode": "auto",
|
||||
"respectEditorMaxWidth": false,
|
||||
"maintainAspectRatio": true,
|
||||
"resizeUnits": "pixels"
|
||||
},
|
||||
{
|
||||
"name": "Custom (Distort)",
|
||||
"resizeDimension": "both",
|
||||
"customValue": "300x100",
|
||||
"resizeScaleMode": "auto",
|
||||
"respectEditorMaxWidth": false,
|
||||
"maintainAspectRatio": false,
|
||||
"resizeUnits": "pixels"
|
||||
}
|
||||
],
|
||||
"selectedResizePreset": "Default (No Resize)"
|
||||
},
|
||||
"resizeCursorLocation": "none",
|
||||
"dropPasteCursorLocation": "back",
|
||||
"neverProcessFilenames": "",
|
||||
"modalBehavior": "never",
|
||||
"ProcessCurrentNoteconvertTo": "webp",
|
||||
"ProcessCurrentNotequality": 0.75,
|
||||
"ProcessCurrentNoteResizeModalresizeMode": "None",
|
||||
"ProcessCurrentNoteresizeModaldesiredWidth": 600,
|
||||
"ProcessCurrentNoteresizeModaldesiredHeight": 800,
|
||||
"ProcessCurrentNoteresizeModaldesiredLength": 800,
|
||||
"ProcessCurrentNoteskipImagesInTargetFormat": false,
|
||||
"ProcessCurrentNoteEnlargeOrReduce": "Always",
|
||||
"ProcessCurrentNoteSkipFormats": "tif,tiff,heic",
|
||||
"ProcessAllVaultconvertTo": "webp",
|
||||
"ProcessAllVaultquality": 0.75,
|
||||
"ProcessAllVaultResizeModalresizeMode": "None",
|
||||
"ProcessAllVaultResizeModaldesiredWidth": 600,
|
||||
"ProcessAllVaultResizeModaldesiredHeight": 800,
|
||||
"ProcessAllVaultResizeModaldesiredLength": 800,
|
||||
"ProcessAllVaultEnlargeOrReduce": "Always",
|
||||
"ProcessAllVaultSkipFormats": "",
|
||||
"ProcessAllVaultskipImagesInTargetFormat": false,
|
||||
"annotationPresets": {
|
||||
"drawing": [
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 2
|
||||
},
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 2
|
||||
},
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 2
|
||||
}
|
||||
],
|
||||
"arrow": [
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 8
|
||||
},
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 8
|
||||
},
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 8
|
||||
}
|
||||
],
|
||||
"text": [
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 24,
|
||||
"backgroundColor": "transparent",
|
||||
"backgroundOpacity": 0.7
|
||||
},
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 24,
|
||||
"backgroundColor": "transparent",
|
||||
"backgroundOpacity": 0.7
|
||||
},
|
||||
{
|
||||
"color": "#000000",
|
||||
"opacity": 1,
|
||||
"blendMode": "source-over",
|
||||
"size": 24,
|
||||
"backgroundColor": "transparent",
|
||||
"backgroundOpacity": 0.7
|
||||
}
|
||||
]
|
||||
},
|
||||
"isImageAlignmentEnabled": true,
|
||||
"imageAlignment_cacheCleanupInterval": 3600000,
|
||||
"imageAlignment_cacheLocation": "plugin",
|
||||
"isDragResizeEnabled": true,
|
||||
"isScrollResizeEnabled": true,
|
||||
"isResizeInReadingModeEnabled": false,
|
||||
"resizeSensitivity": 0.1,
|
||||
"scrollwheelModifier": "Shift",
|
||||
"isImageResizeEnbaled": true,
|
||||
"resizeState": {
|
||||
"isResizing": false
|
||||
},
|
||||
"enableContextMenu": true,
|
||||
"showSpaceSavedNotification": true,
|
||||
"revertToOriginalIfLarger": false,
|
||||
"enableImageCaptions": true,
|
||||
"skipCaptionExtensions": "icns",
|
||||
"captionFontSize": "var(--font-smaller)",
|
||||
"captionColor": "var(--text-gray)",
|
||||
"captionFontStyle": "italic",
|
||||
"captionBackgroundColor": "transparent",
|
||||
"captionPadding": "2px 4px",
|
||||
"captionBorderRadius": "0",
|
||||
"captionOpacity": "1",
|
||||
"captionFontWeight": "normal",
|
||||
"captionTextTransform": "none",
|
||||
"captionLetterSpacing": "normal",
|
||||
"captionBorder": "none",
|
||||
"captionMarginTop": "4px",
|
||||
"captionAlignment": "center",
|
||||
"autoRename": true,
|
||||
"convertToWEBP": true,
|
||||
"convertToJPG": false,
|
||||
"convertToPNG": false,
|
||||
"convertTo": "jpg",
|
||||
"attachmentLocation": "disable",
|
||||
"attachmentSpecifiedFolder": "",
|
||||
"attachmentSubfolderName": "",
|
||||
"autoNonDestructiveResize": "disabled",
|
||||
"customSize": "",
|
||||
"desiredLength": 800,
|
||||
"resizeByDragging": true,
|
||||
"resizeWithShiftScrollwheel": true,
|
||||
"rightClickContextMenu": true
|
||||
}
|
1
.obsidian/plugins/image-converter/image-converter-image-alignments.json
vendored
Normal file
1
.obsidian/plugins/image-converter/image-converter-image-alignments.json
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
614
.obsidian/plugins/image-converter/main.js
vendored
Executable file
614
.obsidian/plugins/image-converter/main.js
vendored
Executable file
File diff suppressed because one or more lines are too long
11
.obsidian/plugins/image-converter/manifest.json
vendored
Executable file
11
.obsidian/plugins/image-converter/manifest.json
vendored
Executable file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"id": "image-converter",
|
||||
"name": "Image Converter",
|
||||
"version": "1.3.10",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Convert, compress, resize, annotate, markup, draw, crop, rotate, flip, align images directly in Obsidian. Drag-resize, rename with variables, batch process. WEBP, JPG, PNG, HEIC, TIF.",
|
||||
"author": "xRyul",
|
||||
"authorUrl": "https://github.com/xryul",
|
||||
"isDesktopOnly": false,
|
||||
"fundingUrl": "https://ko-fi.com/xryul"
|
||||
}
|
2711
.obsidian/plugins/image-converter/styles.css
vendored
Normal file
2711
.obsidian/plugins/image-converter/styles.css
vendored
Normal file
File diff suppressed because it is too large
Load diff
771
.obsidian/plugins/obsidian-auto-link-title/main.js
vendored
Executable file
771
.obsidian/plugins/obsidian-auto-link-title/main.js
vendored
Executable file
|
@ -0,0 +1,771 @@
|
|||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
|
||||
if you want to view the source visit the plugins github repository
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var obsidian = require('obsidian');
|
||||
|
||||
/******************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
||||
var e = new Error(message);
|
||||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
||||
};
|
||||
|
||||
const DEFAULT_SETTINGS = {
|
||||
regex: /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})$/i,
|
||||
lineRegex: /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi,
|
||||
linkRegex: /^\[([^\[\]]*)\]\((https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})\)$/i,
|
||||
linkLineRegex: /\[([^\[\]]*)\]\((https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})\)/gi,
|
||||
imageRegex: /\.(gif|jpe?g|tiff?|png|webp|bmp|tga|psd|ai)$/i,
|
||||
enhanceDefaultPaste: true,
|
||||
shouldPreserveSelectionAsTitle: false,
|
||||
enhanceDropEvents: true,
|
||||
websiteBlacklist: "",
|
||||
maximumTitleLength: 0,
|
||||
useNewScraper: false,
|
||||
linkPreviewApiKey: "",
|
||||
useBetterPasteId: false,
|
||||
};
|
||||
class AutoLinkTitleSettingTab extends obsidian.PluginSettingTab {
|
||||
constructor(app, plugin) {
|
||||
super(app, plugin);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
display() {
|
||||
let { containerEl } = this;
|
||||
containerEl.empty();
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName("Enhance Default Paste")
|
||||
.setDesc("Fetch the link title when pasting a link in the editor with the default paste command")
|
||||
.addToggle((val) => val
|
||||
.setValue(this.plugin.settings.enhanceDefaultPaste)
|
||||
.onChange((value) => __awaiter(this, void 0, void 0, function* () {
|
||||
console.log(value);
|
||||
this.plugin.settings.enhanceDefaultPaste = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})));
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName("Enhance Drop Events")
|
||||
.setDesc("Fetch the link title when drag and dropping a link from another program")
|
||||
.addToggle((val) => val
|
||||
.setValue(this.plugin.settings.enhanceDropEvents)
|
||||
.onChange((value) => __awaiter(this, void 0, void 0, function* () {
|
||||
console.log(value);
|
||||
this.plugin.settings.enhanceDropEvents = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})));
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName("Maximum title length")
|
||||
.setDesc("Set the maximum length of the title. Set to 0 to disable.")
|
||||
.addText((val) => val
|
||||
.setValue(this.plugin.settings.maximumTitleLength.toString(10))
|
||||
.onChange((value) => __awaiter(this, void 0, void 0, function* () {
|
||||
const titleLength = Number(value);
|
||||
this.plugin.settings.maximumTitleLength =
|
||||
isNaN(titleLength) || titleLength < 0 ? 0 : titleLength;
|
||||
yield this.plugin.saveSettings();
|
||||
})));
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName("Preserve selection as title")
|
||||
.setDesc("Whether to prefer selected text as title over fetched title when pasting")
|
||||
.addToggle((val) => val
|
||||
.setValue(this.plugin.settings.shouldPreserveSelectionAsTitle)
|
||||
.onChange((value) => __awaiter(this, void 0, void 0, function* () {
|
||||
console.log(value);
|
||||
this.plugin.settings.shouldPreserveSelectionAsTitle = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})));
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName("Website Blacklist")
|
||||
.setDesc("List of strings (comma separated) that disable autocompleting website titles. Can be URLs or arbitrary text.")
|
||||
.addTextArea((val) => val
|
||||
.setValue(this.plugin.settings.websiteBlacklist)
|
||||
.setPlaceholder("localhost, tiktok.com")
|
||||
.onChange((value) => __awaiter(this, void 0, void 0, function* () {
|
||||
this.plugin.settings.websiteBlacklist = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})));
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName("Use New Scraper")
|
||||
.setDesc("Use experimental new scraper, seems to work well on desktop but not mobile.")
|
||||
.addToggle((val) => val
|
||||
.setValue(this.plugin.settings.useNewScraper)
|
||||
.onChange((value) => __awaiter(this, void 0, void 0, function* () {
|
||||
console.log(value);
|
||||
this.plugin.settings.useNewScraper = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})));
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName("Use Better Fetching Placeholder")
|
||||
.setDesc("Use a more readable placeholder when fetching the title of a link.")
|
||||
.addToggle((val) => val
|
||||
.setValue(this.plugin.settings.useBetterPasteId)
|
||||
.onChange((value) => __awaiter(this, void 0, void 0, function* () {
|
||||
console.log(value);
|
||||
this.plugin.settings.useBetterPasteId = value;
|
||||
yield this.plugin.saveSettings();
|
||||
})));
|
||||
new obsidian.Setting(containerEl)
|
||||
.setName("LinkPreview API Key")
|
||||
.setDesc("API key for the LinkPreview.net service. Get one at https://my.linkpreview.net/access_keys")
|
||||
.addText((text) => text
|
||||
.setValue(this.plugin.settings.linkPreviewApiKey || "")
|
||||
.onChange((value) => __awaiter(this, void 0, void 0, function* () {
|
||||
const trimmedValue = value.trim();
|
||||
if (trimmedValue.length > 0 && trimmedValue.length !== 32) {
|
||||
new obsidian.Notice("LinkPreview API key must be 32 characters long");
|
||||
this.plugin.settings.linkPreviewApiKey = "";
|
||||
}
|
||||
else {
|
||||
this.plugin.settings.linkPreviewApiKey = trimmedValue;
|
||||
}
|
||||
yield this.plugin.saveSettings();
|
||||
})));
|
||||
}
|
||||
}
|
||||
|
||||
class CheckIf {
|
||||
static isMarkdownLinkAlready(editor) {
|
||||
let cursor = editor.getCursor();
|
||||
// Check if the characters before the url are ]( to indicate a markdown link
|
||||
var titleEnd = editor.getRange({ ch: cursor.ch - 2, line: cursor.line }, { ch: cursor.ch, line: cursor.line });
|
||||
return titleEnd == "](";
|
||||
}
|
||||
static isAfterQuote(editor) {
|
||||
let cursor = editor.getCursor();
|
||||
// Check if the characters before the url are " or ' to indicate we want the url directly
|
||||
// This is common in elements like <a href="linkhere"></a>
|
||||
var beforeChar = editor.getRange({ ch: cursor.ch - 1, line: cursor.line }, { ch: cursor.ch, line: cursor.line });
|
||||
return beforeChar == "\"" || beforeChar == "'";
|
||||
}
|
||||
static isUrl(text) {
|
||||
let urlRegex = new RegExp(DEFAULT_SETTINGS.regex);
|
||||
return urlRegex.test(text);
|
||||
}
|
||||
static isImage(text) {
|
||||
let imageRegex = new RegExp(DEFAULT_SETTINGS.imageRegex);
|
||||
return imageRegex.test(text);
|
||||
}
|
||||
static isLinkedUrl(text) {
|
||||
let urlRegex = new RegExp(DEFAULT_SETTINGS.linkRegex);
|
||||
return urlRegex.test(text);
|
||||
}
|
||||
}
|
||||
|
||||
class EditorExtensions {
|
||||
static getSelectedText(editor) {
|
||||
if (!editor.somethingSelected()) {
|
||||
let wordBoundaries = this.getWordBoundaries(editor);
|
||||
editor.setSelection(wordBoundaries.start, wordBoundaries.end);
|
||||
}
|
||||
return editor.getSelection();
|
||||
}
|
||||
static cursorWithinBoundaries(cursor, match) {
|
||||
let startIndex = match.index;
|
||||
let endIndex = match.index + match[0].length;
|
||||
return startIndex <= cursor.ch && cursor.ch <= endIndex;
|
||||
}
|
||||
static getWordBoundaries(editor) {
|
||||
let cursor = editor.getCursor();
|
||||
// If its a normal URL token this is not a markdown link
|
||||
// In this case we can simply overwrite the link boundaries as-is
|
||||
let lineText = editor.getLine(cursor.line);
|
||||
// First check if we're in a link
|
||||
let linksInLine = lineText.matchAll(DEFAULT_SETTINGS.linkLineRegex);
|
||||
for (let match of linksInLine) {
|
||||
if (this.cursorWithinBoundaries(cursor, match)) {
|
||||
return {
|
||||
start: { line: cursor.line, ch: match.index },
|
||||
end: { line: cursor.line, ch: match.index + match[0].length },
|
||||
};
|
||||
}
|
||||
}
|
||||
// If not, check if we're in just a standard ol' URL.
|
||||
let urlsInLine = lineText.matchAll(DEFAULT_SETTINGS.lineRegex);
|
||||
for (let match of urlsInLine) {
|
||||
if (this.cursorWithinBoundaries(cursor, match)) {
|
||||
return {
|
||||
start: { line: cursor.line, ch: match.index },
|
||||
end: { line: cursor.line, ch: match.index + match[0].length },
|
||||
};
|
||||
}
|
||||
}
|
||||
return {
|
||||
start: cursor,
|
||||
end: cursor,
|
||||
};
|
||||
}
|
||||
static getEditorPositionFromIndex(content, index) {
|
||||
let substr = content.substr(0, index);
|
||||
let l = 0;
|
||||
let offset = -1;
|
||||
let r = -1;
|
||||
for (; (r = substr.indexOf("\n", r + 1)) !== -1; l++, offset = r)
|
||||
;
|
||||
offset += 1;
|
||||
let ch = content.substr(offset, index - offset).length;
|
||||
return { line: l, ch: ch };
|
||||
}
|
||||
}
|
||||
|
||||
function blank$1(text) {
|
||||
return text === undefined || text === null || text === '';
|
||||
}
|
||||
function notBlank$1(text) {
|
||||
return !blank$1(text);
|
||||
}
|
||||
function scrape(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const response = yield obsidian.requestUrl(url);
|
||||
if (!response.headers['content-type'].includes('text/html'))
|
||||
return getUrlFinalSegment$1(url);
|
||||
const html = response.text;
|
||||
const doc = new DOMParser().parseFromString(html, 'text/html');
|
||||
const title = doc.querySelector('title');
|
||||
if (blank$1(title === null || title === void 0 ? void 0 : title.innerText)) {
|
||||
// If site is javascript based and has a no-title attribute when unloaded, use it.
|
||||
var noTitle = title === null || title === void 0 ? void 0 : title.getAttr('no-title');
|
||||
if (notBlank$1(noTitle)) {
|
||||
return noTitle;
|
||||
}
|
||||
// Otherwise if the site has no title/requires javascript simply return Title Unknown
|
||||
return url;
|
||||
}
|
||||
return title.innerText;
|
||||
}
|
||||
catch (ex) {
|
||||
console.error(ex);
|
||||
return '';
|
||||
}
|
||||
});
|
||||
}
|
||||
function getUrlFinalSegment$1(url) {
|
||||
try {
|
||||
const segments = new URL(url).pathname.split('/');
|
||||
const last = segments.pop() || segments.pop(); // Handle potential trailing slash
|
||||
return last;
|
||||
}
|
||||
catch (_) {
|
||||
return 'File';
|
||||
}
|
||||
}
|
||||
function getPageTitle$1(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!(url.startsWith('http') || url.startsWith('https'))) {
|
||||
url = 'https://' + url;
|
||||
}
|
||||
return scrape(url);
|
||||
});
|
||||
}
|
||||
|
||||
const electronPkg = require("electron");
|
||||
function blank(text) {
|
||||
return text === undefined || text === null || text === "";
|
||||
}
|
||||
function notBlank(text) {
|
||||
return !blank(text);
|
||||
}
|
||||
// async wrapper to load a url and settle on load finish or fail
|
||||
function load(window, url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve, reject) => {
|
||||
window.webContents.on("did-finish-load", (event) => resolve(event));
|
||||
window.webContents.on("did-fail-load", (event) => reject(event));
|
||||
window.loadURL(url);
|
||||
});
|
||||
});
|
||||
}
|
||||
function electronGetPageTitle(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { remote } = electronPkg;
|
||||
const { BrowserWindow } = remote;
|
||||
try {
|
||||
const window = new BrowserWindow({
|
||||
width: 1000,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
webSecurity: false,
|
||||
nodeIntegration: true,
|
||||
images: false,
|
||||
},
|
||||
show: false,
|
||||
});
|
||||
window.webContents.setAudioMuted(true);
|
||||
window.webContents.on("will-navigate", (event, newUrl) => {
|
||||
event.preventDefault();
|
||||
window.loadURL(newUrl);
|
||||
});
|
||||
yield load(window, url);
|
||||
try {
|
||||
const title = window.webContents.getTitle();
|
||||
window.destroy();
|
||||
if (notBlank(title)) {
|
||||
return title;
|
||||
}
|
||||
else {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
catch (ex) {
|
||||
window.destroy();
|
||||
return url;
|
||||
}
|
||||
}
|
||||
catch (ex) {
|
||||
console.error(ex);
|
||||
return "";
|
||||
}
|
||||
});
|
||||
}
|
||||
function nonElectronGetPageTitle(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const html = yield obsidian.request({ url });
|
||||
const doc = new DOMParser().parseFromString(html, "text/html");
|
||||
const title = doc.querySelectorAll("title")[0];
|
||||
if (title == null || blank(title === null || title === void 0 ? void 0 : title.innerText)) {
|
||||
// If site is javascript based and has a no-title attribute when unloaded, use it.
|
||||
var noTitle = title === null || title === void 0 ? void 0 : title.getAttr("no-title");
|
||||
if (notBlank(noTitle)) {
|
||||
return noTitle;
|
||||
}
|
||||
// Otherwise if the site has no title/requires javascript simply return Title Unknown
|
||||
return url;
|
||||
}
|
||||
return title.innerText;
|
||||
}
|
||||
catch (ex) {
|
||||
console.error(ex);
|
||||
return "";
|
||||
}
|
||||
});
|
||||
}
|
||||
function getUrlFinalSegment(url) {
|
||||
try {
|
||||
const segments = new URL(url).pathname.split('/');
|
||||
const last = segments.pop() || segments.pop(); // Handle potential trailing slash
|
||||
return last;
|
||||
}
|
||||
catch (_) {
|
||||
return "File";
|
||||
}
|
||||
}
|
||||
function tryGetFileType(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const response = yield fetch(url, { method: "HEAD" });
|
||||
// Ensure site returns an ok status code before scraping
|
||||
if (!response.ok) {
|
||||
return "Site Unreachable";
|
||||
}
|
||||
// Ensure site is an actual HTML page and not a pdf or 3 gigabyte video file.
|
||||
let contentType = response.headers.get("content-type");
|
||||
if (!contentType.includes("text/html")) {
|
||||
return getUrlFinalSegment(url);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch (err) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
function getPageTitle(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// If we're on Desktop use the Electron scraper
|
||||
if (!(url.startsWith("http") || url.startsWith("https"))) {
|
||||
url = "https://" + url;
|
||||
}
|
||||
// Try to do a HEAD request to see if the site is reachable and if it's an HTML page
|
||||
// If we error out due to CORS, we'll just try to scrape the page anyway.
|
||||
let fileType = yield tryGetFileType(url);
|
||||
if (fileType) {
|
||||
return fileType;
|
||||
}
|
||||
if (electronPkg != null) {
|
||||
return electronGetPageTitle(url);
|
||||
}
|
||||
else {
|
||||
return nonElectronGetPageTitle(url);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
class AutoLinkTitle extends obsidian.Plugin {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.shortTitle = (title) => {
|
||||
if (this.settings.maximumTitleLength === 0) {
|
||||
return title;
|
||||
}
|
||||
if (title.length < this.settings.maximumTitleLength + 3) {
|
||||
return title;
|
||||
}
|
||||
const shortenedTitle = `${title.slice(0, this.settings.maximumTitleLength)}...`;
|
||||
return shortenedTitle;
|
||||
};
|
||||
}
|
||||
onload() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
console.log("loading obsidian-auto-link-title");
|
||||
yield this.loadSettings();
|
||||
this.blacklist = this.settings.websiteBlacklist
|
||||
.split(",")
|
||||
.map((s) => s.trim())
|
||||
.filter((s) => s.length > 0);
|
||||
// Listen to paste event
|
||||
this.pasteFunction = this.pasteUrlWithTitle.bind(this);
|
||||
// Listen to drop event
|
||||
this.dropFunction = this.dropUrlWithTitle.bind(this);
|
||||
this.addCommand({
|
||||
id: "auto-link-title-paste",
|
||||
name: "Paste URL and auto fetch title",
|
||||
editorCallback: (editor) => this.manualPasteUrlWithTitle(editor),
|
||||
hotkeys: [],
|
||||
});
|
||||
this.addCommand({
|
||||
id: "auto-link-title-normal-paste",
|
||||
name: "Normal paste (no fetching behavior)",
|
||||
editorCallback: (editor) => this.normalPaste(editor),
|
||||
hotkeys: [
|
||||
{
|
||||
modifiers: ["Mod", "Shift"],
|
||||
key: "v",
|
||||
},
|
||||
],
|
||||
});
|
||||
this.registerEvent(this.app.workspace.on("editor-paste", this.pasteFunction));
|
||||
this.registerEvent(this.app.workspace.on("editor-drop", this.dropFunction));
|
||||
this.addCommand({
|
||||
id: "enhance-url-with-title",
|
||||
name: "Enhance existing URL with link and title",
|
||||
editorCallback: (editor) => this.addTitleToLink(editor),
|
||||
hotkeys: [
|
||||
{
|
||||
modifiers: ["Mod", "Shift"],
|
||||
key: "e",
|
||||
},
|
||||
],
|
||||
});
|
||||
this.addSettingTab(new AutoLinkTitleSettingTab(this.app, this));
|
||||
});
|
||||
}
|
||||
addTitleToLink(editor) {
|
||||
// Only attempt fetch if online
|
||||
if (!navigator.onLine)
|
||||
return;
|
||||
let selectedText = (EditorExtensions.getSelectedText(editor) || "").trim();
|
||||
// If the cursor is on a raw html link, convert to a markdown link and fetch title
|
||||
if (CheckIf.isUrl(selectedText)) {
|
||||
this.convertUrlToTitledLink(editor, selectedText);
|
||||
}
|
||||
// If the cursor is on the URL part of a markdown link, fetch title and replace existing link title
|
||||
else if (CheckIf.isLinkedUrl(selectedText)) {
|
||||
const link = this.getUrlFromLink(selectedText);
|
||||
this.convertUrlToTitledLink(editor, link);
|
||||
}
|
||||
}
|
||||
normalPaste(editor) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let clipboardText = yield navigator.clipboard.readText();
|
||||
if (clipboardText === null || clipboardText === "")
|
||||
return;
|
||||
editor.replaceSelection(clipboardText);
|
||||
});
|
||||
}
|
||||
// Simulate standard paste but using editor.replaceSelection with clipboard text since we can't seem to dispatch a paste event.
|
||||
manualPasteUrlWithTitle(editor) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const clipboardText = yield navigator.clipboard.readText();
|
||||
// Only attempt fetch if online
|
||||
if (!navigator.onLine) {
|
||||
editor.replaceSelection(clipboardText);
|
||||
return;
|
||||
}
|
||||
if (clipboardText == null || clipboardText == "")
|
||||
return;
|
||||
// If its not a URL, we return false to allow the default paste handler to take care of it.
|
||||
// Similarly, image urls don't have a meaningful <title> attribute so downloading it
|
||||
// to fetch the title is a waste of bandwidth.
|
||||
if (!CheckIf.isUrl(clipboardText) || CheckIf.isImage(clipboardText)) {
|
||||
editor.replaceSelection(clipboardText);
|
||||
return;
|
||||
}
|
||||
// If it looks like we're pasting the url into a markdown link already, don't fetch title
|
||||
// as the user has already probably put a meaningful title, also it would lead to the title
|
||||
// being inside the link.
|
||||
if (CheckIf.isMarkdownLinkAlready(editor) || CheckIf.isAfterQuote(editor)) {
|
||||
editor.replaceSelection(clipboardText);
|
||||
return;
|
||||
}
|
||||
// If url is pasted over selected text and setting is enabled, no need to fetch title,
|
||||
// just insert a link
|
||||
let selectedText = (EditorExtensions.getSelectedText(editor) || "").trim();
|
||||
if (selectedText && this.settings.shouldPreserveSelectionAsTitle) {
|
||||
editor.replaceSelection(`[${selectedText}](${clipboardText})`);
|
||||
return;
|
||||
}
|
||||
// At this point we're just pasting a link in a normal fashion, fetch its title.
|
||||
this.convertUrlToTitledLink(editor, clipboardText);
|
||||
return;
|
||||
});
|
||||
}
|
||||
pasteUrlWithTitle(clipboard, editor) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!this.settings.enhanceDefaultPaste) {
|
||||
return;
|
||||
}
|
||||
if (clipboard.defaultPrevented)
|
||||
return;
|
||||
// Only attempt fetch if online
|
||||
if (!navigator.onLine)
|
||||
return;
|
||||
let clipboardText = clipboard.clipboardData.getData("text/plain");
|
||||
if (clipboardText === null || clipboardText === "")
|
||||
return;
|
||||
// If its not a URL, we return false to allow the default paste handler to take care of it.
|
||||
// Similarly, image urls don't have a meaningful <title> attribute so downloading it
|
||||
// to fetch the title is a waste of bandwidth.
|
||||
if (!CheckIf.isUrl(clipboardText) || CheckIf.isImage(clipboardText)) {
|
||||
return;
|
||||
}
|
||||
// We've decided to handle the paste, stop propagation to the default handler.
|
||||
clipboard.stopPropagation();
|
||||
clipboard.preventDefault();
|
||||
// If it looks like we're pasting the url into a markdown link already, don't fetch title
|
||||
// as the user has already probably put a meaningful title, also it would lead to the title
|
||||
// being inside the link.
|
||||
if (CheckIf.isMarkdownLinkAlready(editor) || CheckIf.isAfterQuote(editor)) {
|
||||
editor.replaceSelection(clipboardText);
|
||||
return;
|
||||
}
|
||||
// If url is pasted over selected text and setting is enabled, no need to fetch title,
|
||||
// just insert a link
|
||||
let selectedText = (EditorExtensions.getSelectedText(editor) || "").trim();
|
||||
if (selectedText && this.settings.shouldPreserveSelectionAsTitle) {
|
||||
editor.replaceSelection(`[${selectedText}](${clipboardText})`);
|
||||
return;
|
||||
}
|
||||
// At this point we're just pasting a link in a normal fashion, fetch its title.
|
||||
this.convertUrlToTitledLink(editor, clipboardText);
|
||||
return;
|
||||
});
|
||||
}
|
||||
dropUrlWithTitle(dropEvent, editor) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!this.settings.enhanceDropEvents) {
|
||||
return;
|
||||
}
|
||||
if (dropEvent.defaultPrevented)
|
||||
return;
|
||||
// Only attempt fetch if online
|
||||
if (!navigator.onLine)
|
||||
return;
|
||||
let dropText = dropEvent.dataTransfer.getData("text/plain");
|
||||
if (dropText === null || dropText === "")
|
||||
return;
|
||||
// If its not a URL, we return false to allow the default paste handler to take care of it.
|
||||
// Similarly, image urls don't have a meaningful <title> attribute so downloading it
|
||||
// to fetch the title is a waste of bandwidth.
|
||||
if (!CheckIf.isUrl(dropText) || CheckIf.isImage(dropText)) {
|
||||
return;
|
||||
}
|
||||
// We've decided to handle the paste, stop propagation to the default handler.
|
||||
dropEvent.stopPropagation();
|
||||
dropEvent.preventDefault();
|
||||
// If it looks like we're pasting the url into a markdown link already, don't fetch title
|
||||
// as the user has already probably put a meaningful title, also it would lead to the title
|
||||
// being inside the link.
|
||||
if (CheckIf.isMarkdownLinkAlready(editor) || CheckIf.isAfterQuote(editor)) {
|
||||
editor.replaceSelection(dropText);
|
||||
return;
|
||||
}
|
||||
// If url is pasted over selected text and setting is enabled, no need to fetch title,
|
||||
// just insert a link
|
||||
let selectedText = (EditorExtensions.getSelectedText(editor) || "").trim();
|
||||
if (selectedText && this.settings.shouldPreserveSelectionAsTitle) {
|
||||
editor.replaceSelection(`[${selectedText}](${dropText})`);
|
||||
return;
|
||||
}
|
||||
// At this point we're just pasting a link in a normal fashion, fetch its title.
|
||||
this.convertUrlToTitledLink(editor, dropText);
|
||||
return;
|
||||
});
|
||||
}
|
||||
isBlacklisted(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.loadSettings();
|
||||
this.blacklist = this.settings.websiteBlacklist
|
||||
.split(/,|\n/)
|
||||
.map((s) => s.trim())
|
||||
.filter((s) => s.length > 0);
|
||||
return this.blacklist.some((site) => url.includes(site));
|
||||
});
|
||||
}
|
||||
convertUrlToTitledLink(editor, url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (yield this.isBlacklisted(url)) {
|
||||
let domain = new URL(url).hostname;
|
||||
editor.replaceSelection(`[${domain}](${url})`);
|
||||
return;
|
||||
}
|
||||
// Generate a unique id for find/replace operations for the title.
|
||||
const pasteId = this.getPasteId();
|
||||
// Instantly paste so you don't wonder if paste is broken
|
||||
editor.replaceSelection(`[${pasteId}](${url})`);
|
||||
// Fetch title from site, replace Fetching Title with actual title
|
||||
const title = yield this.fetchUrlTitle(url);
|
||||
const escapedTitle = this.escapeMarkdown(title);
|
||||
const shortenedTitle = this.shortTitle(escapedTitle);
|
||||
const text = editor.getValue();
|
||||
const start = text.indexOf(pasteId);
|
||||
if (start < 0) {
|
||||
console.log(`Unable to find text "${pasteId}" in current editor, bailing out; link ${url}`);
|
||||
}
|
||||
else {
|
||||
const end = start + pasteId.length;
|
||||
const startPos = EditorExtensions.getEditorPositionFromIndex(text, start);
|
||||
const endPos = EditorExtensions.getEditorPositionFromIndex(text, end);
|
||||
editor.replaceRange(shortenedTitle, startPos, endPos);
|
||||
}
|
||||
});
|
||||
}
|
||||
escapeMarkdown(text) {
|
||||
var unescaped = text.replace(/\\(\*|_|`|~|\\|\[|\])/g, "$1"); // unescape any "backslashed" character
|
||||
var escaped = unescaped.replace(/(\*|_|`|<|>|~|\\|\[|\])/g, "\\$1"); // escape *, _, `, ~, \, [, ], <, and >
|
||||
var escaped = unescaped.replace(/(\*|_|`|\||<|>|~|\\|\[|\])/g, "\\$1"); // escape *, _, `, ~, \, |, [, ], <, and >
|
||||
return escaped;
|
||||
}
|
||||
fetchUrlTitleViaLinkPreview(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (this.settings.linkPreviewApiKey.length !== 32) {
|
||||
console.error("LinkPreview API key is not 32 characters long, please check your settings");
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
const apiEndpoint = `https://api.linkpreview.net/?q=${encodeURIComponent(url)}`;
|
||||
const response = yield fetch(apiEndpoint, {
|
||||
headers: {
|
||||
"X-Linkpreview-Api-Key": this.settings.linkPreviewApiKey,
|
||||
},
|
||||
});
|
||||
const data = yield response.json();
|
||||
return data.title;
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
return "";
|
||||
}
|
||||
});
|
||||
}
|
||||
fetchUrlTitle(url) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
let title = "";
|
||||
title = yield this.fetchUrlTitleViaLinkPreview(url);
|
||||
console.log(`Title via Link Preview: ${title}`);
|
||||
if (title === "") {
|
||||
console.log("Title via Link Preview failed, falling back to scraper");
|
||||
if (this.settings.useNewScraper) {
|
||||
console.log("Using new scraper");
|
||||
title = yield getPageTitle$1(url);
|
||||
}
|
||||
else {
|
||||
console.log("Using old scraper");
|
||||
title = yield getPageTitle(url);
|
||||
}
|
||||
}
|
||||
console.log(`Title: ${title}`);
|
||||
title =
|
||||
title.replace(/(\r\n|\n|\r)/gm, "").trim() ||
|
||||
"Title Unavailable | Site Unreachable";
|
||||
return title;
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
return "Error fetching title";
|
||||
}
|
||||
});
|
||||
}
|
||||
getUrlFromLink(link) {
|
||||
let urlRegex = new RegExp(DEFAULT_SETTINGS.linkRegex);
|
||||
return urlRegex.exec(link)[2];
|
||||
}
|
||||
getPasteId() {
|
||||
var base = "Fetching Title";
|
||||
if (this.settings.useBetterPasteId) {
|
||||
return this.getBetterPasteId(base);
|
||||
}
|
||||
else {
|
||||
return `${base}#${this.createBlockHash()}`;
|
||||
}
|
||||
}
|
||||
getBetterPasteId(base) {
|
||||
// After every character, add 0, 1 or 2 invisible characters
|
||||
// so that to the user it looks just like the base string.
|
||||
// The number of combinations is 3^14 = 4782969
|
||||
let result = "";
|
||||
var invisibleCharacter = "\u200B";
|
||||
var maxInvisibleCharacters = 2;
|
||||
for (var i = 0; i < base.length; i++) {
|
||||
var count = Math.floor(Math.random() * (maxInvisibleCharacters + 1));
|
||||
result += base.charAt(i) + invisibleCharacter.repeat(count);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// Custom hashid by @shabegom
|
||||
createBlockHash() {
|
||||
let result = "";
|
||||
var characters = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
var charactersLength = characters.length;
|
||||
for (var i = 0; i < 4; i++) {
|
||||
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
onunload() {
|
||||
console.log("unloading obsidian-auto-link-title");
|
||||
}
|
||||
loadSettings() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData());
|
||||
});
|
||||
}
|
||||
saveSettings() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.saveData(this.settings);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AutoLinkTitle;
|
||||
|
||||
|
||||
/* nosourcemap */
|
10
.obsidian/plugins/obsidian-auto-link-title/manifest.json
vendored
Executable file
10
.obsidian/plugins/obsidian-auto-link-title/manifest.json
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"id": "obsidian-auto-link-title",
|
||||
"name": "Auto Link Title",
|
||||
"version": "1.5.5",
|
||||
"minAppVersion": "0.12.17",
|
||||
"description": "This plugin automatically fetches the titles of links from the web",
|
||||
"author": "Matt Furden",
|
||||
"authorUrl": "https://github.com/zolrath",
|
||||
"isDesktopOnly": false
|
||||
}
|
1
.obsidian/plugins/obsidian-auto-link-title/styles.css
vendored
Executable file
1
.obsidian/plugins/obsidian-auto-link-title/styles.css
vendored
Executable file
|
@ -0,0 +1 @@
|
|||
/* no styles */
|
803
.obsidian/plugins/obsidian-excalidraw-plugin/data.json
vendored
Executable file
803
.obsidian/plugins/obsidian-excalidraw-plugin/data.json
vendored
Executable file
|
@ -0,0 +1,803 @@
|
|||
{
|
||||
"folder": "Excalidraw",
|
||||
"cropFolder": "",
|
||||
"annotateFolder": "",
|
||||
"embedUseExcalidrawFolder": false,
|
||||
"templateFilePath": "Excalidraw/Template.excalidraw",
|
||||
"scriptFolderPath": "Excalidraw/Scripts",
|
||||
"fontAssetsPath": "Excalidraw/CJK Fonts",
|
||||
"loadChineseFonts": false,
|
||||
"loadJapaneseFonts": false,
|
||||
"loadKoreanFonts": false,
|
||||
"compress": true,
|
||||
"decompressForMDView": false,
|
||||
"onceOffCompressFlagReset": true,
|
||||
"onceOffGPTVersionReset": true,
|
||||
"autosave": true,
|
||||
"autosaveIntervalDesktop": 15000,
|
||||
"autosaveIntervalMobile": 10000,
|
||||
"drawingFilenamePrefix": "Drawing ",
|
||||
"drawingEmbedPrefixWithFilename": true,
|
||||
"drawingFilnameEmbedPostfix": " ",
|
||||
"drawingFilenameDateTime": "YYYY-MM-DD HH.mm.ss",
|
||||
"useExcalidrawExtension": true,
|
||||
"cropPrefix": "cropped_",
|
||||
"annotatePrefix": "annotated_",
|
||||
"annotatePreserveSize": false,
|
||||
"previewImageType": "SVGIMG",
|
||||
"renderingConcurrency": 3,
|
||||
"allowImageCache": true,
|
||||
"allowImageCacheInScene": true,
|
||||
"displayExportedImageIfAvailable": false,
|
||||
"previewMatchObsidianTheme": false,
|
||||
"width": "400",
|
||||
"height": "",
|
||||
"overrideObsidianFontSize": false,
|
||||
"dynamicStyling": "colorful",
|
||||
"isLeftHanded": false,
|
||||
"iframeMatchExcalidrawTheme": true,
|
||||
"matchTheme": false,
|
||||
"matchThemeAlways": false,
|
||||
"matchThemeTrigger": false,
|
||||
"defaultMode": "normal",
|
||||
"defaultPenMode": "never",
|
||||
"penModeDoubleTapEraser": true,
|
||||
"penModeSingleFingerPanning": true,
|
||||
"penModeCrosshairVisible": true,
|
||||
"renderImageInMarkdownReadingMode": false,
|
||||
"renderImageInHoverPreviewForMDNotes": false,
|
||||
"renderImageInMarkdownToPDF": false,
|
||||
"allowPinchZoom": false,
|
||||
"allowWheelZoom": false,
|
||||
"zoomToFitOnOpen": true,
|
||||
"zoomToFitOnResize": true,
|
||||
"zoomToFitMaxLevel": 2,
|
||||
"linkPrefix": "📍",
|
||||
"urlPrefix": "🌐",
|
||||
"parseTODO": false,
|
||||
"todo": "☐",
|
||||
"done": "🗹",
|
||||
"hoverPreviewWithoutCTRL": false,
|
||||
"linkOpacity": 1,
|
||||
"openInAdjacentPane": false,
|
||||
"showSecondOrderLinks": true,
|
||||
"focusOnFileTab": false,
|
||||
"openInMainWorkspace": true,
|
||||
"showLinkBrackets": true,
|
||||
"allowCtrlClick": true,
|
||||
"forceWrap": false,
|
||||
"pageTransclusionCharLimit": 200,
|
||||
"wordWrappingDefault": 0,
|
||||
"removeTransclusionQuoteSigns": true,
|
||||
"iframelyAllowed": true,
|
||||
"pngExportScale": 1,
|
||||
"exportWithTheme": true,
|
||||
"exportWithBackground": true,
|
||||
"exportPaddingSVG": 10,
|
||||
"exportEmbedScene": false,
|
||||
"keepInSync": false,
|
||||
"autoexportSVG": false,
|
||||
"autoexportPNG": false,
|
||||
"autoExportLightAndDark": false,
|
||||
"autoexportExcalidraw": false,
|
||||
"embedType": "excalidraw",
|
||||
"embedMarkdownCommentLinks": true,
|
||||
"embedWikiLink": true,
|
||||
"syncExcalidraw": false,
|
||||
"experimentalFileType": false,
|
||||
"experimentalFileTag": "✏️",
|
||||
"experimentalLivePreview": true,
|
||||
"fadeOutExcalidrawMarkup": false,
|
||||
"loadPropertySuggestions": true,
|
||||
"experimentalEnableFourthFont": false,
|
||||
"experimantalFourthFont": "Virgil",
|
||||
"addDummyTextElement": false,
|
||||
"zoteroCompatibility": false,
|
||||
"fieldSuggester": true,
|
||||
"compatibilityMode": false,
|
||||
"drawingOpenCount": 0,
|
||||
"library": "deprecated",
|
||||
"library2": {
|
||||
"type": "excalidrawlib",
|
||||
"version": 2,
|
||||
"source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.10.1",
|
||||
"libraryItems": []
|
||||
},
|
||||
"imageElementNotice": true,
|
||||
"mdSVGwidth": 500,
|
||||
"mdSVGmaxHeight": 800,
|
||||
"mdFont": "Virgil",
|
||||
"mdFontColor": "Black",
|
||||
"mdBorderColor": "Black",
|
||||
"mdCSS": "",
|
||||
"scriptEngineSettings": {},
|
||||
"defaultTrayMode": true,
|
||||
"previousRelease": "2.10.1",
|
||||
"showReleaseNotes": true,
|
||||
"showNewVersionNotification": true,
|
||||
"latexBoilerplate": "\\color{blue}",
|
||||
"latexPreambleLocation": "preamble.sty",
|
||||
"taskboneEnabled": false,
|
||||
"taskboneAPIkey": "",
|
||||
"pinnedScripts": [],
|
||||
"customPens": [
|
||||
{
|
||||
"type": "default",
|
||||
"freedrawOnly": false,
|
||||
"strokeColor": "#000000",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "hachure",
|
||||
"strokeWidth": 0,
|
||||
"roughness": 0,
|
||||
"penOptions": {
|
||||
"highlighter": false,
|
||||
"constantPressure": false,
|
||||
"hasOutline": false,
|
||||
"outlineWidth": 1,
|
||||
"options": {
|
||||
"thinning": 0.6,
|
||||
"smoothing": 0.5,
|
||||
"streamline": 0.5,
|
||||
"easing": "easeOutSine",
|
||||
"start": {
|
||||
"cap": true,
|
||||
"taper": 0,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"cap": true,
|
||||
"taper": 0,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "highlighter",
|
||||
"freedrawOnly": true,
|
||||
"strokeColor": "#FFC47C",
|
||||
"backgroundColor": "#FFC47C",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"roughness": null,
|
||||
"penOptions": {
|
||||
"highlighter": true,
|
||||
"constantPressure": true,
|
||||
"hasOutline": true,
|
||||
"outlineWidth": 4,
|
||||
"options": {
|
||||
"thinning": 1,
|
||||
"smoothing": 0.5,
|
||||
"streamline": 0.5,
|
||||
"easing": "linear",
|
||||
"start": {
|
||||
"taper": 0,
|
||||
"cap": true,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"taper": 0,
|
||||
"cap": true,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "finetip",
|
||||
"freedrawOnly": false,
|
||||
"strokeColor": "#3E6F8D",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "hachure",
|
||||
"strokeWidth": 0.5,
|
||||
"roughness": 0,
|
||||
"penOptions": {
|
||||
"highlighter": false,
|
||||
"hasOutline": false,
|
||||
"outlineWidth": 1,
|
||||
"constantPressure": true,
|
||||
"options": {
|
||||
"smoothing": 0.4,
|
||||
"thinning": -0.5,
|
||||
"streamline": 0.4,
|
||||
"easing": "linear",
|
||||
"start": {
|
||||
"taper": 5,
|
||||
"cap": false,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"taper": 5,
|
||||
"cap": false,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "fountain",
|
||||
"freedrawOnly": false,
|
||||
"strokeColor": "#000000",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "hachure",
|
||||
"strokeWidth": 2,
|
||||
"roughness": 0,
|
||||
"penOptions": {
|
||||
"highlighter": false,
|
||||
"constantPressure": false,
|
||||
"hasOutline": false,
|
||||
"outlineWidth": 1,
|
||||
"options": {
|
||||
"smoothing": 0.2,
|
||||
"thinning": 0.6,
|
||||
"streamline": 0.2,
|
||||
"easing": "easeInOutSine",
|
||||
"start": {
|
||||
"taper": 150,
|
||||
"cap": true,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"taper": 1,
|
||||
"cap": true,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "marker",
|
||||
"freedrawOnly": true,
|
||||
"strokeColor": "#B83E3E",
|
||||
"backgroundColor": "#FF7C7C",
|
||||
"fillStyle": "dashed",
|
||||
"strokeWidth": 2,
|
||||
"roughness": 3,
|
||||
"penOptions": {
|
||||
"highlighter": false,
|
||||
"constantPressure": true,
|
||||
"hasOutline": true,
|
||||
"outlineWidth": 4,
|
||||
"options": {
|
||||
"thinning": 1,
|
||||
"smoothing": 0.5,
|
||||
"streamline": 0.5,
|
||||
"easing": "linear",
|
||||
"start": {
|
||||
"taper": 0,
|
||||
"cap": true,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"taper": 0,
|
||||
"cap": true,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "thick-thin",
|
||||
"freedrawOnly": true,
|
||||
"strokeColor": "#CECDCC",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "hachure",
|
||||
"strokeWidth": 0,
|
||||
"roughness": null,
|
||||
"penOptions": {
|
||||
"highlighter": true,
|
||||
"constantPressure": true,
|
||||
"hasOutline": false,
|
||||
"outlineWidth": 1,
|
||||
"options": {
|
||||
"thinning": 1,
|
||||
"smoothing": 0.5,
|
||||
"streamline": 0.5,
|
||||
"easing": "linear",
|
||||
"start": {
|
||||
"taper": 0,
|
||||
"cap": true,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"cap": true,
|
||||
"taper": true,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "thin-thick-thin",
|
||||
"freedrawOnly": true,
|
||||
"strokeColor": "#CECDCC",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "hachure",
|
||||
"strokeWidth": 0,
|
||||
"roughness": null,
|
||||
"penOptions": {
|
||||
"highlighter": true,
|
||||
"constantPressure": true,
|
||||
"hasOutline": false,
|
||||
"outlineWidth": 1,
|
||||
"options": {
|
||||
"thinning": 1,
|
||||
"smoothing": 0.5,
|
||||
"streamline": 0.5,
|
||||
"easing": "linear",
|
||||
"start": {
|
||||
"cap": true,
|
||||
"taper": true,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"cap": true,
|
||||
"taper": true,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"freedrawOnly": false,
|
||||
"strokeColor": "#000000",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "hachure",
|
||||
"strokeWidth": 0,
|
||||
"roughness": 0,
|
||||
"penOptions": {
|
||||
"highlighter": false,
|
||||
"constantPressure": false,
|
||||
"hasOutline": false,
|
||||
"outlineWidth": 1,
|
||||
"options": {
|
||||
"thinning": 0.6,
|
||||
"smoothing": 0.5,
|
||||
"streamline": 0.5,
|
||||
"easing": "easeOutSine",
|
||||
"start": {
|
||||
"cap": true,
|
||||
"taper": 0,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"cap": true,
|
||||
"taper": 0,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"freedrawOnly": false,
|
||||
"strokeColor": "#000000",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "hachure",
|
||||
"strokeWidth": 0,
|
||||
"roughness": 0,
|
||||
"penOptions": {
|
||||
"highlighter": false,
|
||||
"constantPressure": false,
|
||||
"hasOutline": false,
|
||||
"outlineWidth": 1,
|
||||
"options": {
|
||||
"thinning": 0.6,
|
||||
"smoothing": 0.5,
|
||||
"streamline": 0.5,
|
||||
"easing": "easeOutSine",
|
||||
"start": {
|
||||
"cap": true,
|
||||
"taper": 0,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"cap": true,
|
||||
"taper": 0,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"freedrawOnly": false,
|
||||
"strokeColor": "#000000",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "hachure",
|
||||
"strokeWidth": 0,
|
||||
"roughness": 0,
|
||||
"penOptions": {
|
||||
"highlighter": false,
|
||||
"constantPressure": false,
|
||||
"hasOutline": false,
|
||||
"outlineWidth": 1,
|
||||
"options": {
|
||||
"thinning": 0.6,
|
||||
"smoothing": 0.5,
|
||||
"streamline": 0.5,
|
||||
"easing": "easeOutSine",
|
||||
"start": {
|
||||
"cap": true,
|
||||
"taper": 0,
|
||||
"easing": "linear"
|
||||
},
|
||||
"end": {
|
||||
"cap": true,
|
||||
"taper": 0,
|
||||
"easing": "linear"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"numberOfCustomPens": 0,
|
||||
"pdfScale": 4,
|
||||
"pdfBorderBox": true,
|
||||
"pdfFrame": false,
|
||||
"pdfGapSize": 20,
|
||||
"pdfGroupPages": false,
|
||||
"pdfLockAfterImport": true,
|
||||
"pdfNumColumns": 1,
|
||||
"pdfNumRows": 1,
|
||||
"pdfDirection": "right",
|
||||
"pdfImportScale": 0.3,
|
||||
"gridSettings": {
|
||||
"DYNAMIC_COLOR": true,
|
||||
"COLOR": "#000000",
|
||||
"OPACITY": 50,
|
||||
"GRID_DIRECTION": {
|
||||
"horizontal": true,
|
||||
"vertical": true
|
||||
}
|
||||
},
|
||||
"laserSettings": {
|
||||
"DECAY_LENGTH": 50,
|
||||
"DECAY_TIME": 1000,
|
||||
"COLOR": "#ff0000"
|
||||
},
|
||||
"embeddableMarkdownDefaults": {
|
||||
"useObsidianDefaults": false,
|
||||
"backgroundMatchCanvas": false,
|
||||
"backgroundMatchElement": true,
|
||||
"backgroundColor": "#fff",
|
||||
"backgroundOpacity": 60,
|
||||
"borderMatchElement": true,
|
||||
"borderColor": "#fff",
|
||||
"borderOpacity": 0,
|
||||
"filenameVisible": false
|
||||
},
|
||||
"markdownNodeOneClickEditing": false,
|
||||
"canvasImmersiveEmbed": true,
|
||||
"startupScriptPath": "",
|
||||
"openAIAPIToken": "",
|
||||
"openAIDefaultTextModel": "gpt-3.5-turbo-1106",
|
||||
"openAIDefaultVisionModel": "gpt-4o",
|
||||
"openAIDefaultImageGenerationModel": "dall-e-3",
|
||||
"openAIURL": "https://api.openai.com/v1/chat/completions",
|
||||
"openAIImageGenerationURL": "https://api.openai.com/v1/images/generations",
|
||||
"openAIImageEditsURL": "https://api.openai.com/v1/images/edits",
|
||||
"openAIImageVariationURL": "https://api.openai.com/v1/images/variations",
|
||||
"modifierKeyConfig": {
|
||||
"Mac": {
|
||||
"LocalFileDragAction": {
|
||||
"defaultAction": "image-import",
|
||||
"rules": [
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-import"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "link"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-url"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "embeddable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"WebBrowserDragAction": {
|
||||
"defaultAction": "image-url",
|
||||
"rules": [
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-url"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "link"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "embeddable"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-import"
|
||||
}
|
||||
]
|
||||
},
|
||||
"InternalDragAction": {
|
||||
"defaultAction": "link",
|
||||
"rules": [
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "link"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": true,
|
||||
"result": "embeddable"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": true,
|
||||
"result": "image-fullsize"
|
||||
}
|
||||
]
|
||||
},
|
||||
"LinkClickAction": {
|
||||
"defaultAction": "new-tab",
|
||||
"rules": [
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "active-pane"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "new-tab"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "new-pane"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "popout-window"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": true,
|
||||
"result": "md-properties"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"Win": {
|
||||
"LocalFileDragAction": {
|
||||
"defaultAction": "image-import",
|
||||
"rules": [
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-import"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "link"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-url"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "embeddable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"WebBrowserDragAction": {
|
||||
"defaultAction": "image-url",
|
||||
"rules": [
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-url"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "link"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "embeddable"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-import"
|
||||
}
|
||||
]
|
||||
},
|
||||
"InternalDragAction": {
|
||||
"defaultAction": "link",
|
||||
"rules": [
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "link"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "embeddable"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "image"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "image-fullsize"
|
||||
}
|
||||
]
|
||||
},
|
||||
"LinkClickAction": {
|
||||
"defaultAction": "new-tab",
|
||||
"rules": [
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": false,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "active-pane"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": false,
|
||||
"result": "new-tab"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "new-pane"
|
||||
},
|
||||
{
|
||||
"shift": true,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": true,
|
||||
"meta_ctrl": false,
|
||||
"result": "popout-window"
|
||||
},
|
||||
{
|
||||
"shift": false,
|
||||
"ctrl_cmd": true,
|
||||
"alt_opt": false,
|
||||
"meta_ctrl": true,
|
||||
"result": "md-properties"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"slidingPanesSupport": false,
|
||||
"areaZoomLimit": 1,
|
||||
"longPressDesktop": 500,
|
||||
"longPressMobile": 500,
|
||||
"doubleClickLinkOpenViewMode": true,
|
||||
"isDebugMode": false,
|
||||
"rank": "Bronze",
|
||||
"modifierKeyOverrides": [
|
||||
{
|
||||
"modifiers": [
|
||||
"Mod"
|
||||
],
|
||||
"key": "Enter"
|
||||
},
|
||||
{
|
||||
"modifiers": [
|
||||
"Mod"
|
||||
],
|
||||
"key": "k"
|
||||
},
|
||||
{
|
||||
"modifiers": [
|
||||
"Mod"
|
||||
],
|
||||
"key": "G"
|
||||
}
|
||||
],
|
||||
"showSplashscreen": true,
|
||||
"pdfSettings": {
|
||||
"pageSize": "A4",
|
||||
"pageOrientation": "portrait",
|
||||
"fitToPage": 1,
|
||||
"paperColor": "white",
|
||||
"customPaperColor": "#ffffff",
|
||||
"alignment": "center",
|
||||
"margin": "normal"
|
||||
}
|
||||
}
|
10
.obsidian/plugins/obsidian-excalidraw-plugin/main.js
vendored
Executable file
10
.obsidian/plugins/obsidian-excalidraw-plugin/main.js
vendored
Executable file
File diff suppressed because one or more lines are too long
12
.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json
vendored
Executable file
12
.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json
vendored
Executable file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"id": "obsidian-excalidraw-plugin",
|
||||
"name": "Excalidraw",
|
||||
"version": "2.10.1",
|
||||
"minAppVersion": "1.1.6",
|
||||
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
|
||||
"author": "Zsolt Viczian",
|
||||
"authorUrl": "https://www.zsolt.blog",
|
||||
"fundingUrl": "https://ko-fi.com/zsolt",
|
||||
"helpUrl": "https://github.com/zsviczian/obsidian-excalidraw-plugin#readme",
|
||||
"isDesktopOnly": false
|
||||
}
|
1
.obsidian/plugins/obsidian-excalidraw-plugin/styles.css
vendored
Executable file
1
.obsidian/plugins/obsidian-excalidraw-plugin/styles.css
vendored
Executable file
File diff suppressed because one or more lines are too long
58
.obsidian/plugins/obsidian-git/data.json
vendored
Executable file
58
.obsidian/plugins/obsidian-git/data.json
vendored
Executable file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"commitMessage": "vault backup: {{date}} from {{hostname}}",
|
||||
"commitDateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"autoSaveInterval": 0,
|
||||
"autoPushInterval": 0,
|
||||
"autoPullInterval": 0,
|
||||
"autoPullOnBoot": false,
|
||||
"disablePush": false,
|
||||
"pullBeforePush": true,
|
||||
"disablePopups": false,
|
||||
"disablePopupsForNoChanges": false,
|
||||
"listChangedFilesInMessageBody": false,
|
||||
"showStatusBar": true,
|
||||
"updateSubmodules": false,
|
||||
"syncMethod": "merge",
|
||||
"customMessageOnAutoBackup": false,
|
||||
"autoBackupAfterFileChange": false,
|
||||
"treeStructure": false,
|
||||
"refreshSourceControl": true,
|
||||
"basePath": "",
|
||||
"differentIntervalCommitAndPush": false,
|
||||
"changedFilesInStatusBar": false,
|
||||
"showedMobileNotice": true,
|
||||
"refreshSourceControlTimer": 7000,
|
||||
"showBranchStatusBar": true,
|
||||
"setLastSaveToLastCommit": false,
|
||||
"submoduleRecurseCheckout": false,
|
||||
"gitDir": "",
|
||||
"showFileMenu": true,
|
||||
"authorInHistoryView": "initials",
|
||||
"dateInHistoryView": false,
|
||||
"lineAuthor": {
|
||||
"show": false,
|
||||
"followMovement": "inactive",
|
||||
"authorDisplay": "initials",
|
||||
"showCommitHash": false,
|
||||
"dateTimeFormatOptions": "date",
|
||||
"dateTimeFormatCustomString": "YYYY-MM-DD HH:mm",
|
||||
"dateTimeTimezone": "viewer-local",
|
||||
"coloringMaxAge": "1y",
|
||||
"colorNew": {
|
||||
"r": 255,
|
||||
"g": 150,
|
||||
"b": 150
|
||||
},
|
||||
"colorOld": {
|
||||
"r": 120,
|
||||
"g": 160,
|
||||
"b": 255
|
||||
},
|
||||
"textColorCss": "var(--text-muted)",
|
||||
"ignoreWhitespace": false,
|
||||
"gutterSpacingFallbackLength": 5,
|
||||
"lastShownAuthorDisplay": "initials",
|
||||
"lastShownDateTimeFormatOptions": "date"
|
||||
},
|
||||
"autoCommitMessage": "vault backup: {{date}}"
|
||||
}
|
416
.obsidian/plugins/obsidian-git/main.js
vendored
Executable file
416
.obsidian/plugins/obsidian-git/main.js
vendored
Executable file
File diff suppressed because one or more lines are too long
10
.obsidian/plugins/obsidian-git/manifest.json
vendored
Executable file
10
.obsidian/plugins/obsidian-git/manifest.json
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"author": "Vinzent",
|
||||
"authorUrl": "https://github.com/Vinzent03",
|
||||
"id": "obsidian-git",
|
||||
"name": "Git",
|
||||
"description": "Integrate Git version control with automatic backup and other advanced features.",
|
||||
"isDesktopOnly": false,
|
||||
"fundingUrl": "https://ko-fi.com/vinzent",
|
||||
"version": "2.32.1"
|
||||
}
|
23
.obsidian/plugins/obsidian-git/obsidian_askpass.sh
vendored
Normal file
23
.obsidian/plugins/obsidian-git/obsidian_askpass.sh
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
PROMPT="$1"
|
||||
TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT"
|
||||
|
||||
cleanup() {
|
||||
rm -f "$TEMP_FILE" "$TEMP_FILE.response"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "$PROMPT" > "$TEMP_FILE"
|
||||
|
||||
while [ ! -e "$TEMP_FILE.response" ]; do
|
||||
if [ ! -e "$TEMP_FILE" ]; then
|
||||
echo "Trigger file got removed: Abort" >&2
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
RESPONSE=$(cat "$TEMP_FILE.response")
|
||||
|
||||
echo "$RESPONSE"
|
576
.obsidian/plugins/obsidian-git/styles.css
vendored
Executable file
576
.obsidian/plugins/obsidian-git/styles.css
vendored
Executable file
|
@ -0,0 +1,576 @@
|
|||
@keyframes loading {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .button-border {
|
||||
border: 2px solid var(--interactive-accent);
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .view-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-history-view"] .view-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.loading > svg {
|
||||
animation: 2s linear infinite loading;
|
||||
transform-origin: 50% 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.obsidian-git-center {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.obsidian-git-textarea {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.obsidian-git-disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.obsidian-git-center-button {
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.tooltip.mod-left {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.tooltip.mod-right {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.git-tools {
|
||||
display: flex;
|
||||
margin-left: auto;
|
||||
}
|
||||
.git-tools .type {
|
||||
padding-left: var(--size-2-1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 11px;
|
||||
}
|
||||
|
||||
.git-tools .type[data-type="M"] {
|
||||
color: orange;
|
||||
}
|
||||
.git-tools .type[data-type="D"] {
|
||||
color: red;
|
||||
}
|
||||
.git-tools .buttons {
|
||||
display: flex;
|
||||
}
|
||||
.git-tools .buttons > * {
|
||||
padding: 0 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.is-active .git-tools .buttons > * {
|
||||
color: var(--nav-item-color-active);
|
||||
}
|
||||
|
||||
.git-author {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.git-date {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.git-ref {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-d-none {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-wrapper {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-header {
|
||||
background-color: var(--background-primary);
|
||||
border-bottom: 1px solid var(--interactive-accent);
|
||||
font-family: var(--font-monospace);
|
||||
height: 35px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-header,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-stats {
|
||||
font-size: 14px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-lines-added {
|
||||
border: 1px solid #b4e2b4;
|
||||
border-radius: 5px 0 0 5px;
|
||||
color: #399839;
|
||||
padding: 2px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-lines-deleted {
|
||||
border: 1px solid #e9aeae;
|
||||
border-radius: 0 5px 5px 0;
|
||||
color: #c33;
|
||||
margin-left: 1px;
|
||||
padding: 2px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-name-wrapper {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
font-size: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-name {
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-wrapper {
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: 3px;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse {
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
justify-content: flex-end;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse.d2h-selected {
|
||||
background-color: #c8e1ff;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse-input {
|
||||
margin: 0 4px 0 0;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-diff-table {
|
||||
border-collapse: collapse;
|
||||
font-family: Menlo, Consolas, monospace;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-files-diff {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-diff {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-side-diff {
|
||||
display: inline-block;
|
||||
margin-bottom: -8px;
|
||||
margin-right: -4px;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line {
|
||||
padding: 0 8em;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
|
||||
display: inline-block;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line {
|
||||
padding: 0 4.5em;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-ctn {
|
||||
word-wrap: normal;
|
||||
background: none;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
vertical-align: middle;
|
||||
white-space: pre;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
|
||||
.theme-light
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-code-side-line
|
||||
del {
|
||||
background-color: #ffb6ba;
|
||||
}
|
||||
|
||||
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
|
||||
.theme-dark
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-code-side-line
|
||||
del {
|
||||
background-color: #8d232881;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line del,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line ins {
|
||||
border-radius: 0.2em;
|
||||
display: inline-block;
|
||||
margin-top: -1px;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
|
||||
.theme-light
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-code-side-line
|
||||
ins {
|
||||
background-color: #97f295;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins,
|
||||
.theme-dark
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-code-side-line
|
||||
ins {
|
||||
background-color: #1d921996;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix {
|
||||
word-wrap: normal;
|
||||
background: none;
|
||||
display: inline;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .line-num1 {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .line-num1,
|
||||
.workspace-leaf-content[data-type="diff-view"] .line-num2 {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
padding: 0 0.5em;
|
||||
text-overflow: ellipsis;
|
||||
width: 3.5em;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .line-num2 {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber {
|
||||
background-color: var(--background-primary);
|
||||
border: solid var(--background-modifier-border);
|
||||
border-width: 0 1px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
text-align: right;
|
||||
width: 7.5em;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber:after {
|
||||
content: "\200b";
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
|
||||
background-color: var(--background-primary);
|
||||
border: solid var(--background-modifier-border);
|
||||
border-width: 0 1px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding: 0 0.5em;
|
||||
position: absolute;
|
||||
text-align: right;
|
||||
text-overflow: ellipsis;
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-diff-tbody tr {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber:after {
|
||||
content: "\200b";
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-emptyplaceholder,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber,
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-del {
|
||||
background-color: #fee8e9;
|
||||
border-color: #e9aeae;
|
||||
}
|
||||
|
||||
.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
|
||||
background-color: #dfd;
|
||||
border-color: #b4e2b4;
|
||||
}
|
||||
|
||||
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-del {
|
||||
background-color: #521b1d83;
|
||||
border-color: #691d1d73;
|
||||
}
|
||||
|
||||
.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-ins {
|
||||
background-color: rgba(30, 71, 30, 0.5);
|
||||
border-color: #13501381;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-info {
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-modifier-border);
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
.theme-light
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-file-diff
|
||||
.d2h-del.d2h-change {
|
||||
background-color: #fdf2d0;
|
||||
}
|
||||
|
||||
.theme-dark
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-file-diff
|
||||
.d2h-del.d2h-change {
|
||||
background-color: #55492480;
|
||||
}
|
||||
|
||||
.theme-light
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-file-diff
|
||||
.d2h-ins.d2h-change {
|
||||
background-color: #ded;
|
||||
}
|
||||
|
||||
.theme-dark
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-file-diff
|
||||
.d2h-ins.d2h-change {
|
||||
background-color: rgba(37, 78, 37, 0.418);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper a {
|
||||
color: #3572b0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"]
|
||||
.d2h-file-list-wrapper
|
||||
a:visited {
|
||||
color: #3572b0;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-header {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-title {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-line {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list {
|
||||
display: block;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li {
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
margin: 0;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-file-switch {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-icon {
|
||||
fill: currentColor;
|
||||
margin-right: 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-deleted {
|
||||
color: #c33;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-added {
|
||||
color: #399839;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-changed {
|
||||
color: #d0b44c;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-moved {
|
||||
color: #3572b0;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-tag {
|
||||
background-color: var(--background-primary);
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
font-size: 10px;
|
||||
margin-left: 5px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-deleted-tag {
|
||||
border: 2px solid #c33;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-added-tag {
|
||||
border: 1px solid #399839;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-changed-tag {
|
||||
border: 1px solid #d0b44c;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="diff-view"] .d2h-moved-tag {
|
||||
border: 1px solid #3572b0;
|
||||
}
|
||||
|
||||
/* ====================== Line Authoring Information ====================== */
|
||||
|
||||
.cm-gutterElement.obs-git-blame-gutter {
|
||||
/* Add background color to spacing inbetween and around the gutter for better aesthetics */
|
||||
border-width: 0px 2px 0.2px 2px;
|
||||
border-style: solid;
|
||||
border-color: var(--background-secondary);
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
.cm-gutterElement.obs-git-blame-gutter > div,
|
||||
.line-author-settings-preview {
|
||||
/* delegate text color to settings */
|
||||
color: var(--obs-git-gutter-text);
|
||||
font-family: monospace;
|
||||
height: 100%; /* ensure, that age-based background color occupies entire parent */
|
||||
text-align: right;
|
||||
padding: 0px 6px 0px 6px;
|
||||
white-space: pre; /* Keep spaces and do not collapse them. */
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
/* hide git blame gutter not to superpose text */
|
||||
.cm-gutterElement.obs-git-blame-gutter {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.git-unified-diff-view,
|
||||
.git-split-diff-view .cm-deletedLine .cm-changedText {
|
||||
background-color: #ee443330;
|
||||
}
|
||||
|
||||
.git-unified-diff-view,
|
||||
.git-split-diff-view .cm-insertedLine .cm-changedText {
|
||||
background-color: #22bb2230;
|
||||
}
|
42
.obsidian/plugins/omnisearch/data.json
vendored
Executable file
42
.obsidian/plugins/omnisearch/data.json
vendored
Executable file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"useCache": false,
|
||||
"hideExcluded": false,
|
||||
"recencyBoost": "0",
|
||||
"downrankedFoldersFilters": [],
|
||||
"ignoreDiacritics": true,
|
||||
"ignoreArabicDiacritics": false,
|
||||
"indexedFileTypes": [],
|
||||
"displayTitle": "",
|
||||
"PDFIndexing": false,
|
||||
"officeIndexing": false,
|
||||
"imagesIndexing": false,
|
||||
"aiImageIndexing": false,
|
||||
"unsupportedFilesIndexing": "no",
|
||||
"splitCamelCase": false,
|
||||
"openInNewPane": false,
|
||||
"vimLikeNavigationShortcut": false,
|
||||
"ribbonIcon": true,
|
||||
"showExcerpt": true,
|
||||
"maxEmbeds": 5,
|
||||
"renderLineReturnInExcerpts": true,
|
||||
"showCreateButton": false,
|
||||
"highlight": true,
|
||||
"showPreviousQueryResults": true,
|
||||
"simpleSearch": false,
|
||||
"tokenizeUrls": false,
|
||||
"fuzziness": "1",
|
||||
"weightBasename": 3,
|
||||
"weightDirectory": 2,
|
||||
"weightH1": 1.5,
|
||||
"weightH2": 1.3,
|
||||
"weightH3": 1.1,
|
||||
"weightUnmarkedTags": 1.1,
|
||||
"weightCustomProperties": [],
|
||||
"httpApiEnabled": false,
|
||||
"httpApiPort": "51361",
|
||||
"httpApiNotice": true,
|
||||
"welcomeMessage": "1.21.0",
|
||||
"verboseLogging": false,
|
||||
"DANGER_httpHost": null,
|
||||
"DANGER_forceSaveCache": false
|
||||
}
|
109
.obsidian/plugins/omnisearch/main.js
vendored
Executable file
109
.obsidian/plugins/omnisearch/main.js
vendored
Executable file
File diff suppressed because one or more lines are too long
14
.obsidian/plugins/omnisearch/manifest.json
vendored
Executable file
14
.obsidian/plugins/omnisearch/manifest.json
vendored
Executable file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"id": "omnisearch",
|
||||
"name": "Omnisearch",
|
||||
"version": "1.26.1",
|
||||
"minAppVersion": "1.7.2",
|
||||
"description": "A search engine that just works",
|
||||
"author": "Simon Cambier",
|
||||
"authorUrl": "https://github.com/scambier/obsidian-omnisearch",
|
||||
"fundingUrl": {
|
||||
"Github": "https://github.com/sponsors/scambier",
|
||||
"Ko-fi": "https://ko-fi.com/scambier"
|
||||
},
|
||||
"isDesktopOnly": false
|
||||
}
|
135
.obsidian/plugins/omnisearch/styles.css
vendored
Executable file
135
.obsidian/plugins/omnisearch/styles.css
vendored
Executable file
|
@ -0,0 +1,135 @@
|
|||
.omnisearch-modal {
|
||||
}
|
||||
|
||||
.omnisearch-result {
|
||||
white-space: normal;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* justify-content: space-between; */
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.omnisearch-result__title-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
column-gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.omnisearch-result__title {
|
||||
white-space: pre-wrap;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.omnisearch-result__title > span {
|
||||
}
|
||||
|
||||
.omnisearch-result__folder-path {
|
||||
font-size: 0.75rem;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.omnisearch-result__extension {
|
||||
font-size: 0.7rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.omnisearch-result__counter {
|
||||
font-size: 0.7rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.omnisearch-result__body {
|
||||
white-space: normal;
|
||||
font-size: small;
|
||||
word-wrap: normal;
|
||||
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
color: var(--text-muted);
|
||||
margin-inline-start: 0.5em;
|
||||
}
|
||||
|
||||
.omnisearch-result__embed {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
|
||||
.omnisearch-result__image-container {
|
||||
flex-basis: 20%;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.omnisearch-highlight {
|
||||
}
|
||||
|
||||
.omnisearch-default-highlight {
|
||||
text-decoration: underline;
|
||||
text-decoration-color: var(--text-highlight-bg);
|
||||
text-decoration-thickness: 3px;
|
||||
text-underline-offset: -1px;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
.omnisearch-input-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.omnisearch-result__icon {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.omnisearch-result__icon svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.omnisearch-result__icon--emoji {
|
||||
font-size: 16px;
|
||||
vertical-align: middle;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.omnisearch-input-container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.omnisearch-input-container__buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
padding: 0 1em 0 1em;
|
||||
gap: 1em;
|
||||
}
|
||||
.omnisearch-input-container__buttons > button {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 600px) {
|
||||
.omnisearch-input-container__buttons {
|
||||
margin-inline-end: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.omnisearch-input-field {
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue