14 |
Documentation moved!
15 |
16 | You're currently reading outdated documentation.
17 | View the new docs at ` + currentDocsURL + `
18 |
19 |
20 | `
21 | document.querySelector(".wy-nav-content, .md-content").insertAdjacentHTML("afterbegin", notice);
22 | }
23 |
24 | // modify the redirect link to more specific one if it's still exists in new docs
25 | function checkPageExists() {
26 | if (isRedirectChecked) return false;
27 | isRedirectChecked = true
28 | let newDocsURL = currentDocsURL + window.location.pathname.slice('/en/latest'.length);
29 | var request = new XMLHttpRequest;
30 | request.open('GET', newDocsURL);
31 | request.send();
32 | request.onload = function() {
33 | if (request.status == 200) {
34 | document.querySelector("#link_redirect").href = newDocsURL;
35 | }
36 | }
37 | }
38 |
39 | function applyZeroNetPatches() {
40 | console.log("applyZeroNetPatches")
41 |
42 | // Fix hashtag links
43 | let base_href = document.location.href.replace("index.html", "").replace(/[&?]wrapper_nonce=[A-Za-z0-9]+/, "")
44 | let base_tag = $("