Forked from gorbiz/trello-card-title-markdown.user.js
Last active
December 1, 2017 17:03
-
-
Save adrienjoly/52c493b2b22f5070aea9fb329f0fa422 to your computer and use it in GitHub Desktop.
Add support for bold and emphasized Markdown in Trello card titles using a User Script.
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
// ==UserScript== | |
// @name Trello card title Markdown | |
// @version 0.4.0 | |
// @homepage https://gist.github.com/gorbiz/6062481 | |
// @description Add support for bold and emphasized Markdown in card titles | |
// @match https://trello.com/b/* | |
// @match http://trello.com/b/* | |
// ==/UserScript== | |
/*** | |
* "Bold and emphasized Markdown in Trello card titles", | |
* am awesome mini Chrome Extension forked from @gorbiz :-) | |
* | |
* Supports bolding, emphasizing & code styling. | |
* | |
* Install in Chrome or Chromium | |
* 1. Download the script. | |
* 2. Open chrome://extensions/ in the browser. | |
* 3. Drag the downloaded file to the browser window. | |
* | |
*/ | |
function markdownAll() { | |
var cards = document.getElementsByClassName('list-card-title'); | |
for (var i = 0; i < cards.length; i++) { | |
cards[i].innerHTML = cards[i].innerHTML | |
.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>') | |
.replace(/\*(.+?)\*/g, '<em>$1</em>') | |
.replace(/~~(.+?)~~/g, '<strike>$1</strike>') | |
.replace(/\`(.+?)\`/g, '<code>$1</code>'); | |
} | |
setTimeout(markdownAll, 500); | |
} | |
markdownAll(); |
Awesome - exactly what I was looking for!!
Hahah... was about to thank you for this great extension & perhaps mention that I once made something similar... 😆
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install in Chrome or Chromium
Original code: https://gist.github.com/gorbiz/6062481