diff options
Diffstat (limited to 'chrome/common/extensions/docs/js')
-rwxr-xr-x | chrome/common/extensions/docs/js/api_page_generator.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/common/extensions/docs/js/api_page_generator.js b/chrome/common/extensions/docs/js/api_page_generator.js index a89a83a..e9173bc 100755 --- a/chrome/common/extensions/docs/js/api_page_generator.js +++ b/chrome/common/extensions/docs/js/api_page_generator.js @@ -227,9 +227,13 @@ function selectCurrentPageOnLeftNav() { evalXPathFromId(".//li/a", "leftNav").select(function(node) { if (pageBase == finalPathPart(node.href)) { var parent = node.parentNode; - parent.className = "leftNavSelected"; + if (node.firstChild.nodeName == 'DIV') { + node.firstChild.className = "leftNavSelected"; + } else { + parent.className = "leftNavSelected"; + } parent.removeChild(node); - parent.appendChild(node.firstChild); + parent.insertBefore(node.firstChild, parent.firstChild); return true; } }); |