Skip to content

Commit d1ced05

Browse files
committed
chore: reformat
1 parent c6cbdc6 commit d1ced05

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

docs/assets/versions.js

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,27 @@ setTimeout(function() {
3232
document.getElementsByTagName('head')[0].appendChild(script);
3333
}, 0);
3434

35-
// VERSION WARNINGS
36-
window.addEventListener("DOMContentLoaded", function() {
37-
var rtdData = window['READTHEDOCS_DATA'] || { version: 'latest' };
38-
var margin = 30;
39-
var headerHeight = document.getElementsByClassName("md-header")[0].offsetHeight;
40-
if (rtdData.version === "latest") {
41-
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the latest of DevStream docs. Maybe you want to choose a specific version.</a></div>"
42-
var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin
43-
document.querySelector("header.md-header").style.top = bannerHeight +"px";
44-
document.querySelector('style').textContent +=
45-
"@media screen and (min-width: 76.25em){ .md-sidebar { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
46-
document.querySelector('style').textContent +=
47-
"@media screen and (min-width: 60em){ .md-sidebar--secondary { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
48-
}
49-
// else if (rtdData.version !== "stable") {
50-
// document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for a previous version of DevStream, <a href='https://devstream.readthedocs.io/en/stable/'>click here to go to the latest stable version.</a></div>"
51-
// var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin
52-
// document.querySelector("header.md-header").style.top = bannerHeight +"px";
53-
// document.querySelector('style').textContent +=
54-
// "@media screen and (min-width: 76.25em){ .md-sidebar { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
55-
// document.querySelector('style').textContent +=
56-
// "@media screen and (min-width: 60em){ .md-sidebar--secondary { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
57-
// }
58-
});
59-
35+
// VERSION WARNINGS
36+
window.addEventListener("DOMContentLoaded", function() {
37+
var rtdData = window['READTHEDOCS_DATA'] || { version: 'latest' };
38+
var margin = 30;
39+
var headerHeight = document.getElementsByClassName("md-header")[0].offsetHeight;
40+
if (rtdData.version === "latest") {
41+
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the latest of DevStream docs. Maybe you want to choose a specific version.</a></div>"
42+
var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin
43+
document.querySelector("header.md-header").style.top = bannerHeight +"px";
44+
document.querySelector('style').textContent +=
45+
"@media screen and (min-width: 76.25em){ .md-sidebar { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
46+
document.querySelector('style').textContent +=
47+
"@media screen and (min-width: 60em){ .md-sidebar--secondary { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
48+
}
49+
// else if (rtdData.version !== "stable") {
50+
// document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for a previous version of DevStream, <a href='https://devstream.readthedocs.io/en/stable/'>click here to go to the latest stable version.</a></div>"
51+
// var bannerHeight = document.getElementById('announce-msg').offsetHeight + margin
52+
// document.querySelector("header.md-header").style.top = bannerHeight +"px";
53+
// document.querySelector('style').textContent +=
54+
// "@media screen and (min-width: 76.25em){ .md-sidebar { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
55+
// document.querySelector('style').textContent +=
56+
// "@media screen and (min-width: 60em){ .md-sidebar--secondary { height: 0; top:"+ (bannerHeight+headerHeight)+"px !important; }}"
57+
// }
58+
});

0 commit comments

Comments
 (0)