pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit f8afa7a37f3f237c89d21c9d21357d43dbdd1237
parent 89a518a67b52e21d7e1b083b7b6fbc5c5491285d
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sun, 19 May 2024 14:43:11 +0200

copy git clone command on click

Diffstat:
Mbin/git_update_repo_html.sh | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh @@ -54,6 +54,10 @@ find "${1}/${2}/${3}/" -type f -exec sed -E -e ${MAILEXP} -i {} \; INJEXP="s/(>Refs<\/a>)/\1 \| <a href=\"\/${2}\/${3}\/exports\/\">Exports<\/a> /" find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \; +# Replace "git clone" href +INJEXP="s/git clone <a href=\"(.*)\">/git clone <a href=\"javascript:navigator.clipboard.writeText('git clone \1');alert('git clone \1 copied to your clipboard')">/" +find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -e "${INJEXP}" -i {} \; + # link assets ln -sf "${1}/assets/style.css" "${1}/${2}/${3}/style.css" ln -sf "${1}/assets/favicon.png" "${1}/${2}/${3}/favicon.png"