mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 06:55:53 +03:00
[PR #90] [MERGED] Adds 'copy to clipboard' function to example code snippets #889
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#889
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/healthchecks/healthchecks/pull/90
Author: @cdax
Created: 10/1/2016
Status: ✅ Merged
Merged: 10/1/2016
Merged by: @cuu508
Base:
master← Head:snippet-copy📝 Commits (1)
4e26042Adds 'copy to clipboard' function to example code snippets📊 Changes
26 files changed (+288 additions, -69 deletions)
View changed files
📝
hc/front/management/commands/pygmentize.py(+6 -3)📝
static/css/docs.css(+5 -1)📝
static/css/my_checks.css(+9 -0)➕
static/css/snippet-copy.css(+44 -0)📝
static/css/welcome.css(+12 -1)➕
static/js/snippet-copy.js(+26 -0)📝
templates/base.html(+1 -0)📝
templates/front/docs.html(+52 -11)📝
templates/front/docs_api.html(+29 -4)📝
templates/front/my_checks.html(+37 -7)📝
templates/front/snippets/bash_curl.html(+0 -3)📝
templates/front/snippets/bash_curl.txt(+0 -3)➕
templates/front/snippets/bash_wget.html(+3 -0)➕
templates/front/snippets/bash_wget.txt(+2 -0)➖
templates/front/snippets/create_check_request.txt(+0 -7)📝
templates/front/snippets/create_check_request_a.html(+0 -4)➕
templates/front/snippets/create_check_request_a.txt(+3 -0)➕
templates/front/snippets/create_check_request_b.html(+3 -0)➕
templates/front/snippets/create_check_request_b.txt(+2 -0)➖
templates/front/snippets/python.html(+0 -8)...and 6 more files
📄 Description
Adds copy-to-clipboard links to code snippets in the following places:
I'm using clipboard.js, and I'm setting the target text dynamically by parsing the corresponding pygments
.highlightelement, and ignoring all text within pygments's comment classes. This allows the snippet text files to have as many comments as we want while ensuring that they're never copied to the clipboard along with the actual code.Implements #88
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.