Team:TU Delft

From 2010.igem.org

(Difference between revisions)
Line 51: Line 51:
function updateContentEditLink() {
function updateContentEditLink() {
 +
if (!wgUserName)
 +
return;
 +
var page = currentPage ? currentPage : 'Home';
var page = currentPage ? currentPage : 'Home';
var url = location.pathname + '/' + page + '?action=edit';
var url = location.pathname + '/' + page + '?action=edit';
Line 58: Line 61:
// Set document ready callback
// Set document ready callback
$(function() {
$(function() {
-
// Create content edit link
+
if (wgUserName) {
-
$(".left-menu ul > *:last").after('<li><a id="edit_content_link">edit content</a></li>');
+
// Create content edit link
-
updateContentEditLink();
+
$(".left-menu ul > *:last").after('<li><a id="edit_content_link">edit content</a></li>');
 +
updateContentEditLink();
 +
}
// Initialize history plugin.
// Initialize history plugin.

Revision as of 00:06, 19 October 2010