Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GitMurf/028552e43aacc122b0a079ed1628d87d to your computer and use it in GitHub Desktop.
Save GitMurf/028552e43aacc122b0a079ed1628d87d to your computer and use it in GitHub Desktop.
.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;
}
/* Alert */
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query .search-results-children .query-alert > span,
.popover.hover-popover > .markdown-embed .markdown-preview-section .internal-query .search-results-children .query-alert > span {
color: red;
background-color: yellow;
font-weight: bold;
}
/* Idea */
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query .search-results-children .query-idea > span,
.popover.hover-popover > .markdown-embed .markdown-preview-section .internal-query .search-results-children .query-idea > span {
color: white;
background-color: transparent;
font-style: italic;
}
/* Road Block */
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query .search-results-children .query-block > span,
.popover.hover-popover > .markdown-embed .markdown-preview-section .internal-query .search-results-children .query-block > span {
color: white;
background-color: transparent;
/*font-style: italic;*/
/*font-weight: bold;*/
/*font-size: unset;*/
}
/* Flag */
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query .search-results-children .query-flag > span,
.popover.hover-popover > .markdown-embed .markdown-preview-section .internal-query .search-results-children .query-flag > span {
color: white;
background-color: transparent;
/*font-style: italic;*/
/*font-weight: bold;*/
/*font-size: unset;*/
}
/* Remove */
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query .search-results-children .query-x > span,
.popover.hover-popover > .markdown-embed .markdown-preview-section .internal-query .search-results-children .query-x > span {
color: white;
background-color: transparent;
/*font-style: italic;*/
/*font-weight: bold;*/
/*font-size: unset;*/
}
/* Question */
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query .search-results-children .query-question > span,
.popover.hover-popover > .markdown-embed .markdown-preview-section .internal-query .search-results-children .query-question > span {
color: white;
background-color: transparent;
/*font-style: italic;*/
/*font-weight: bold;*/
/*font-size: unset;*/
}
/* Rocket */
.markdown-source-view.mod-cm6.is-live-preview .cm-preview-code-block .internal-query .search-results-children .query-rocket > span,
.popover.hover-popover > .markdown-embed .markdown-preview-section .internal-query .search-results-children .query-rocket > span {
color: white;
background-color: transparent;
/*font-style: italic;*/
/*font-weight: bold;*/
/*font-size: unset;*/
}
<%*
//Set cursor to end of line
const editor = app.workspace.activeLeaf.view.editor;
const curLine = editor.getCursor().line;
const getLine = editor.getLine(curLine);
const chPos = getLine ? getLine.length : 0;
const editPos = { line: curLine, ch: chPos };
editor.setCursor(editPos);
//Choose which emoji
let emojiArray = ["🚨","πŸ’‘","🚧","🚩","❌","❓","πŸš€"]
const emojiSelect = await tp.system.suggester(emojiArray, emojiArray, false, "Select an alert type!");
let textAlert = "";
let emojiClass = "";
switch (emojiSelect) {
case "🚨":
textAlert = "HIGH PRIORITY!";
emojiClass = "query-alert";
break;
case "πŸ’‘":
textAlert = "This is a cool Idea!";
emojiClass = "query-idea";
break;
case "🚧":
textAlert = "Road Block!";
emojiClass = "query-block";
break;
case "🚩":
textAlert = "Need to follow-up!";
emojiClass = "query-flag";
break;
case "❌":
textAlert = "Need to Remove!";
emojiClass = "query-x";
break;
case "❓":
textAlert = "Need to ask!";
emojiClass = "query-question";
break;
case "πŸš€":
textAlert = "";
emojiClass = "query-rocket";
break;
default:
return;
break;
}
let textSelect = await tp.system.prompt(`Add text after ${emojiSelect}`, textAlert);
const finalResult = `<span class="query-emoji ${emojiClass}">${emojiSelect}<span>${textSelect}</span></span>`;
tR = ` ${finalResult}`;
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment