<% var pathname = location.pathname; var lang = $("#lang").text(); var loggedIn = $("#loggedIn").text()=="true"; var courseOwner = $("#courseOwner").text()=="true"; var contentOwner = $("#contentOwner").text()=="true"; var name = $("#account_name").text(); var admin = /admin/.test($("#userId").text()); var author = /(author)|(public\-author)|(semi\-author)/.test($("#roles").text()) ; var teacher = /teacher/.test($("#roles").text()); var superuser = /superuser/.test($("#roles").text()); var content = /contents\/\d+\//.test(pathname); var course = /courses\/\d+\//.test(pathname); var home_active = (/^\/$/.test(pathname) || /^\/contents/i.test(pathname)) ? "active":""; var course_active = (course || /^\/courses/i.test(pathname)) ? "active":""; %> Skip to main content