diff options
author | Christian Franke <nobody@nowhere.ws> | 2015-10-26 15:47:03 +0100 |
---|---|---|
committer | Christian Franke <nobody@nowhere.ws> | 2015-10-26 15:47:03 +0100 |
commit | 4e5034f57b54f1a5052fd859d3419002a477e628 (patch) | |
tree | eff096728b307238fb0fcefa865ac76e21d74dc5 /roles/cgit/files/cgit-assets/create.js | |
parent | d7fb136d7d752aef8a100854f265d984f79c2ff0 (diff) |
Add reposervice link to cgit
Diffstat (limited to 'roles/cgit/files/cgit-assets/create.js')
-rw-r--r-- | roles/cgit/files/cgit-assets/create.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/cgit/files/cgit-assets/create.js b/roles/cgit/files/cgit-assets/create.js new file mode 100644 index 0000000..b80e2da --- /dev/null +++ b/roles/cgit/files/cgit-assets/create.js @@ -0,0 +1,13 @@ +$(document).ready(function() { + var last_element = undefined; + $("div#cgit table.tabs td").each(function(element_pos, element) { + if (element.classList.contains("form") + && last_element !== undefined) { + last_element.innerHTML += "<a href=\"/create/\">create repository</a>"; + return false; + } + + last_element = element; + return true; + }); +}); |