44 lines
1.7 KiB
Plaintext
44 lines
1.7 KiB
Plaintext
/* Copyright (C) 1998-2018 by Northwoods Software Corporation. All Rights Reserved. */
|
|
|
|
// Traverse the whole document and replace <a>TYPENAME</a> with:
|
|
// <a href="../api/symbols/TYPENAME.html">TYPENAME</a>
|
|
// and <a>TYPENAME.MEMBERNAME</a> with:
|
|
// <a href="../api/symbols/TYPENAME.html#MEMBERNAME">TYPENAME.MEMBERNAME</a>
|
|
function goDoc() {
|
|
_traverseDOM(document);
|
|
// add standard footer
|
|
var ftr = document.createElement("div");
|
|
ftr.className = "footer";
|
|
var msg = "Copyright © 1998-2018 by Northwoods Software Corporation.";
|
|
if (go && go.version) {
|
|
msg = "GoJS® version " + go.version + ". " + msg;
|
|
}
|
|
ftr.innerHTML = msg;
|
|
document.body.appendChild(ftr);
|
|
}
|
|
|
|
function _traverseDOM(node) {
|
|
if (node.nodeType === 1 && node.nodeName === "A" && !node.getAttribute("href")) {
|
|
var text = node.innerHTML.split(".");
|
|
if (text.length === 1) {
|
|
node.setAttribute("href", "../api/symbols/" + text[0] + ".html");
|
|
node.setAttribute("target", "api");
|
|
} else if (text.length === 2) {
|
|
node.setAttribute("href", "../api/symbols/" + text[0] + ".html" + "#" + text[1]);
|
|
node.setAttribute("target", "api");
|
|
} else {
|
|
alert("Unknown API reference: " + node.innerHTML);
|
|
}
|
|
}
|
|
for (var i = 0; i < node.childNodes.length; i++) {
|
|
_traverseDOM(node.childNodes[i]);
|
|
}
|
|
}
|
|
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
|
|
ga('create', 'UA-1506307-5', 'auto');
|
|
ga('send', 'pageview'); |