diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js
index 801bc3f..7f5111a 100644
--- a/IPython/frontend/html/notebook/static/js/notebook.js
+++ b/IPython/frontend/html/notebook/static/js/notebook.js
@@ -14,8 +14,11 @@ var IPython = (function (IPython) {
var utils = IPython.utils;
var key = IPython.utils.keycodes;
- var Notebook = function (selector) {
- this.read_only = IPython.read_only;
+ var Notebook = function (selector, options) {
+ var options = options || {};
+ this._baseProjectUrl = options.baseProjectUrl;
+ this.read_only = options.read_only || IPython.read_only;
+
this.element = $(selector);
this.element.scroll();
this.element.data("notebook", this);
diff --git a/IPython/frontend/html/notebook/static/js/notebookmain.js b/IPython/frontend/html/notebook/static/js/notebookmain.js
index c19150d..297822d 100644
--- a/IPython/frontend/html/notebook/static/js/notebookmain.js
+++ b/IPython/frontend/html/notebook/static/js/notebookmain.js
@@ -39,15 +39,17 @@ $(document).ready(function () {
// The header's bottom border is provided by the menu bar so we remove it.
$('div#header').css('border-bottom-style','none');
+ var baseProjectUrl = $('body').data('baseProjectUrl')
+
IPython.page = new IPython.Page();
IPython.markdown_converter = new Markdown.Converter();
IPython.layout_manager = new IPython.LayoutManager();
IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter');
IPython.quick_help = new IPython.QuickHelp('span#quick_help_area');
- IPython.login_widget = new IPython.LoginWidget('span#login_widget');
- IPython.notebook = new IPython.Notebook('div#notebook');
+ IPython.login_widget = new IPython.LoginWidget('span#login_widget',{baseProjectUrl:baseProjectUrl});
+ IPython.notebook = new IPython.Notebook('div#notebook',{baseProjectUrl:baseProjectUrl, read_only:IPython.read_only});
IPython.save_widget = new IPython.SaveWidget('span#save_widget');
- IPython.menubar = new IPython.MenuBar('#menubar')
+ IPython.menubar = new IPython.MenuBar('#menubar',{baseProjectUrl:baseProjectUrl})
IPython.toolbar = new IPython.MainToolBar('#maintoolbar')
IPython.tooltip = new IPython.Tooltip()
IPython.notification_area = new IPython.NotificationArea('#notification_area')