aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/overlays/gitweb/theme/gitweb.js
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /flakes/mypackages/overlays/gitweb/theme/gitweb.js
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
Diffstat (limited to 'flakes/mypackages/overlays/gitweb/theme/gitweb.js')
-rw-r--r--flakes/mypackages/overlays/gitweb/theme/gitweb.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/flakes/mypackages/overlays/gitweb/theme/gitweb.js b/flakes/mypackages/overlays/gitweb/theme/gitweb.js
new file mode 100644
index 0000000..72f3cfa
--- /dev/null
+++ b/flakes/mypackages/overlays/gitweb/theme/gitweb.js
@@ -0,0 +1,27 @@
1function include(filename, onload) {
2 var head = document.getElementsByTagName('head')[0];
3 var script = document.createElement('script');
4 script.src = filename;
5 script.type = 'text/javascript';
6 script.onload = script.onreadystatechange = function() {
7 if (script.readyState) {
8 if (script.readyState === 'complete' || script.readyState === 'loaded') {
9 script.onreadystatechange = null;
10 onload();
11 }
12 }
13 else {
14 onload();
15 }
16 }
17 head.appendChild(script);
18}
19
20include('static/gitweb.js', function() {});
21include('//code.jquery.com/jquery-3.1.0.min.js', function() {
22 $("div.title").each(function(index, element) {
23 if ($(element).text() === "readme" || $(element).text() === " ") {
24 $(element).hide();
25 }
26 });
27});