diff options
| author | Fuwn <[email protected]> | 2020-11-06 18:24:26 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2020-11-06 18:24:26 -0800 |
| commit | 9cdce4254700691301608c6f1d3081950023cc4f (patch) | |
| tree | 9d24529acc19b354f80cb2d610aa1e7686f4d530 /plugins/tweet.js | |
| download | blog-9cdce4254700691301608c6f1d3081950023cc4f.tar.xz blog-9cdce4254700691301608c6f1d3081950023cc4f.zip | |
repo: initial :star:
Diffstat (limited to 'plugins/tweet.js')
| -rw-r--r-- | plugins/tweet.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/tweet.js b/plugins/tweet.js new file mode 100644 index 0000000..76b454b --- /dev/null +++ b/plugins/tweet.js @@ -0,0 +1,6 @@ +module.exports = function (title, route) { + const baseUrl = "https://twitter.com/intent/tweet"; + const text = "“" + title + "” by @jdan – http://thatjdanisso.cool" + route; + + return baseUrl + "?text=" + encodeURIComponent(text); +}; |