Skip to content

Commit

Permalink
Support custom emoji for 'Edit this Page' link.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhibbitts committed May 27, 2024
1 parent 199e4ed commit ff132e1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,15 @@
editLinkText = editlinktextparm;
}

var editHtml = '[:memo:' + editLinkText + '](' + url + ')\n'
let editlinkemoji = getURLParameterByName('edit-link-emoji', null, null, window.location.href, true);
if (editlinkemoji) {
// Remove leading and trailing colons if they are present
editlinkemoji = editlinkemoji.replace(/^:+|:+$/g, '');
} else {
editlinkemoji = 'memo';
}

var editHtml = '[:' + editlinkemoji + ':' + editLinkText + '](' + url + ')\n'

var creditHtml = '\n\n' + 'Displayed by <a href="https://docsify-this.net" target="_blank">Docsify-This</a>, based on the <a href="https://github.com/hibbitts-design/docsify-open-publishing-starter-kit" target="_blank">Docsify Open Publishing Starter Kit</a>.'

Expand Down

0 comments on commit ff132e1

Please sign in to comment.