Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Commit 8f9facc

Browse files
committed
Automated deployment: Sat Jan 2 02:11:28 UTC 2021 71a2997
1 parent 47c3d0a commit 8f9facc

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

assets/versions.js

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1-
function callback(response) {
2-
const div = document.createElement('div');
3-
div.innerHTML = response.html;
4-
document.body.appendChild(div);
5-
const container = div.querySelector('.rst-versions');
6-
div.querySelector('.rst-current-version').addEventListener('click', function() {
7-
const classes = container.className.split(' ');
8-
const index = classes.indexOf('shift-up');
9-
if (index === -1) {
10-
classes.push('shift-up');
11-
} else {
12-
classes.splice(index, 1);
13-
}
14-
container.className = classes.join(' ');
15-
});
16-
}
1+
(function() {
2+
const callbackName = 'callback_' + new Date().getTime();
3+
window[callbackName] = function (response) {
4+
const div = document.createElement('div');
5+
div.innerHTML = response.html;
6+
document.body.appendChild(div);
7+
const container = div.querySelector('.rst-versions');
8+
div.querySelector('.rst-current-version').addEventListener('click', function() {
9+
const classes = container.className.split(' ');
10+
const index = classes.indexOf('shift-up');
11+
if (index === -1) {
12+
classes.push('shift-up');
13+
} else {
14+
classes.splice(index, 1);
15+
}
16+
container.className = classes.join(' ');
17+
});
18+
}
19+
20+
var script = document.createElement('script');
21+
script.src = 'https://argocd-notifications.readthedocs.io/_/api/v2/footer_html/?'+
22+
'callback=' + callbackName + '&project=argocd-notifications&page=&theme=mkdocs&format=jsonp&docroot=docs&source_suffix=.md&version=' + (window['READTHEDOCS_DATA'] || { version: 'latest' }).version;
23+
24+
document.getElementsByTagName('head')[0].appendChild(script);
25+
})();
1726

18-
var script = document.createElement('script');
19-
script.src = 'https://argocd-notifications.readthedocs.io/_/api/v2/footer_html/?'+
20-
'callback=callback&project=argocd-notifications&page=&theme=mkdocs&format=jsonp&docroot=docs&source_suffix=.md&version=' + (window['READTHEDOCS_DATA'] || { version: 'latest' }).version;
21-
22-
document.getElementsByTagName('head')[0].appendChild(script);

sitemap.xml.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)