diff --git a/notebook/static/auth/js/loginwidget.js b/notebook/static/auth/js/loginwidget.js index 1ae4dbabf..b1a5b37c1 100644 --- a/notebook/static/auth/js/loginwidget.js +++ b/notebook/static/auth/js/loginwidget.js @@ -3,8 +3,7 @@ define([ 'base/js/utils', - 'jquery', -], function(utils, $){ +], function(utils){ "use strict"; var LoginWidget = function (selector, options) { diff --git a/notebook/static/base/js/dialog.js b/notebook/static/base/js/dialog.js index b2721ec11..ac9885e84 100644 --- a/notebook/static/base/js/dialog.js +++ b/notebook/static/base/js/dialog.js @@ -5,9 +5,6 @@ define(function(require) { "use strict"; var CodeMirror = require('codemirror/lib/codemirror'); - var $ = require('jquery'); - // bootstrap is required for calling .modal(...) on elements - require('bootstrap'); /** * A wrapper around bootstrap modal for easier use diff --git a/notebook/static/base/js/events.js b/notebook/static/base/js/events.js index 4cab05db2..936ee63e7 100644 --- a/notebook/static/base/js/events.js +++ b/notebook/static/base/js/events.js @@ -9,7 +9,7 @@ // events.on("event.Namespace", function () { do_stuff(); }); // }); -define(['base/js/namespace', 'jquery'], function(IPython, $) { +define(['base/js/namespace'], function(IPython) { "use strict"; var Events = function () {}; diff --git a/notebook/static/base/js/keyboard.js b/notebook/static/base/js/keyboard.js index 4a9c03425..1ee374738 100644 --- a/notebook/static/base/js/keyboard.js +++ b/notebook/static/base/js/keyboard.js @@ -9,10 +9,9 @@ */ define([ - 'jquery', 'base/js/utils', 'underscore', -], function($, utils, _) { +], function(utils, _) { "use strict"; diff --git a/notebook/static/base/js/notificationarea.js b/notebook/static/base/js/notificationarea.js index c3d8528ee..35c82b0f8 100644 --- a/notebook/static/base/js/notificationarea.js +++ b/notebook/static/base/js/notificationarea.js @@ -2,9 +2,8 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/notificationwidget', -], function($, notificationwidget) { +], function(notificationwidget) { "use strict"; // store reference to the NotificationWidget class diff --git a/notebook/static/base/js/notificationwidget.js b/notebook/static/base/js/notificationwidget.js index 660143743..5df7fe5d8 100644 --- a/notebook/static/base/js/notificationwidget.js +++ b/notebook/static/base/js/notificationwidget.js @@ -1,9 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -define([ - 'jquery', -], function($) { +define([], function() { "use strict"; /** diff --git a/notebook/static/base/js/page.js b/notebook/static/base/js/page.js index 9ec72786f..bb522dcfe 100644 --- a/notebook/static/base/js/page.js +++ b/notebook/static/base/js/page.js @@ -2,9 +2,8 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/events', -], function($, events){ +], function(events){ "use strict"; var Page = function () { diff --git a/notebook/static/base/js/security.js b/notebook/static/base/js/security.js index 71130fc4b..6e2b34345 100644 --- a/notebook/static/base/js/security.js +++ b/notebook/static/base/js/security.js @@ -2,9 +2,8 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'components/google-caja/html-css-sanitizer-minified', -], function($, sanitize) { +], function(sanitize) { "use strict"; var noop = function (x) { return x; }; diff --git a/notebook/static/base/js/utils.js b/notebook/static/base/js/utils.js index 52e2c028e..9e3f20ae2 100644 --- a/notebook/static/base/js/utils.js +++ b/notebook/static/base/js/utils.js @@ -2,12 +2,11 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'codemirror/lib/codemirror', 'moment', // silently upgrades CodeMirror 'codemirror/mode/meta', -], function($, CodeMirror, moment){ +], function(CodeMirror, moment){ "use strict"; // keep track of which extensions have been loaded already diff --git a/notebook/static/edit/js/editor.js b/notebook/static/edit/js/editor.js index d27da4325..2d9c40c89 100644 --- a/notebook/static/edit/js/editor.js +++ b/notebook/static/edit/js/editor.js @@ -2,7 +2,6 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/utils', 'codemirror/lib/codemirror', 'codemirror/mode/meta', @@ -16,7 +15,7 @@ define([ 'codemirror/keymap/sublime', 'codemirror/keymap/vim', ], -function($, +function( utils, CodeMirror ) { diff --git a/notebook/static/edit/js/main.js b/notebook/static/edit/js/main.js index 3b8ea77a6..41acb0846 100644 --- a/notebook/static/edit/js/main.js +++ b/notebook/static/edit/js/main.js @@ -2,7 +2,6 @@ // Distributed under the terms of the Modified BSD License. require([ - 'jquery', 'base/js/namespace', 'base/js/utils', 'base/js/page', @@ -13,9 +12,7 @@ require([ 'edit/js/menubar', 'edit/js/savewidget', 'edit/js/notificationarea', - 'custom/custom', ], function( - $, IPython, utils, page, @@ -28,6 +25,8 @@ require([ notificationarea ){ "use strict"; + requirejs(['custom/custom'], function() {}); + page = new page.Page(); var base_url = utils.get_body_data('baseUrl'); diff --git a/notebook/static/edit/js/menubar.js b/notebook/static/edit/js/menubar.js index 73952d4db..a72ee0429 100644 --- a/notebook/static/edit/js/menubar.js +++ b/notebook/static/edit/js/menubar.js @@ -2,14 +2,12 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/namespace', 'base/js/utils', 'base/js/dialog', 'codemirror/lib/codemirror', 'codemirror/mode/meta', - 'bootstrap', -], function($, IPython, utils, dialog, CodeMirror) { +], function(IPython, utils, dialog, CodeMirror) { "use strict"; var MenuBar = function (selector, options) { diff --git a/notebook/static/edit/js/savewidget.js b/notebook/static/edit/js/savewidget.js index 31d7cc65d..4072f1a6a 100644 --- a/notebook/static/edit/js/savewidget.js +++ b/notebook/static/edit/js/savewidget.js @@ -2,12 +2,11 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/utils', 'base/js/dialog', 'base/js/keyboard', 'moment', -], function($, utils, dialog, keyboard, moment) { +], function(utils, dialog, keyboard, moment) { "use strict"; var SaveWidget = function (selector, options) { diff --git a/notebook/static/notebook/js/about.js b/notebook/static/notebook/js/about.js index 50ef7ad3d..af8a23c39 100644 --- a/notebook/static/notebook/js/about.js +++ b/notebook/static/notebook/js/about.js @@ -1,11 +1,10 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. require([ - 'jquery', 'base/js/dialog', 'underscore', 'base/js/namespace' -], function ($, dialog, _, IPython) { +], function (dialog, _, IPython) { 'use strict'; $('#notebook_about').click(function () { // use underscore template to auto html escape diff --git a/notebook/static/notebook/js/actions.js b/notebook/static/notebook/js/actions.js index a83daedde..152b6fbfc 100644 --- a/notebook/static/notebook/js/actions.js +++ b/notebook/static/notebook/js/actions.js @@ -34,7 +34,6 @@ define(function(require){ Object.seal(this); }; - var $ = require('jquery'); var events = require('base/js/events'); /** diff --git a/notebook/static/notebook/js/cell.js b/notebook/static/notebook/js/cell.js index 78602d68c..2a792cae9 100644 --- a/notebook/static/notebook/js/cell.js +++ b/notebook/static/notebook/js/cell.js @@ -10,13 +10,12 @@ define([ - 'jquery', 'base/js/utils', 'codemirror/lib/codemirror', 'codemirror/addon/edit/matchbrackets', 'codemirror/addon/edit/closebrackets', 'codemirror/addon/comment/comment' -], function($, utils, CodeMirror, cm_match, cm_closeb, cm_comment) { +], function(utils, CodeMirror, cm_match, cm_closeb, cm_comment) { "use strict"; var overlayHack = CodeMirror.scrollbarModel.native.prototype.overlayHack; diff --git a/notebook/static/notebook/js/celltoolbar.js b/notebook/static/notebook/js/celltoolbar.js index b0bb31a2b..987710625 100644 --- a/notebook/static/notebook/js/celltoolbar.js +++ b/notebook/static/notebook/js/celltoolbar.js @@ -3,9 +3,8 @@ define([ 'base/js/namespace', - 'jquery', 'base/js/events' -], function(IPython, $, events) { +], function(IPython, events) { "use strict"; var CellToolbar = function (options) { diff --git a/notebook/static/notebook/js/celltoolbarpresets/default.js b/notebook/static/notebook/js/celltoolbarpresets/default.js index fe457f6c9..a7a761786 100644 --- a/notebook/static/notebook/js/celltoolbarpresets/default.js +++ b/notebook/static/notebook/js/celltoolbarpresets/default.js @@ -2,10 +2,9 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'notebook/js/celltoolbar', 'base/js/dialog', -], function($, celltoolbar, dialog) { +], function(celltoolbar, dialog) { "use strict"; var CellToolbar = celltoolbar.CellToolbar; diff --git a/notebook/static/notebook/js/celltoolbarpresets/example.js b/notebook/static/notebook/js/celltoolbarpresets/example.js index 0e631706e..d49b3134e 100644 --- a/notebook/static/notebook/js/celltoolbarpresets/example.js +++ b/notebook/static/notebook/js/celltoolbarpresets/example.js @@ -9,9 +9,8 @@ // $.getScript('/static/js/celltoolbarpresets/example.js'); // ``` define([ - 'jquery', 'notebook/js/celltoolbar', -], function($, celltoolbar) { +], function(celltoolbar) { "use strict"; var CellToolbar = celltoolbar.CellToolbar; diff --git a/notebook/static/notebook/js/celltoolbarpresets/rawcell.js b/notebook/static/notebook/js/celltoolbarpresets/rawcell.js index f3e23453e..d59a29420 100644 --- a/notebook/static/notebook/js/celltoolbarpresets/rawcell.js +++ b/notebook/static/notebook/js/celltoolbarpresets/rawcell.js @@ -2,11 +2,10 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'notebook/js/celltoolbar', 'base/js/dialog', 'base/js/keyboard', -], function($, celltoolbar, dialog, keyboard) { +], function(celltoolbar, dialog, keyboard) { "use strict"; var CellToolbar = celltoolbar.CellToolbar; diff --git a/notebook/static/notebook/js/celltoolbarpresets/slideshow.js b/notebook/static/notebook/js/celltoolbarpresets/slideshow.js index 50dc96db2..5fc5ee27c 100644 --- a/notebook/static/notebook/js/celltoolbarpresets/slideshow.js +++ b/notebook/static/notebook/js/celltoolbarpresets/slideshow.js @@ -2,9 +2,8 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'notebook/js/celltoolbar', -], function($, celltoolbar) { +], function(celltoolbar) { "use strict"; diff --git a/notebook/static/notebook/js/codecell.js b/notebook/static/notebook/js/codecell.js index 10b361149..27e551f55 100644 --- a/notebook/static/notebook/js/codecell.js +++ b/notebook/static/notebook/js/codecell.js @@ -11,7 +11,6 @@ define([ 'base/js/namespace', - 'jquery', 'base/js/utils', 'base/js/keyboard', 'services/config', @@ -23,7 +22,6 @@ define([ 'codemirror/mode/python/python', 'notebook/js/codemirror-ipython' ], function(IPython, - $, utils, keyboard, configmod, diff --git a/notebook/static/notebook/js/commandpalette.js b/notebook/static/notebook/js/commandpalette.js index b97ce10c7..7b7f7ccbe 100644 --- a/notebook/static/notebook/js/commandpalette.js +++ b/notebook/static/notebook/js/commandpalette.js @@ -5,7 +5,6 @@ define(function(require){ "use strict"; var QH = require("notebook/js/quickhelp"); - var $ = require("jquery"); /** * Humanize the action name to be consumed by user. diff --git a/notebook/static/notebook/js/completer.js b/notebook/static/notebook/js/completer.js index 3ac2b3ed7..111bc6349 100644 --- a/notebook/static/notebook/js/completer.js +++ b/notebook/static/notebook/js/completer.js @@ -2,12 +2,11 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/utils', 'base/js/keyboard', 'notebook/js/contexthint', 'codemirror/lib/codemirror', -], function($, utils, keyboard, CodeMirror) { +], function(utils, keyboard, CodeMirror) { "use strict"; // easier key mapping diff --git a/notebook/static/notebook/js/kernelselector.js b/notebook/static/notebook/js/kernelselector.js index d06f5712f..7f7b9d73b 100644 --- a/notebook/static/notebook/js/kernelselector.js +++ b/notebook/static/notebook/js/kernelselector.js @@ -2,12 +2,11 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/namespace', 'base/js/dialog', 'base/js/utils', 'require', -], function($, IPython, dialog, utils, require) { +], function(IPython, dialog, utils, require) { "use strict"; var KernelSelector = function(selector, notebook) { diff --git a/notebook/static/notebook/js/keyboardmanager.js b/notebook/static/notebook/js/keyboardmanager.js index 37d8e0b06..717492d17 100644 --- a/notebook/static/notebook/js/keyboardmanager.js +++ b/notebook/static/notebook/js/keyboardmanager.js @@ -9,10 +9,9 @@ */ define([ - 'jquery', 'base/js/utils', 'base/js/keyboard', -], function($, utils, keyboard) { +], function(utils, keyboard) { "use strict"; // Main keyboard manager for the notebook diff --git a/notebook/static/notebook/js/main.js b/notebook/static/notebook/js/main.js index 327bf495d..192c162f0 100644 --- a/notebook/static/notebook/js/main.js +++ b/notebook/static/notebook/js/main.js @@ -23,9 +23,7 @@ require([ 'codemirror/lib/codemirror', 'notebook/js/about', 'typeahead', - 'notebook/js/searchandreplace', - // only loaded, not used, please keep sure this is loaded last - 'custom/custom' + 'notebook/js/searchandreplace' ], function( IPython, $, @@ -48,12 +46,12 @@ require([ CodeMirror, about, typeahead, - searchandreplace, - // please keep sure that even if not used, this is loaded last - custom + searchandreplace ) { "use strict"; + requirejs(['custom/custom'], function() {}); + // BEGIN HARDCODED WIDGETS HACK // Try to load the new extension utils.load_extension('widgets/extension').catch(function () { diff --git a/notebook/static/notebook/js/maintoolbar.js b/notebook/static/notebook/js/maintoolbar.js index 4c4277208..f449afa17 100644 --- a/notebook/static/notebook/js/maintoolbar.js +++ b/notebook/static/notebook/js/maintoolbar.js @@ -3,10 +3,9 @@ define([ 'require', - 'jquery', './toolbar', './celltoolbar' -], function(require, $, toolbar, celltoolbar) { +], function(require, toolbar, celltoolbar) { "use strict"; var MainToolBar = function (selector, options) { diff --git a/notebook/static/notebook/js/mathjaxutils.js b/notebook/static/notebook/js/mathjaxutils.js index 7848da810..ddba54b65 100644 --- a/notebook/static/notebook/js/mathjaxutils.js +++ b/notebook/static/notebook/js/mathjaxutils.js @@ -2,10 +2,9 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/utils', 'base/js/dialog', -], function($, utils, dialog) { +], function(utils, dialog) { "use strict"; var init = function () { diff --git a/notebook/static/notebook/js/menubar.js b/notebook/static/notebook/js/menubar.js index 61d8e4524..28cc15361 100644 --- a/notebook/static/notebook/js/menubar.js +++ b/notebook/static/notebook/js/menubar.js @@ -2,14 +2,13 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/namespace', 'base/js/dialog', 'base/js/utils', './celltoolbar', './tour', 'moment', -], function($, IPython, dialog, utils, celltoolbar, tour, moment) { +], function(IPython, dialog, utils, celltoolbar, tour, moment) { "use strict"; var MenuBar = function (selector, options) { diff --git a/notebook/static/notebook/js/notebook.js b/notebook/static/notebook/js/notebook.js index 51dd23718..020d0779a 100644 --- a/notebook/static/notebook/js/notebook.js +++ b/notebook/static/notebook/js/notebook.js @@ -7,7 +7,6 @@ define(function (require) { "use strict"; var IPython = require('base/js/namespace'); - var $ = require('jquery'); var _ = require('underscore'); var utils = require('base/js/utils'); var dialog = require('base/js/dialog'); diff --git a/notebook/static/notebook/js/notificationarea.js b/notebook/static/notebook/js/notificationarea.js index c4fd55c07..94ab4b116 100644 --- a/notebook/static/notebook/js/notificationarea.js +++ b/notebook/static/notebook/js/notificationarea.js @@ -1,10 +1,9 @@ define([ - 'jquery', 'base/js/utils', 'base/js/dialog', 'base/js/notificationarea', 'moment' -], function($, utils, dialog, notificationarea, moment) { +], function(utils, dialog, notificationarea, moment) { "use strict"; var NotificationArea = notificationarea.NotificationArea; diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js index f04f73577..64962f24f 100644 --- a/notebook/static/notebook/js/outputarea.js +++ b/notebook/static/notebook/js/outputarea.js @@ -2,13 +2,12 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery-ui', 'base/js/utils', 'base/js/security', 'base/js/keyboard', 'notebook/js/mathjaxutils', 'components/marked/lib/marked', -], function($, utils, security, keyboard, mathjaxutils, marked) { +], function(utils, security, keyboard, mathjaxutils, marked) { "use strict"; /** diff --git a/notebook/static/notebook/js/pager.js b/notebook/static/notebook/js/pager.js index 260f7b471..59b801fe5 100644 --- a/notebook/static/notebook/js/pager.js +++ b/notebook/static/notebook/js/pager.js @@ -2,9 +2,8 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery-ui', 'base/js/utils', -], function($, utils) { +], function(utils) { "use strict"; var Pager = function (pager_selector, options) { diff --git a/notebook/static/notebook/js/quickhelp.js b/notebook/static/notebook/js/quickhelp.js index 744aae64a..385e6adf2 100644 --- a/notebook/static/notebook/js/quickhelp.js +++ b/notebook/static/notebook/js/quickhelp.js @@ -2,10 +2,9 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/utils', 'base/js/dialog', -], function($, utils, dialog) { +], function(utils, dialog) { "use strict"; var platform = utils.platform; diff --git a/notebook/static/notebook/js/savewidget.js b/notebook/static/notebook/js/savewidget.js index c78067f98..ce8ed2b12 100644 --- a/notebook/static/notebook/js/savewidget.js +++ b/notebook/static/notebook/js/savewidget.js @@ -2,12 +2,11 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/utils', 'base/js/dialog', 'base/js/keyboard', 'moment', -], function($, utils, dialog, keyboard, moment) { +], function(utils, dialog, keyboard, moment) { "use strict"; var SaveWidget = function (selector, options) { diff --git a/notebook/static/notebook/js/scrollmanager.js b/notebook/static/notebook/js/scrollmanager.js index 89144ccea..f65f984ae 100644 --- a/notebook/static/notebook/js/scrollmanager.js +++ b/notebook/static/notebook/js/scrollmanager.js @@ -1,6 +1,6 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -define(['jquery'], function($){ +define([], function() { "use strict"; var ScrollManager = function(notebook, options) { diff --git a/notebook/static/notebook/js/textcell.js b/notebook/static/notebook/js/textcell.js index 96c6db0c1..ddab2bdc1 100644 --- a/notebook/static/notebook/js/textcell.js +++ b/notebook/static/notebook/js/textcell.js @@ -3,7 +3,6 @@ define([ 'base/js/utils', - 'jquery', 'notebook/js/cell', 'base/js/security', 'services/config', @@ -15,7 +14,6 @@ define([ 'notebook/js/codemirror-ipythongfm' ], function( utils, - $, cell, security, configmod, diff --git a/notebook/static/notebook/js/toolbar.js b/notebook/static/notebook/js/toolbar.js index 8b85c0b55..0aaa64291 100644 --- a/notebook/static/notebook/js/toolbar.js +++ b/notebook/static/notebook/js/toolbar.js @@ -1,9 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -define([ - 'jquery' -], function($) { +define([], function() { "use strict"; /** diff --git a/notebook/static/notebook/js/tooltip.js b/notebook/static/notebook/js/tooltip.js index d131200d8..bbce422eb 100644 --- a/notebook/static/notebook/js/tooltip.js +++ b/notebook/static/notebook/js/tooltip.js @@ -2,9 +2,8 @@ // Distributed under the terms of the Modified BSD License. define([ - 'jquery', 'base/js/utils', -], function($, utils) { +], function(utils) { "use strict"; // tooltip constructor diff --git a/notebook/static/notebook/js/tour.js b/notebook/static/notebook/js/tour.js index 9ac56a53b..df21ab7d4 100644 --- a/notebook/static/notebook/js/tour.js +++ b/notebook/static/notebook/js/tour.js @@ -1,10 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -define([ - 'jquery', - 'bootstraptour', -], function($, Tour) { +define([], function() { "use strict"; var tour_style = "