This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
//This one tiles popovers with a window grid approach | |
let hoverPlugin = app.plugins.plugins["obsidian-hover-editor"]; | |
let curPopovers = hoverPlugin ? hoverPlugin.activePopovers : []; | |
let defaultHeight = "47vh"; | |
let defaultWidth = "32vw"; | |
const defaultLeft = 35; | |
const defaultTop = 25; | |
let gridScenario = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
//Specify your typical default location here so it is always top of the list to reset to | |
const myDefaultLocation = "new"; | |
//Specify the list of folders you would like to have an option to switch between | |
const changeToPaths = [myDefaultLocation, 'new/tasks', 'templater', '/']; | |
const folderTypeSetting = app.vault.getConfig('newFileLocation'); | |
if(folderTypeSetting !== "folder") { | |
new Notice(`It appears you currently are not using the setting to specify a folder to save new notes to.`, 10000); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query .search-results-children .query-emoji, | |
.popover.hover-popover > .markdown-embed .markdown-preview-section .internal-query .search-results-children .query-emoji { | |
font-size: 2em; | |
margin-top: 20px; | |
display: block; | |
} | |
.markdown-source-view.mod-cm6.is-live-preview .cm-line .query-emoji > span, | |
.popover.hover-popover > .markdown-embed .markdown-preview-section > div > :not(.internal-query) .query-emoji > span { | |
display: none; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
//https://gist.github.com/GitMurf/d254ab2fefba8cc0be306d3f8fee371e | |
const ignoreWords = ["the", "all", "can"]; | |
const skipString = "*None (SKIP)"; | |
function cleanWords(wordStr) { | |
wordStr = wordStr.replace(/[\.\?\,\!\:]+$/, ""); | |
return wordStr; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//See comments for uploaded stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
//Find leaf next door | |
const thisLeaf = app.workspace.activeLeaf; | |
let thisFile = thisLeaf.view.file; | |
let leafNextDoor = app.workspace.getAdjacentLeafInDirection(thisLeaf, "right"); | |
if(!leafNextDoor){leafNextDoor = app.workspace.getAdjacentLeafInDirection(thisLeaf, "left");} | |
let leafToUse = null; | |
if(leafNextDoor) { | |
const openAbove = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const editor = app.workspace.activeLeaf.view.editor; | |
if(editor.somethingSelected() === true) { | |
let selectedText = editor.getSelection(); | |
let splitLines = selectedText.split('\n'); | |
let finalOutput = ''; | |
let listItem = false; | |
let codeBlock = false; | |
splitLines.forEach(eachLine => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const myDnpPath = 'dnp'; | |
let dueDateStr = await tp.system.prompt("Enter Date to Start from", "Today"); | |
const daysBackStr = await tp.system.prompt("How many days back?", "7"); | |
const daysBack = parseInt(daysBackStr); | |
let parseResult; | |
let parseResultLink; | |
const getAllDates = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add the Obsidian purple border */ | |
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block { | |
border: 4px solid var(--interactive-accent); | |
border-radius: 10px; | |
} | |
/* Hide query syntax in search query embeds */ | |
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query div.internal-query-header { | |
display: none; | |
} | |
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
const search = app.workspace.getLeavesOfType("search")[0]; | |
let thisFile = app.workspace.getActiveFile(); | |
//SortOrder Options: alphabeticalReverse, alphabetical, byModifiedTime, byModifiedTimeReverse, byCreatedTime, byCreatedTimeReverse | |
search.view.setSortOrder("byCreatedTime"); | |
//Collapse=true, Expand=false | |
search.view.setCollapseAll(false); | |
//Show Extra Context: true or false | |
search.view.setExtraContext(true); |