blob: 8b7c17a146e64d37cb2b3d81ca22733caa6b9c7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
document.body.innerHTML = document.body.innerHTML.replace(/import "([^"]+)"/, 'import "<a href="https://$1">$1</a>"')
function pkg_go_dev () {
var import_path_el = document.querySelector('.DetailsHeader-breadcrumbCurrent');
var link_el = document.createElement('a');
link_el.textContent = import_path_el.textContent;
link_el.href = 'https://' + import_path_el.textContent;
var parent_el = import_path_el.parentNode;
parent_el.removeChild(import_path_el);
parent_el.prepend(link_el);
}
function github () {
var languages = document.querySelectorAll('.repository-lang-stats-numbers .lang');
for (var i = 0; i < languages.length; i++) {
if (languages[i].textContent === 'Go') {
console.log('found');
break;
}
}
}
function github_add_godoc_link () {
var github_repo_header_el = document.querySelector('.pagehead.repohead .flex-wrap')
var container_el = document.createElement('span');
container_el.className = 'flex-self-stretch';
var link_el = document.createElement('a');
link_el.href = '';
link_el.textContent = '(GoDoc)';
}
|