Edmund (v0.87)
<!DOCTYPE html> 
 
<!--
 
     Edmund - Open source Wikidot site explorer
     Copyright (c) 2011, Bryce Cameron.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 3 as 
    published by the Free Software Foundation.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
    A copy of the GNU General Public License is available from
    <http://www.gnu.org/copyleft/gpl.html>.
 
--> 
 
<html> 
<head> 
<title>Edmund - Wikidot Explorer</title> 
 
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Script-Type" content="text/javascript"/>
<meta name="description" content="Explore your Wikidot.com site with Edmund."/>
<meta name="keywords" content="Wikidot, free, Edmund, explore"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="default"/>
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes"/>
 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script> 
<script type="text/javascript" src="https://css3.wdfiles.com/local--files/edmund/edmund.ext.combined.min.js"></script> 
<!--
<script src="https://raw.github.com/jeresig/jquery.hotkeys/master/jquery.hotkeys.js" type="text/javascript"></script>
-->
 
<link rel="stylesheet" href="https://css3.wdfiles.com/local--code/admin:explorer-css/1" type="text/css" />
 
<script type="text/javascript"> 
 
//Sidebar lists 
var goToPageList = function() {
       $('.sidebar-list-container.left').removeClass('current');
       $('.sidebar-list-container.right').addClass('current');
   };
var goToCategoryList = function() {
       $('.sidebar-list-container.right').removeClass('current');
       $('.sidebar-list-container.left').addClass('current');
   };
 
//Main sliding navs
var showEditor = function() {
        $('#main section').removeClass('current');
        $('#main-editor').addClass('current');
};
var showIntro = function() {
        $('#main section').removeClass('current');
        $('#main-intro').addClass('current');
};
 
//Universal show/hide draws
var showDraw = function(draw) {
        $('#' + draw).addClass('show');
};
var hideDraw = function(draw) {
        $('#' + draw).removeClass('show nudge');
};
var nudgeDraw = function(draw) {
        $('#' + draw).addClass('nudge');
};
var unNudgeDraw = function(draw) {
        $('#' + draw).removeClass('nudge');
};
var hideAllDraws = function(draw) {
        $('.draw').removeClass('show nudge');
};
 
//If a nudged draw is clicked, remove the 'nudge' class & close other draws
$('section.draw.nudge').live('click', function() {
    $('section.draw:not(.nudge)').removeClass('show'); //Close other draws
    $(this).removeClass('nudge'); //Return to normal position
    console.log('nudge draw clicked');
 
});
 
function show_modal(id) {
    $('#' + id).addClass('show').draggable({ containment: 'window', handle: 'h4:first' }).css({marginTop: $(this).height()/-4, marginLeft: $(this).height()/-4});
    $('#overlay').addClass('show').css({height: $(document).height()});
    if(id == 'modal-import') {
        $('#import-page').focus();
        }
}
 
//Close settings window (called on click of submit button)  
function close_settings() {
    $('.modal').removeClass('show');
    $('#overlay').removeClass('show').css({height: '0'});
    var settingsSite = $('#settings-site').val();
    window.location.hash = '#';
}
function close_modal(id) {
    var $modal = $('#' + id);
    $modal.removeClass('show');
    $('#overlay').removeClass('show').css({height: '0'});
    if ($modal.hasClass('removable') === true) {
        $modal.remove();
    }
 
}     
 
function import_modal() {
    $('body').append('<div id="modal-import" class="modal removable"><div class="modal-inner"> <h4>Import page</h4><a href="#" class="modal-close" onclick=close_modal("modal-import");>Close</a><form name="import-form" id="import-form" class="modal-form" onsubmit="return false;"><label for="import-site">Site:</label> <!--<input type="text" name="import-site" id="import-site" value="'+ wdSite +'" disabled="true" />--> <label for="import-site" class="url-end">'+wdSite+'.wikidot.com</label><br><label for="import-page">Page:</label> <input type="text" name="import-page" id="import-page" value="" /><br> <input type="submit" name="import-submit" id="import-submit" value="Import page" /></form></div></div>');  
    $('#import-page').focus();
}
//Allow for parameters to passed via the URL
function url_param(name) {
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
    if( results === null ) {
    return "";
    }
   else {
    return results[1];
    }
}
 
//Google Analytics event tracking
function ga_trackEvent(category, action, label) { //Event tracking - not currently enabled
/*
    if (setting_analytics == 'true') {
    _gaq.push(['_trackEvent', category, action, label]);
    console.log('Event tracked: ' + category + ':' + action + ':' + label);
    }
*/
}
 
$(document).ready(function() {
 
//Tabbed interface
$('#mass-tabs').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
 
//Initialise API settings, & define users API key
var update_wd = function() {
        wd = $.wikidot('bmc-explorer', $('#settings-api-key').val());
       };
 
    $('#settings-api-key').val(localStorage.getItem('wikidot_api_key')).change(function() {
        localStorage.setItem('wikidot_api_key', $(this).val());
        update_wd();
     });
    update_wd();
 
//Save wikidot site to cookie
var update_site = function() {
    wdSite = $('#settings-site').val();
    $('#info-site').html(wdSite + '.wikidot.com');
}; 
 
$('#settings-site').val(localStorage.getItem('wikidot_site')).change(function() {
        localStorage.setItem('wikidot_site', $(this).val());
        update_site();
});
update_site();
 
//Check notifications checkbox
var update_settings = function() {
    window.setting_notifications = localStorage.getItem('wikidot_notifications');
    window.setting_analytics = localStorage.getItem('edmund_analytics');
    window.setting_startup = localStorage.getItem('edmund_startup');
    window.setting_saveConfirm = localStorage.getItem('edmund_save-confirm');
    window.setting_revisionComment = localStorage.getItem('edmund_revision-comment');
    if (setting_notifications == 'true') {
     $('#notify-notifications').addClass('show').tipsy({gravity: 'ne', fade: true}); //Show email icon
     $('#settings-notifications').attr('checked', true); //Check the checkbox
    }
    else { 
    $('#notify-notifications').removeClass('show');
    }
 
    if (setting_analytics == 'true') {
     $('#settings-analytics').attr('checked', true); //Check the checkbox
    }
    if (setting_startup == 'true') {
     $('#settings-startup').attr('checked', true); //Check the checkbox
    }
    if (setting_saveConfirm == 'true') {
     $('#settings-save-confirm').attr('checked', true); //Check the checkbox
    }
    if (setting_revisionComment == 'true') {
     $('#settings-revision-comment').attr('checked', true); //Check the checkbox
    }
};
 
$('#settings-notifications').click(function() {
    if ($(this).is(':checked')) {
            console.log('Yes, send notifications.');
            localStorage.setItem('wikidot_notifications', true); 
        }
    else {
            console.log('No, don\'t send notifications.');
            localStorage.setItem('wikidot_notifications', false); 
        }
    update_settings();
});
 
$('#settings-analytics').click(function() {
    if ($(this).is(':checked')) {
            console.log('Yes, allow analytics.');
            localStorage.setItem('edmund_analytics', true); 
        }
    else {
            console.log('No, don\'t allow analytics');
            localStorage.setItem('edmund_analytics', false);  
        }
    update_settings();
});
$('#settings-startup').click(function() {
    if ($(this).is(':checked')) {
            localStorage.setItem('edmund_startup', true); 
        }
    else {
            localStorage.setItem('edmund_startup', false);  
        }
    update_settings();
});
$('#settings-save-confirm').click(function() {
    if ($(this).is(':checked')) {
            localStorage.setItem('edmund_save-confirm', true); 
        }
    else {
            localStorage.setItem('edmund_save-confirm', false);  
        }
    update_settings();
});
$('#settings-revision-comment').click(function() {
    if ($(this).is(':checked')) {
            localStorage.setItem('edmund_revision-comment', true); 
        }
    else {
            localStorage.setItem('edmund_revision-comment', false);  
        }
    update_settings();
});
update_settings();
 
//Loading Message
var loading = $('#loading');
 
var  loadingMessage = function(message) {
     loading.html(message).fadeIn(250);
};
var clearLoadingMessage = function() {
    loading.fadeOut(250);
};
 
//Generate page structure
window.getPageMeta = function(page) {
 
        loadingMessage('Loading page...');
 
        wd.pages.get_one({'site': wdSite, 'page': page}, function(data) {
 
         if(data) {
 
         clearLoadingMessage();
 
         $('#info-page').html('<a href="http://' + wdSite + '.wikidot.com/' + data.fullname + '" target="_blank">' + data.title + '</a>');
 
         created_at = FriendlyDate(data.created_at, '[mmmm] [d], [yyyy] at [h]:[MM] [p]');
         updated_at = FriendlyDate(data.updated_at, '[mmmm] [d], [yyyy] at [h]:[MM] [p]');
 
         //Load into the table
         $('#meta-name').html(data.fullname);
         $('#meta-title').html(data.title);
         $('#meta-parent').html(data.parent_fullname);
         $('#meta-created_by').html(data.created_by);
         $('#meta-created_at').html(created_at);
         $('#meta-updated_by').html(data.updated_by);
         $('#meta-updated_at').html(updated_at);
         $('#meta-revisions').html(data.revisions);
         $('#meta-rating').html(data.rating);
         $('#meta-children').html(data.children);
         $('#meta-comments').html(data.comments);
         $('#meta-content').val(data.content);
 
         //Load tags into tags field
         var tagNumber = data.tags.length;
         var metaTagsArray = '';
 
         if (tagNumber > 0) {
             for(i=0; i<tagNumber; i++) { 
             metaTagsArray += data.tags[i] + ' ';
             }
         }
         $('#meta-tags').html(metaTagsArray);
 
         //Pre-load the hidden input fields
         $('#save-page-name').val(data.fullname);
         $('#save-page-original-name').val(data.fullname);
         $('#save-page-title').val(data.title);
         $('#save-page-parent').val(data.parent_fullname);
         $('#save-page-tags').val(metaTagsArray);
 
         //Load pagename into "children" link
         $('#show-children-link').attr('title',data.fullname);
         //Load pagename into "tags" link
         $('#show-tags-link').attr('title',data.fullname);
         }
         else {
         loadingMessage('Error fetching data.');
          }
        });
    };  
 
//Page list
var getPageList = function(category) {
 
        loadingMessage('Loading pages...');
        //Clear any existing pages in the list
        $('#page-list').html('');
        $('#info-page-count').html('');
        wd.pages.select({'site' : wdSite, 'categories' : [category]}, function(data) {
 
            var totalPages = data.length;
 
            if(data) {
 
            clearLoadingMessage();
 
            var pageList = $('#page-list');
            var pageListParent = pageList.parent();
            var pageListItems = '';
 
            //Generate new pages
            for(i=0; i<totalPages; i++) { 
                if ($('#mass-editor-toggle').is(':checked')) {
                    if($.inArray(data[i], massEditorPagesArray) > -1) {
                        pageListItems += '<li><a href="#" class="page-link edit disabled" data-category="' + category + '" title="' + data[i] + '">' + data[i] + '</a></li>';
                    }
                    else {
                        pageListItems += '<li><a href="#" class="page-link edit" data-category="' + category + '" title="' + data[i] + '">' + data[i] + '</a></li>';
                    }
                }
                else {
                    pageListItems += '<li><a href="#" class="page-link" data-category="' + category + '" title="' + data[i] + '">' + data[i] + '</a></li>';
                }
            }
            pageList.html(pageListItems);
            $('#info-page-count').html('(' + totalPages + ')');
            }
            else {
 
            }
        });
};
 
//If a page link is clicked, load that page in the editor.
 
$('a.page-link:not(.edit)').live('click', function() {
    getPageMeta($(this).attr('title'));
});
//If a page link is clicked from a draw, load that page & close the draw 
$('section.draw a.page-link').live('click', function() {
    getPageMeta($(this).attr('title'));
    hideAllDraws();
});
 
//Generate category list
var getCatList = function() {
 
    loadingMessage('Loading site...');
 
    wd.categories.select({'site' : wdSite}, function(data) {
 
        var totalCategories = data.length;
        var categoryList = $('#category-list');
        var categoryListItems = '';
 
        if(data) {
         clearLoadingMessage();
            for(i=0; i<totalCategories; i++) { 
                   categoryListItems += '<li><a href="#" id="catlink-' + data[i] + '" class="category-link" title="' + data[i] + '">' + data[i] + '</a></li>';
            }
            categoryList.html(categoryListItems);
            $('#info-category-count').html('(' + totalCategories + ')');
        }
        else {
            loadingMessage('Error generating list of categories.');
        }
    });
};
 
//If category link in sidebar is clicked, generate page list
$('a.category-link').live('click', function() {
    getPageList($(this).attr('title'));
    if ($('#mass-editor-toggle').is(':checked')) {
        $('#info-category').html('<a href="#" class="category-title-link edit" title="Click to add all pages in this category to the mass editor." data-category="' + $(this).attr("title") + '">' + $(this).attr("title") + '</a>');
    }
    else {
        $('#info-category').html('<a href="#" class="category-title-link disabled" title="Click to add all pages in this category to the mass editor." data-category="' + $(this).attr("title") + '">' + $(this).attr("title") + '</a>');
    }
    $('#info-category a').tipsy({gravity: 's', fade: true});
    goToPageList();
});
 
//Get list of children
var getChildList = function(parent) {
        loadingMessage('Loading children...');
                //Clear any existing pages in the list
                $('#children-list').html('');
 
                wd.pages.select({'site' : wdSite, 'parent' : parent}, function(data) {
 
                    var totalPages = data.length;
 
                    if(totalPages > 0) {
 
                    clearLoadingMessage();
 
                    //Clear existing messages in the draw
                    $('#children p').html('');
 
                    var childrenList = $('#children-list');
                    var childrenListItems = '';
 
                    //Generate new pages
                    for(i=0; i<totalPages; i++) { 
                        childrenListItems += '<li><a href="#" class="page-link" title="' + data[i] + '">' + data[i] + '</a></li>';
                    }
                     childrenList.html(childrenListItems);
                    }
                    else {
                    clearLoadingMessage();
                    $('#children p').html('This page has no children.');
                    console.log('No children');
                    }
                });
};
 
//If 'Children' is clicked, open draw & load children pages & close tags draw if it's open
$('#show-children-link').live('click', function() {
    getChildList($(this).attr('title'));
    hideAllDraws();
    showDraw('children'); 
});
 
//Get list of tags for the entire site
var getSiteTagsList = function() {
        loadingMessage('Loading tags...');
                //Clear any existing pages in the list
                $('#tags-list').html('');
 
                wd.tags.select({'site' : wdSite}, function(data) {
 
                    var totalTags = data.length;
 
                    if(data) {
 
                    clearLoadingMessage();
 
                    $('#tags p').html('Currently showing tags for the entire site.');
 
                    var tagsList = $('#tags-list');
                    var tagsListItems = '';
 
                    //Generate new pages
                    for(i=0; i<totalTags; i++) { 
                        tagsListItems += '<li><a href="#" class="tag-link" title="' + data[i] + '">' + data[i] + '</a></li>';
                    }
                     tagsList.html(tagsListItems);
                    }
                    else {
                    $('#tags p').html('This site has no tags.');
                    }
                });
};
 
//Get list of tags attached to a particular page
var getPageTagsList = function(page) {
        loadingMessage('Loading tags...');
                //Clear any existing pages in the list
                $('#tags-list').html('');
                //Clear any messages in the draw
                $('#tags p').html('');
 
                wd.tags.select({'site' : wdSite, 'pages' : [page]}, function(data) {
 
                    var totalTags = data.length;
 
                    if(totalTags > 0) {
 
                    clearLoadingMessage();
 
                    $('#tags p').html('<p>Currently showing tags for <strong>' + page + '</strong>.<br><a href="#" id="show-site-tags-link">Show tags for entire site</a><p>');
 
                    var tagsList = $('#tags-list');
                    var tagsListItems = '';
 
                    //Generate new pages
                    for(i=0; i<totalTags; i++) { 
                        tagsListItems += '<li><a href="#" class="tag-link" title="' + data[i] + '">' + data[i] + '</a></li>';
                    }
                     tagsList.html(tagsListItems);
                    }
                    else {
                    clearLoadingMessage();
                    $('#tags p').html('This page has no tags.');
                    console.log('No tags');
                    }
                });
};
 
//If 'Tags' is clicked, open draw & load tags & close children draw
$('#show-tags-link').live('click', function() {
    getPageTagsList($(this).attr('title'));
    hideAllDraws();
    showDraw('tags');
});
$('#show-site-tags-link').live('click', function() {
    getSiteTagsList();
});
 
//Tagged Pages list
var getTaggedPagesList = function(tag) {
 
        loadingMessage('Loading pages...');
        //Clear any existing pages in the list
        $('#tagged-pages-list').html('');
        wd.pages.select({'site' : wdSite, 'tags_any' : [tag]}, function(data) {
 
            var totalPages = data.length;
 
            if(data) {
 
            clearLoadingMessage();
 
            $('#tagged-pages').find('p').html('<span class="tag">' + tag + '</span>');
 
            var TaggedPagesList = $('#tagged-pages-list');
            var TaggedPagesListItems = '';
 
            //Generate new pages
            for(i=0; i<totalPages; i++) { 
                TaggedPagesListItems += '<li><a href="#" class="page-link" title="' + data[i] + '">' + data[i] + '</a></li>';
            }
            TaggedPagesList.html(TaggedPagesListItems);
            }
            else {
 
            }
        });
};
 
//If a tag is clicked, open the tagged pages draw, load the list & nudge the tags draw
$('.tag-link').live('click', function() {
    getTaggedPagesList($(this).attr('title'));
    showDraw('tagged-pages');
    nudgeDraw('tags');
});
 
//Save a page
var savePage = function() {
 
        loadingMessage('Saving page...');
 
        var saveTitle = $('#save-page-title').val();
        var saveName = $('#save-page-name').val();
        var pageName = $('#save-page-original-name').val();
        var saveContent = $('#meta-content').val();
 
        //Create array of tags
        var saveTagsString = $('#save-page-tags').val();
        var saveTags = saveTagsString.split(' ');
 
       //Check if parent page is present
       if($('#save-page-parent').val() === ''){
                         var saveParent = '-';
                     }
                         else {
                     var saveParent = $('#save-page-parent').val();
                     }
 
       //Description of changes popup prompt
       if(setting_revisionComment == 'true') {
               jPrompt('Enter a short description of the changes you have made to this page.', '', 'Description of changes', function(r) {
                         if(r === '') {
                             savePageContinue('Edited with Edmund - Wikidot Explorer.');
                         }
                         else if (r !== null) {
                             savePageContinue(r);
                         }
                         else if (r === null){
                             loading.html('');
                             return;
                         }
                     }); 
       }
       else {
       savePageContinue('Edited with Edmund - Wikidot Explorer.');
       }
 
       function savePageContinue(revisionComment) {
               //Check if page already exists before continuing...
                     if(setting_saveConfirm == 'true') {
                                         console.log('save confirm is true');              
                                         wd.pages.get_one({'site': wdSite, 'page':pageName}, function(data) {
                                         if(data) {
                                         jConfirm('This page already exists. Would you like to overwrite it?', 'Page already exists', function(r) {
                                                   if(r === true) {
                                                       savePageContinue2();
                                                   }
                                                   else {
                                                       loading.html('');
                                                       return;
                                                   }
                                               }); 
                                         }
                                         });
                                         }
                                           else {
                                             savePageContinue2();
                                         }
 
                     function savePageContinue2() {
 
                     wd.pages.save_one({'site': wdSite, 'page': pageName, 'title': saveTitle, 'tags' : saveTags, 'parent_fullname' : saveParent, 'content' : saveContent, 'rename_as' : saveName, 'revision_comment' : revisionComment, 'notify_watchers' : setting_notifications}, function(data) {
                      if(data) {
                      loading.html('Page was saved successfully.').delay(3000).fadeOut(200);
                      ga_trackEvent('Editor','Export','Successful');
 
                      //Load new page into editor
 
                      $('#info-page').html('<a href="http://' + wdSite + '.wikidot.com/' + data.fullname + '" target="_blank">' + data.title + '</a>');
 
                      created_at = FriendlyDate(data.created_at, '[mmmm] [d], [yyyy] at [h]:[MM] [p]');
                      updated_at = FriendlyDate(data.updated_at, '[mmmm] [d], [yyyy] at [h]:[MM] [p]');
 
                      //Load into the table
                      $('#meta-name').html(data.fullname);
                      $('#meta-title').html(data.title);
                      $('#meta-parent').html(data.parent_fullname);
                      $('#meta-created_by').html(data.created_by);
                      $('#meta-created_at').html(created_at);
                      $('#meta-updated_by').html(data.updated_by);
                      $('#meta-updated_at').html(updated_at);
                      $('#meta-revisions').html(data.revisions);
                      $('#meta-rating').html(data.rating);
                      $('#meta-children').html(data.children);
                      $('#meta-comments').html(data.comments);
                      $('#meta-content').val(data.content);
 
                      //Load tags into tags field
                              var tagNumber = data.tags.length;
                              var metaTagsArray = '';
 
                              if (tagNumber > 0) {
                                  for(i=0; i<tagNumber; i++) { 
                                  metaTagsArray += data.tags[i] + ' ';
                                  }
                              }
                              else {
                              }
                              $('#meta-tags').html(metaTagsArray);
 
                      //Pre-load the hidden input fields
                      $('#save-page-name').val(data.fullname);
                      $('#save-page-original-name').val(data.fullname);
                      $('#save-page-title').val(data.title);
                      $('#save-page-parent').val(data.parent_fullname);
                      $('#save-page-tags').val(metaTagsArray);
 
                      //Load pagename into "children" link
                      $('#show-children-link').attr('title',data.fullname);
                      //Load pagename into "tags" link
                      $('#show-tags-link').attr('title',data.fullname);
                      }
                      else {
                      loading.html('Error saving page.').delay(3000).fadeOut(200);
                      ga_trackEvent('Editor','Export','Error');
                       }
                     });
                    };
       };
 
   };
//Save page on submit button click
$('#save-page-submit').live('click', function() {
    savePage();
});
 
//Delete a page
var deletePage = function() {
 
        loadingMessage('Renaming page...');
 
        var saveTitle = $('#save-page-title').val();
        var saveName = $('#save-page-name').val();
        var pageName = $('#save-page-original-name').val();
        var saveContent = $('#meta-content').val();
 
         //Create string of tags
         var saveTagsString = $('#save-page-tags').val();
         var saveTags = saveTagsString.split(' ');
 
       //Check if parent page is present
       if($('#save-page-parent').val() === ''){
                         var saveParent = '-';
                     }
                         else {
                     var saveParent = $('#save-page-parent').val();
                     }
 
       wd.pages.save_one({'site': wdSite, 'page': pageName, 'title': saveTitle, 'tags' : saveTags, 'parent_fullname' : saveParent, 'content' : saveContent, 'rename_as' : 'deleted:' + saveName, 'revision_comment' : 'Edited with Edmund - Wikidot Explorer.', 'notify_watchers' : setting_notifications}, function(data) {
        if(data) {
        loading.html('Page was successfully renamed.').delay(3000).fadeOut(200);
        ga_trackEvent('Editor','Delete','Successful');
 
        //Load new page into editor
 
        $('#info-page').html('<a href="http://' + wdSite + '.wikidot.com/' + data.fullname + '" target="_blank">' + data.title + '</a>');
 
        created_at = FriendlyDate(data.created_at, '[mmmm] [d], [yyyy] at [h]:[MM] [p]');
        updated_at = FriendlyDate(data.updated_at, '[mmmm] [d], [yyyy] at [h]:[MM] [p]');
 
        //Load into the table
        $('#meta-name').html(data.fullname);
        $('#meta-title').html(data.title);
        $('#meta-parent').html(data.parent_fullname);
        $('#meta-created_by').html(data.created_by);
        $('#meta-created_at').html(created_at);
        $('#meta-updated_by').html(data.updated_by);
        $('#meta-updated_at').html(updated_at);
        $('#meta-revisions').html(data.revisions);
        $('#meta-rating').html(data.rating);
        $('#meta-children').html(data.children);
        $('#meta-comments').html(data.comments);
        $('#meta-content').val(data.content);
 
        //Load tags into tags field
                var tagNumber = data.tags.length;
                var metaTagsArray = '';
 
                if (tagNumber > 0) {
                    for(i=0; i<tagNumber; i++) { 
                    metaTagsArray += data.tags[i] + ' ';
                    }
                }
                else {
                }
                $('#meta-tags').html(metaTagsArray);
 
        //Pre-load the hidden input fields
        $('#save-page-name').val(data.fullname);
        $('#save-page-original-name').val(data.fullname);
        $('#save-page-title').val(data.title);
        $('#save-page-parent').val(data.parent_fullname);
        $('#save-page-tags').val(data.tags);
 
        //Load pagename into "children" link
        $('#show-children-link').attr('title',data.fullname);
        //Load pagename into "tags" link
        $('#show-tags-link').attr('title',data.fullname);
        //Close  the draw
        hideAllDraws();
        }
        else {
        loading.html('Error renaming page.').delay(3000).fadeOut(200);
        ga_trackEvent('Editor','Delete','Error');
         }
       });
   };
//Delete page on 'delete' button click
$('#options-delete').live('click', function() {
    jConfirm('This will rename the current page into the deleted category. Are you sure you want to continue?', 'Please confirm', function(r) {
        if(r === true) {
            deletePage();
        }
    }); 
});
 
//jEditable - title
$('#meta-title').editable(function(value, settings) {
        $('#save-page-title').val(value);
        return(value);
        }, {
        tooltip : 'Click to edit',
        submit : 'Save',
        indicator : 'Saving...',
        placeholder : '',
        cssclass : 'jedit'
});
//jEditable - parent
$('.edit-parent').editable(function(value, settings) {
        $('#save-page-parent').val(value);
        return(value);
        }, {
        tooltip : 'Click to edit',
        submit : 'Save',
        indicator : 'Saving...',
        placeholder : '',
        cssclass : 'jedit'
});    
//jEditable - tags
$('#meta-tags').editable(function(value, settings) {
        $('#save-page-tags').val(value);
        return(value);
        }, {
        tooltip : 'Click to edit',
        submit : 'Save',
        indicator : 'Saving...',
        placeholder : '',
        cssclass : 'jedit'
});
//jEditable - name
$('#meta-name').editable(function(value, settings) {
        $('#save-page-name').val(value);
        return(value);
        }, {
        tooltip : 'Click to edit',
        submit : 'Save',
        indicator : 'Saving...',
        placeholder : '',
        cssclass : 'jedit'
});
 
//When launch button is clicked, get category list
$('#launch-button').live('click', function() {
       getCatList(); 
       hideDraw('intro');
       $('#sidebar').removeClass('disabled');
       var notify = localStorage.getItem('wikidot_notifications');
       if (notify === null) {
               localStorage.setItem('wikidot_notifications', false);
       }
       var analytics = localStorage.getItem('edmund_analytics');
       if (analytics === null) {
               localStorage.setItem('edmund_analytics', false);
       }     
       update_settings();
});
 
//Immediate launch
if (setting_startup == 'true') {
 getCatList(); 
 hideDraw('intro');
 $('#sidebar').removeClass('disabled');
 var notify = localStorage.getItem('wikidot_notifications');
 if (notify === null) {
         localStorage.setItem('wikidot_notifications', false);
 }
 var analytics = localStorage.getItem('edmund_analytics');
 if (analytics === null) {
         localStorage.setItem('edmund_analytics', false);
 }       
 update_settings();
}
 
//When settings form is submitted, hide draws, close settings window & load category list
$('#settings-form').submit(function() {
       getCatList(); 
       goToCategoryList();
       hideDraw('intro');
       close_settings();
       $('#sidebar').removeClass('disabled');
       return false;
});    
 
//When import page button is clicked, import the page & category
$('#import-submit').live('click', function() {
 
       var importPage = $('#import-page').val();
       getPageMeta(importPage);
 
       var pageNameSplit = importPage.replace(':', ':::edmund-splitter:::');
       var pageNameArray = pageNameSplit.split(':::edmund-splitter:::');
       var pageName = pageNameArray[1];
       var pageCategory = pageNameArray[0];
 
       if (importPage.indexOf(':') == -1) {getPageList('_default');} //Check if import page contains a category
       else                               {getPageList(pageCategory);}
 
       goToPageList();
       close_modal('modal-import');
       $('#modal-import').remove();
       return false;
});
 
//Get site & page from URL
var urlSite = url_param('site');
var urlPage = url_param('page');
 
if (urlSite.length) {
    $('#settings-site').val(urlSite);
    update_site();
    localStorage.setItem('wikidot_site', urlSite);
    getCatList();
    getPageMeta(urlPage);
    hideAllDraws();
    $('#sidebar').removeClass('disabled');
}
 
//Mass Editor //
//Initialise mass editor array
var massEditorPagesArray = [];
var massEditorPagesList = $('#mass-editor-pages');
var massEditorPagesListItems = '';
 
var update_massEditorPagesList = function() {
        massEditorPagesList.html(''); //Reset list
        massEditorPagesListItems = '';
        for(i=0; i<massEditorPagesArray.length; i++) { 
            massEditorPagesListItems += '<li><a href="#" class="mass-editor-page-link" title="' + massEditorPagesArray[i] + '">' + massEditorPagesArray[i] + '</a></li>'; //Generate new items
        }
        massEditorPagesList.html(massEditorPagesListItems); //Add items to list
};
 
//Begin mass editor...
$('#mass-editor-toggle').live('click', function() {
    if ($('#mass-editor-toggle').is(':checked')) {
            showDraw('mass-editor'); //Show mass editor draw
            $('a.page-link').addClass('edit'); //Show edit option on page links   
            $('a.category-link').addClass('edit'); 
            $('a.category-title-link').addClass('edit').removeClass('disabled');
      }
    else {
            $('a.page-link').removeClass('edit disabled');
            $('a.category-link').removeClass('edit disabled');
            $('a.category-title-link').removeClass('edit').addClass('disabled');
            hideDraw('mass-editor');
        }
}); 
 
//Add individual pages to mass editor
$('a.page-link.edit').live('click', function() { 
    massEditorPagesArray.push($(this).attr('title')); //When a page is clicked, add it to the array 
    $(this).addClass('disabled'); //Add disabled class => pointer-events:none; in CSS.
    update_massEditorPagesList(); 
});
 
//Add a whole category to mass editor
$('a.category-title-link.edit').live('click', function() { 
    $(this).addClass('disabled'); //Disable category link
    var categoryPages = $('a.page-link.edit[data-category="' + $(this).attr('data-category') + '"]');
    categoryPages.each(function() {
        massEditorPagesArray.push($(this).attr('title'));
        $(this).addClass('disabled'); //Disable each page link
    });
    update_massEditorPagesList();
});
 
//Remove item from array
function removeMassEditorPage(page){
    for(var i=0; i<massEditorPagesArray.length; i++){
        if(massEditorPagesArray[i] == page){
            massEditorPagesArray.splice(i, 1);
            break;
        }
    }
}
 
$('a.mass-editor-page-link').live('click', function() { 
    removeMassEditorPage($(this).attr('title')); //When a mass editor page is clicked, remove it from the array
    $('a.page-link[title="' + $(this).attr('title') + '"]').removeClass('disabled'); //Remove disabled class from main pages list in sidebar
    update_massEditorPagesList();
});
 
$('a.clear-mass-editor').live('click', function() { 
    massEditorPagesArray.splice(0,massEditorPagesArray.length); //Clear the array
    update_massEditorPagesList();
    $('a.page-link.edit').removeClass('disabled'); //Return pages in list to normal state
    $('a.category-title-link.edit').removeClass('disabled');
    });
 
//Mass Function - change tags
function mass_changeTags(index) {
    var thisPage = massEditorPagesArray[index];
    var totalPagesToTag = massEditorPagesArray.length;
    var thisPageNumber = index + 1;
 
    if(massEditorPagesArray.length === 0) {
        jAlert('Hmm, you haven\'t selected any pages yet. Select pages to tag using the list on the left.', 'No pages selected', function(r) {
            $('#mass-tags-submit').removeClass('disabled');
        });
 
    }
    else {
 
        if(thisPage) {
 
                if($('#mass-tags-removeAll').is(':checked')) {
                        loadingMessage('Tagging page: ' + thisPage + ' (' + thisPageNumber + '/' + totalPagesToTag + ')');
                        wd.pages.save_one({'site': wdSite, 'page': thisPage, 'tags': []}, function(data) {mass_changeTags(index + 1);});
 
                }
 
                else {
 
                loadingMessage('Tagging page: ' + thisPage + ' (' + thisPageNumber + '/' + totalPagesToTag + ')');
 
               wd.pages.get_one({'site': wdSite, 'page': thisPage}, function(data) {
 
                   var massTags_existing = data.tags;
                   var massTags_add = $('#mass-tags-add').val().split(' ');
                   var massTags_remove = $('#mass-tags-remove').val().split(' ');
 
                   var pageFullname = data.fullname;
                   var pageParent = data.parent_fullname;
                   if (pageParent == null) {pageParent = '';}
                   var pageTitle = data.title.replace(/ /g, '-');
 
                   var pageNameSplit = data.fullname.replace(':', ':::edmund-splitter:::');
                   var pageNameArray = pageNameSplit.split(':::edmund-splitter:::');
                   var pageName = pageNameArray[1];
                   var pageCategory = pageNameArray[0];
 
                   //Remove tags
                   $.each(massTags_remove, function(index, value) {
                                      for(var i=0; i<massTags_existing.length; i++){
                                          if(massTags_existing[i] == value){
                                              massTags_existing.splice(i, 1);
                                              break;
                                          }
                                  }
                   });
 
                   //Variables in tags to add
 
                   $.each(massTags_add, function(index, value) {
                        var newTag = value.replace('%%fullname%%', pageFullname).replace('%%parent_fullname%%', pageParent).replace('%%title%%', pageTitle).replace('%%name%%', pageName).replace('%%category%%', pageCategory);
                        massTags_add[index] = newTag;                         
                   });                   
 
                   $.merge(massTags_existing, massTags_add); //Merge existing tags (- removed tags) with tags to add
 
               wd.pages.save_one({'site': wdSite, 'page': thisPage, 'tags': massTags_existing}, function(data) {
 
                   if(data) {
               mass_changeTags(index + 1);
               }
               else {
                loading.html('Error tagging pages.').delay(3000).fadeOut(200);
                }
 
                });
 
               }); 
        }
        }
        else {
        loading.html('Pages have been tagged.').delay(3000).fadeOut(200);
        $('#mass-tags-submit').removeClass('disabled');
        ga_trackEvent('Mass Editor','Change Tags','Successful');
        }
 
 }
}
 
$('#mass-tags-submit').click(function() {
      jConfirm('This will edit the tags on all of the pages you have selected. Are you sure you want to continue?', 'Please confirm', function(r) {
          if(r === true) {
              mass_changeTags(0);
              $('#mass-tags-submit').addClass('disabled');
          }
      });    
});
 
//Disable form elements when 'remove all tags' is checked
var massTags_removeInput = $('#mass-tags-remove');
var massTags_addInput = $('#mass-tags-add');
$('#mass-tags-removeAll').click(function() {
        if ($(this).is(':checked')) {
                massTags_removeInput.attr('disabled', true);
                massTags_addInput.attr('disabled', true);
            } else {
                massTags_removeInput.removeAttr('disabled');
                massTags_addInput.removeAttr('disabled');
            }
});
 
//Mass Editor - Rename Pages
$('.mass-rename-input').attr('disabled', true);
$(document.massRenameForm.massRename).click(function() {
        if ($(this).is(':checked')) {
                $('.mass-rename-input').attr('disabled', true);
                $('#mass-rename-' + $(this).val()).removeAttr('disabled').focus();
            } 
 });
 
function mass_rename(index) {
    var thisPage = massEditorPagesArray[index];
    var totalPagesToRename = massEditorPagesArray.length;
    var thisPageNumber = index + 1;
 
    if(massEditorPagesArray.length === 0) {
        jAlert('Hmm, you haven\'t selected any pages yet. Select pages to rename using the list on the left.', 'No pages selected', function(r) {
            $('#mass-rename-submit').removeClass('disabled');
        });
 
    }
    else {
 
        if(thisPage) {  
 
                loadingMessage('Renaming page: ' + thisPage + ' (' + thisPageNumber + '/' + totalPagesToRename + ')');
 
               if ($('#mass-rename-prepend-radio').is(':checked')) {
                   var newPage = $('#mass-rename-prepend').val() + thisPage;
               }
               else if ($('#mass-rename-append-radio').is(':checked')) {
                   var newPage = thisPage + $('#mass-rename-append').val();
               }
               else if ($('#mass-rename-category-radio').is(':checked')) {
                   var pageNameSplit = thisPage.replace(':', ':::edmund-splitter:::');
                   var pageNameArray = pageNameSplit.split(':::edmund-splitter:::');
 
                   var newPage = $('#mass-rename-category').val() + ':' + pageNameArray[1];
               }
               else if ($('#mass-rename-delete-radio').is(':checked')) {
                   var newPage = $('#mass-rename-delete').val() + thisPage;
               }
 
               wd.pages.save_one({'site': wdSite, 'page': thisPage, 'rename_as': newPage}, function(data) {
 
               if(data) {
                   mass_rename(index + 1);
               }
                else {
                 loading.html('Error renaming page.').delay(3000).fadeOut(200);
                }
 
               });
 
        }
        else {
        loading.html('Pages have been renamed.').delay(3000).fadeOut(200);
        $('#mass-rename-submit').removeClass('disabled');
        ga_trackEvent('Mass Editor','Rename','Successful');
        }
 
 }
}
 
$('#mass-rename-submit').click(function() {
      jConfirm('This will rename all of the pages you have selected. Are you sure you want to continue?', 'Please confirm', function(r) {
          if(r === true) {
              mass_rename(0);
              $('#mass-rename-submit').addClass('disabled');
          }
      });    
});
 
//Keyboard shortcuts
/*
$(document).bind('keydown', 'ctrl+i', function(e) {e.preventDefault();import_modal();show_modal('modal-import')});
$(document).bind('keydown', 'ctrl+p', function(e) {e.preventDefault();show_modal('settings')});
$(document).bind('keydown', 'ctrl+s', function(e) {e.preventDefault();savePage()});
*/
 
}); 
</script> 
 
<!-- Google Analytics -->
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-25082132-1']);
  _gaq.push(['_gat._anonymizeIp']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
 
</head> 
<body id="top"> 
<header> 
<div class="inner"> 
<span id="loading"></span> 
<h1>Edmund - Wikidot Explorer</h1> 
</div> 
</header> 
 
<div id="content"> 
 
<div id="sidebar" class="disabled"> 
<div class="menubar side"><a href="javascript:;" onclick="show_modal('settings');" class="settings-link menubar-link" title="Edit settings">Settings</a> <a href="javascript:;" onclick="import_modal();show_modal('modal-import');" class="import-link menubar-link" title="Import a page">Import</a></div> 
 
 <form onsubmit="return false;" class="switch-form"> 
 <label for="mass-editor-toggle" class="switch-label"> 
 <span>Editor mode:</span> 
 <input type="checkbox" name="mass-editor-toggle" id="mass-editor-toggle" class="switch-checkbox"/> 
 <div class="switch"> 
 <div class="handle"></div> 
 <div class="track"> 
 <span>Mass</span> 
 <span>Normal</span> 
 </div> 
 </div> 
 </label> 
 </form> 
 
<div id="side-menubar"> 
<div class="sidebar-list-container left current"><h4>Categories</h4><span id="info-category-count" class="count"></span></div> 
<div class="sidebar-list-container right"><a href="#" class="menubar-back" onclick="goToCategoryList();">Back</a><h4 id="info-category"></h4><span id="info-page-count" class="count"></span></div> 
</div> 
<div id="sidebar-lists"> 
<ul id="category-list" class="sidebar-list-container left current"> 
</ul> 
<ul id="page-list" class="sidebar-list-container right"> 
</ul>    
</div> 
 
</div> 
 
 <div id="main"> 
 
 <section id="main-editor"> 
 
 <div class="menubar main"> 
 <span id="info-site"></span> <span id="info-page"></span> 
 <a href="#" id="save-page-submit">Save Changes</a> 
 <a href="#" id="page-options-link" onclick="showDraw('page-options');">Page Options</a> 
 </div> 
 <div class="notification-center"> 
 <div id="notify-notifications" title="Email notifications will be sent"></div> 
 </div> 
 <div class="table-wrapper"> 
 <table class="page-meta full top"> 
 <tr> 
 <td>Title</td><td id="meta-title" class="editable"></td> 
 </tr> 
 </table> 
 
 <table class="page-meta left"> 
 <tr> 
 <td>Fullname</td><td id="meta-name" class="editable"></td> 
 </tr> 
 <tr> 
 <td>Created by</td><td id="meta-created_by"></td> 
 </tr> 
 <tr> 
 <td>Creation date</td><td id="meta-created_at"></td> 
 </tr> 
 <tr> 
 <td>Updated by</td><td id="meta-updated_by"></td> 
 </tr> 
 <tr> 
 <td>Update date</td><td id="meta-updated_at"></td> 
 </tr> 
  </table> 
 
  <table class="page-meta right"> 
  <tr> 
  <td>Parent</td><td id="meta-parent" class="edit-parent editable"></td> 
  </tr> 
  <tr> 
  <td>Revisions</td><td id="meta-revisions"></td> 
  </tr> 
  <tr> 
  <td>Rating</td><td id="meta-rating"></td> 
  </tr> 
  <tr> 
  <td><a href="#" id="show-children-link">Children</a></td><td id="meta-children"></td> 
  </tr> 
  <tr> 
  <td>Comments</td><td id="meta-comments"></td> 
  </tr> 
  </table> 
 
  <table class="page-meta full bottom"> 
  <tr> 
  <td><a href="#" id="show-tags-link">Tags</a></td><td id="meta-tags" class="editable"></td> 
  </tr> 
  </table> 
 
 <textarea id="meta-content"></textarea> 
 </div> 
 
<form id="save-page-form" name="save page" onsubmit="return false;"> 
<input type="hidden" name="save-page-title" id="save-page-title" value="" /> 
<input type="hidden" name="save-page-parent" id="save-page-parent" value="" /> 
<input type="hidden" name="save-page-tags" id="save-page-tags" value="" /> 
<input type="hidden" name="save-page-name" id="save-page-name" value="" /> 
<input type="hidden" name="save-page-original-name" id="save-page-original-name" value="" /> 
</form> 
 
</section> 
 
<section id="intro" class="draw wide show"> 
<div class="menubar draw"> 
<span>Welcome to Edmund</span><a href="#" onclick="hideDraw('intro');">Close</a> 
</div> 
 
<div class="inner scrollable"> 
 
<p><strong>First timers:</strong></p> 
 
<p>If this is the first time you've visited Edmund, then you'll need to enter your Wikidot API key and a site to explore in the <a href="javascript:;" onclick="show_modal('settings');">settings panel</a>.</p> 
 
<p><strong>Regulars:</strong></p> 
 
<p>If you've  visited Edmund before, then your settings should be saved. Click the button below to start exploring.</p> 
 
<p><a href="#" id="launch-button">Launch App</a></p> 
 
<p><strong>Finding your way around</strong></p> 
 
<p>The sidebar on the left shows all the categories in your site. Click on a category to show all the pages in that category. Click on a page to load it into the main window.</p> 
 
<p>The main window shows all the meta information attached to the page as well as the content of the page. Fields that change colour when you hover over them can be edited - click to edit their contents, then press enter or the save button to save your changes locally. Once you've edited all that you want to, click the <em>Save Changes</em> button in the top right to export the page to your Wikidot site.</p> 
 
<p>Status messages will appear in the very top right of the page (in the header) - this is where Edmund tells you what he's doing.</p> 
 
<p><strong>'Open in Edmund' Bookmarlet</strong></p> 
 
<p>Since version 0.71, Edmund supports importing a page using a bookmarlet. Drag the button below to your bookmarks bar, and when on a Wikidot page, click it to import that page into Edmund. It does not currently support custom domains.</p> 
 
<p><a href="javascript:domain=WIKIREQUEST.info.domain.match(/^(.*?)\.wikidot\.com$/);if(domain){unix=WIKIREQUEST.info.pageUnixName;window.location='https://css3.wdfiles.com/edmund/code/1#?site='+domain[1]+'&page='+unix}else{alert('Custom domains are not yet supported.');}" class="button">Open in Edmund</a></p> 
</div> 
</section> 
 
<section id="mass-editor" class="draw wide"> 
<div class="menubar draw"> 
<span>Mass Editor</span> 
</div> 
 
<div class="inner scrollable"> 
 
<p>Select pages from the left to add to the mass editor. Clicking the category title will add all pages from that category.</p> 
 
<div class="mass-pages"> 
<ul class="mass-editor-page-list"> 
<li><a href="#" class="clear-mass-editor">Clear Mass Editor List</a></li> 
</ul> 
<ul id="mass-editor-pages" class="mass-editor-page-list"> 
</ul> 
</div> 
<div id="mass-tabs" class="tab-container"> 
<ul class="tabnav"> 
<li><a href="#mass-tags">Tags</a></li>  
<li><a href="#mass-rename">Rename</a></li>  
<li><a href="#mass-export">Export</a></li> 
</ul> 
 
<div id="mass-tags" class="tabdiv"> 
<h4>Change Tags</h4> 
<p>Enter a space separated list of tags in the relevant fields below.</p> 
<table> 
<tr> 
<td>Tags to remove:</td><td><input type="text" name="mass-tags-remove" value="" id="mass-tags-remove" class="mass-tags-input" /></td> 
</tr> 
<tr> 
<td>Tags to add:</td><td><input type="text" name="mass-tags-add" value="" id="mass-tags-add" class="mass-tags-input" /></td> 
</tr> 
<tr> 
<td>Remove all tags:</td><td><input type="checkbox" name="mass-tags-removeAll" id="mass-tags-removeAll"/></td> 
</tr> 
</table> 
 
<input type="button" class="button" name="mass-tags-go" id="mass-tags-submit" value="Change Tags" /> 
</div> 
 
<div id="mass-rename" class="tabdiv"> 
<h4>Rename Pages</h4> 
<p>Choose an option below to begin renaming your pages.</p> 
<form name="massRenameForm"onsubmit="return false;">
<table> 
<tr> 
<td><input type="radio" name="massRename" id="mass-rename-prepend-radio" value="prepend" /></td><td>Prepend</td><td><input type="text" name="mass-rename-prepend" value="" id="mass-rename-prepend" class="mass-rename-input" /></td> 
</tr> 
<tr> 
<td><input type="radio" name="massRename" id="mass-rename-append-radio" value="append" /></td><td>Append</td><td><input type="text" name="mass-rename-append" value="" id="mass-rename-append" class="mass-rename-input" /></td> 
</tr> 
<tr> 
<td><input type="radio" name="massRename" id="mass-rename-category-radio" value="category" /></td><td>Change category</td><td><input type="text" name="mass-rename-category" value="" id="mass-rename-category" class="mass-rename-input" /></td> 
</tr> 
<tr> 
<td><input type="radio" name="massRename" id="mass-rename-delete-radio" value="delete" /></td><td>Delete</td><td><input type="text" name="mass-rename-delete" value="deleted:" id="mass-rename-delete" class="mass-rename-input" /></td> 
</tr>
</table> 
 
<input type="button" class="button" name="mass-rename-go" id="mass-rename-submit" value="Rename pages" /> 
</form>
</div> 
 
<div id="mass-export" class="tabdiv"> 
<h4>Export Pages</h4> 
<p>This feature is coming soon.</p> 
</div> 
 
</div> 
 
</div> 
</section> 
 
<section id="page-options" class="draw"> 
<div class="menubar draw"> 
<span>Page options</span><a href="#" onclick="hideDraw('page-options');">Close</a> 
</div> 
<p><a href="#" id="options-delete" class="button">Delete page</a></p> 
<p><strong>Note:</strong> Deleting a page renames it to the <em>deleted</em> category.</p> 
</section> 
 
<section id="children" class="draw"> 
<div class="menubar draw"> 
<span>Children</span><a href="#" onclick="hideDraw('children');">Close</a> 
</div> 
 
<p></p> 
 
<ul id="children-list"> 
</ul> 
 
</section> 
 
<section id="tags" class="draw"> 
<div class="menubar draw"> 
<span>Tags</span><a href="#" onclick="hideDraw('tags');">Close</a> 
</div> 
 
<p></p> 
 
<ul id="tags-list"> 
</ul> 
 
</section> 
 
<section id="tagged-pages" class="draw"> 
<div class="menubar draw"> 
<span>Tagged pages</span><a href="#" onclick="hideDraw('tagged-pages');unNudgeDraw('tags');">Close</a> 
</div> 
 
<p></p> 
 
<ul id="tagged-pages-list"> 
</ul> 
 
</section> 
 
<section id="about" class="draw"> 
<div class="menubar draw"> 
<span>About Edmund</span><a href="#" onclick="hideDraw('about');">Close</a> 
</div> 
 
<div class="inner scrollable"> 
 
<p><strong>Edmund</strong> let's you explore your Wikidot site like never before. He's currently in beta, so be careful - you never know when he might throw a tantrum. He especially doesn't like really big sites.</p> 
 
<p><strong>What's with the name?</strong></p> 
<p>Count Paweł <strong>Edmund</strong> Strzelecki was a Polish explorer who adventured across to Australia in the early 1800s. Among other things, Strzelecki climbed the highest peak, naming it Mount Kosciuszko, after Tadeusz Kościuszko, a national Hero of Poland. He's also in the first result when you search <em>Polish Explorer</em> on Google.</p> 
 
<p><strong>Credits</strong></p> 
<p>Edmund was hand crafted by <a href="http://bmccreative.com">BMC Creative</a>. A big thanks to <strong><a href="http://www.wikidot.com">Wikidot</a></strong> for building this awesome platform, <strong>Piotr Gabryjeluk</strong> for the jQuery API Library and <strong>James Kanjo</strong> for the date parser.</p> 
 
<p><strong>License</strong></p> 
<p>This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 3 as 
    published by the Free Software Foundation.<br> 
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.<br> 
 
    A copy of the GNU General Public License is available from
    <a href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a>.</p> 
</div> 
</section> 
 
 </div> 
 
 <div id="activity"></div> 
 
 </div> 
 
 <div id="settings" class="modal"> 
 <div class="modal-inner">
 <h4>Wikidot Settings</h4> 
  <a href="#" class="modal-close" onclick="close_modal('settings');">Close</a>
 <form name="settings-form" id="settings-form" class="modal-form"> 
 <label for="settings-site">Site:</label> 
 <input type="text" name="settings-site" id="settings-site" value="" /> 
 <label for="settings-site" class="url-end">.wikidot.com</label><br> 
 
 <label for="settings-api-key">API Key:</label> 
 <input type="text" name="settings-api-key" id="settings-api-key" value="" /><br> 
 
 <input type="submit" name="settings-submit" value="Go Explore..." onsubmit="return false;" /> 
 </form> 
 <h4>Edmund Options</h4> 
 <form class="settings-form" onsubmit="return false;"> 
 <span    class="settings-group-label">Export:</span><input type="checkbox" name="settings-notifications" id="settings-notifications" value="" />
 <label for="settings-notifications" class="checkbox-label">Send watching notifcations</label> <br> 
 <div    class="settings-group-label"></div><input type="checkbox" name="settings-revision-comment" id="settings-revision-comment" value="" />
 <label for="settings-revision-comment" class="checkbox-label">Prompt for revision comment when saving</label> <br> 
 <div    class="settings-group-label"></div><input type="checkbox" name="settings-save-confirm" id="settings-save-confirm" value="" />
 <label for="settings-save-confirm" class="checkbox-label">Check if page exists before saving</label> <br> 
 <span    class="settings-group-label">Startup:</span><input type="checkbox" name="settings-startup" id="settings-startup" value="" />
 <label for="settings-startup" class="checkbox-label">Launch Edmund immediately</label> <br> 
 
 <!-- Event tracking - not currently enabled. 
 <span    class="settings-group-label">Statistics:</span><input type="checkbox" name="settings-analytics" id="settings-analytics" value="" />
 <label for="settings-analytics" class="checkbox-label">Allow anonymous usage analytics</label><br> 
 -->
 </form>  
 </div>
 </div> 
 
<footer> 
<div class="left"> 
Edmund v0.87 beta | <a href="#" onclick="hideAllDraws(); showDraw('intro');">Intro</a> | <a href="#" onclick="hideAllDraws(); showDraw('about');">About</a> | <a href="javascript:;" onClick="show_modal('settings');">Settings</a> 
</div> 
<div class="right"> 
Brought to you by <a href="http://bmccreative.com">BMC Creative</a> 
</div> 
 
</footer> 
 
<div id="overlay"></div>
<noscript>
<div id="modal-nojs" class="modal show">
<div class="modal-inner">
<h4>JavaScript is required.</h4>
<p>Edmund depends on JavaScript in order to function properly. Please enable JavaScript in your browser and try again.</p>
</div>
</div>
<div class="overlay show nojs"></div>
</noscript>
</body> 
</html>
Site design © BMC WebDesign, 2011. All rights reserved. All tutorials on this site are free for commerical use, subject to conditions outlined in the disclaimer.