From 640d4ec51f60fd609239e7b3fdc5ca286ffd7756 Mon Sep 17 00:00:00 2001 From: Ayanami Date: Wed, 25 May 2022 15:54:24 +0900 Subject: [PATCH] Add git commit to footer & about page --- .git-hooks-post-checkout | 5 +++++ .gitignore | 1 + index.html | 14 ++++++++------ js/git-commit.js | 9 +++++++++ 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 .git-hooks-post-checkout create mode 100644 .gitignore create mode 100644 js/git-commit.js diff --git a/.git-hooks-post-checkout b/.git-hooks-post-checkout new file mode 100644 index 0000000..299cc54 --- /dev/null +++ b/.git-hooks-post-checkout @@ -0,0 +1,5 @@ +#!/bin/bash +commit=$(git cat-file commit HEAD) # +sha1=($((printf "commit %s\0" $(echo "$commit" | wc -c); echo "$commit") | sha1sum)) +commit="var git_commit = '${sha1}';" +sed -i "s/.*var git_commit =.*/${commit}/" js/git-commit.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..150cafe --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +js/git-commit.js diff --git a/index.html b/index.html index a5c5fa4..dc6038e 100644 --- a/index.html +++ b/index.html @@ -37,6 +37,7 @@ + @@ -137,7 +138,7 @@

Development

-

Use what we've built to write your own projects! See our documention (coming soon), or contribute at github.

+

Use what we've built to write your own projects! See our documention (coming soon), or contribute at github.

@@ -1356,14 +1357,15 @@

About open source bitcoin wallet

Version 1.7

+

Commit:

Compatible with bitcoin core

-

Github https://github.com/OutCast3k/coinbin/

-

TOR coinbin3ravkwb24f7rmxx6w3snkjw45jhs5lxbh3yfeg3vpt6janwqd.onion | 4zpinp6gdkjfplhk.onion

+

Github https://github.com/ayanamitech/coinbin/

+

TOR coinbin3ravkwb24f7rmxx6w3snkjw45jhs5lxbh3yfeg3vpt6janwqd.onion | 4zpinp6gdkjfplhk.onion

What is Bitcoin?

Bitcoin is a type of digital currency in which encryption techniques are used to regulate the generation of units of currency and verify the transfer of funds, operating independently of a central bank. See weusecoins.com for more information.

Information

Coinb.in is a free and open source project released under the MIT license, originally by OutCast3k in 2013. Discussion of the project can be found at bitcointalk.org during its early testing stages when its primary focus was to develop a proof of concept multisig solution in javascript.

-

Coinb.in is run and funded by the generosity of others in terms of development and hosting.

+

Coinb.in is run and funded by the generosity of others in terms of development and hosting.

Coinb.in is kindly hosted by BitVPS.com.

Privacy

Coinb.in believes strongly in privacy, not only do we support the use of TOR, the site does not collect and store IP or transaction data via our servers nor do we store your bitcoins private key. We do route traffic via cloudflare using an SSL certificate.

@@ -1484,7 +1486,7 @@

-

This page uses javascript to generate your addresses and sign your transactions within your browser, this means we never receive your private keys, this can be independently verified by reviewing the source code on github. You can even download this page and host it yourself or run it offline!

+

This page uses javascript to generate your addresses and sign your transactions within your browser, this means we never receive your private keys, this can be independently verified by reviewing the source code on github. You can even download this page and host it yourself or run it offline!


@@ -1493,7 +1495,7 @@ diff --git a/js/git-commit.js b/js/git-commit.js new file mode 100644 index 0000000..47867a6 --- /dev/null +++ b/js/git-commit.js @@ -0,0 +1,9 @@ +var git_commit = ''; +var git_commit_sub = git_commit.substring(0, 8); + +$(document).ready(function(){ + $('#git-commit').text(`${git_commit_sub}`); + $('#git-commit-footer').text(`${git_commit_sub}`); + $('#git-commit-href').attr('href', `https://github.com/ayanamitech/coinbin/commit/${git_commit}`); + $('#git-commit-href-footer').attr('href', `https://github.com/ayanamitech/coinbin/commit/${git_commit}`); +});