From 1c91f72baa5b5980f683db7dcc0d2a59ec9f20be Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 4 Jan 2020 16:33:52 +0000 Subject: [PATCH] Add a faint background to freelinks --- plugins/tiddlywiki/freelinks/styles.tid | 8 ++++++++ plugins/tiddlywiki/freelinks/text.js | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 plugins/tiddlywiki/freelinks/styles.tid diff --git a/plugins/tiddlywiki/freelinks/styles.tid b/plugins/tiddlywiki/freelinks/styles.tid new file mode 100644 index 000000000..61faa521b --- /dev/null +++ b/plugins/tiddlywiki/freelinks/styles.tid @@ -0,0 +1,8 @@ +title: $:/plugins/tiddlywiki/freelinks/styles +tags: [[$:/tags/Stylesheet]] + +\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline + +button.tc-tiddlylink.tc-freelink, a.tc-tiddlylink.tc-freelink { + background-color: #5777d91c; +} diff --git a/plugins/tiddlywiki/freelinks/text.js b/plugins/tiddlywiki/freelinks/text.js index 8803c8cd2..409f40086 100755 --- a/plugins/tiddlywiki/freelinks/text.js +++ b/plugins/tiddlywiki/freelinks/text.js @@ -98,7 +98,8 @@ TextNodeWidget.prototype.execute = function() { childParseTree[index] = { type: "link", attributes: { - to: {type: "string", value: match[0]} + to: {type: "string", value: match[0]}, + "class": {type: "string", value: "tc-freelink"} }, children: [{ type: "plain-text", text: match[0]