We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 744ead6 commit ff44068Copy full SHA for ff44068
docs/assets/js/repository.js
@@ -0,0 +1,23 @@
1
+$(window).bind('load', function()
2
+{
3
+ const queryString = new URLSearchParams(location.search);
4
+ const nwo = queryString.get('nwo');
5
+
6
+ // Add nwo query string to all navigation links
7
+ $('.navigation a').each(function()
8
+ {
9
+ const href = $(this).attr('href');
10
+ const noNwoQuery = $(this).attr('data-no-nwo-query')
11
12
+ if (noNwoQuery === undefined) {
13
+ $(this).attr('href', `${href}?nwo=${nwo}`);
14
+ }
15
+ });
16
17
+ // Replace all canvas data urls with repository specific urls
18
+ $('[data-url]').each(function()
19
20
+ const dataUrl = $(this).attr('data-url');
21
+ $(this).attr('data-url', dataUrl.replace('/repository', `/repository/${nwo}`));
22
23
+});
0 commit comments