From 3750a6a803d093ad1a82a79a1198cf398d515a49 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Thu, 4 Feb 2016 16:55:29 -0800 Subject: [PATCH] Log requirejs usage --- notebook/templates/page.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/notebook/templates/page.html b/notebook/templates/page.html index 6cc058113..b3170ef05 100644 --- a/notebook/templates/page.html +++ b/notebook/templates/page.html @@ -82,8 +82,20 @@ '*':{ 'contents': '{{ contents_js_source }}', } - } + }, }); + + // Log when requirejs calls are made. + var originalRequire = window['require']; + window['require'] = window['requirejs'] = function() { + console.info('require', arguments); + originalRequire.apply(this, arguments); + } + var originalDefine = window['define']; + window['define'] = function() { + console.info('define', arguments); + originalDefine.apply(this, arguments); + } {% block meta %}