Skip to content

Commit e522fff

Browse files
committed
Add deprecated js
1 parent 795861f commit e522fff

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

doc/sphinx/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
def setup(app): # type: ignore
4343
app.add_js_file("https://neo4j.com/docs/assets/js/site.js", loading_method="defer")
4444
app.add_js_file("js/12-fragment-jumper.js", loading_method="defer")
45+
app.add_js_file("js/deprecated.js", loading_method="defer")
4546

4647

4748
rst_epilog = """
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
document.addEventListener('DOMContentLoaded', function () {
2+
const deprecatedDivs = document.querySelectorAll('div.deprecated')
3+
deprecatedDivs.forEach(function (deprecatedDiv) {
4+
5+
// get previous sibling
6+
const previousSibling = deprecatedDiv.previousElementSibling
7+
// add deprecated class to previous sibling
8+
previousSibling.classList.add('deprecated')
9+
10+
})
11+
})

0 commit comments

Comments
 (0)