diff options
| author | Teddy Wing | 2020-03-22 16:35:11 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2020-03-22 16:35:11 +0100 | 
| commit | 21bf59bd2c32975cb43b25f22a88c5c87d0a30b4 (patch) | |
| tree | c82519c984d63208a5b73d0cd567b318bd47abca | |
| parent | 024fcf1a943b403c3d25c636f1a379c5bc3d28c8 (diff) | |
| download | godoc-links-21bf59bd2c32975cb43b25f22a88c5c87d0a30b4.tar.bz2 | |
github.com: Connect functions together to insert GoDoc link
| -rw-r--r-- | godoc-links.user.js | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/godoc-links.user.js b/godoc-links.user.js index 8f92fc5..8c607d6 100644 --- a/godoc-links.user.js +++ b/godoc-links.user.js @@ -43,7 +43,8 @@ function github () {  	for (var i = 0; i < languages.length; i++) {  		if (languages[i].textContent === 'Go') { -			console.log('found'); +			github_add_godoc_link(); +  			break;  		}  	} @@ -56,8 +57,11 @@ function github_add_godoc_link () {  	var container_el = document.createElement('span');  	container_el.className = 'text-small';  	var link_el = document.createElement('a'); -	link_el.href = ''; +	link_el.href = 'https://godoc.org/' + github_package_name();  	link_el.textContent = '(GoDoc)'; + +	container_el.appendChild(link_el); +	github_repo_header_el.appendChild(container_el);  } | 
