From e2346107c1299644ca88891038797d8e765b631f Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 5 Oct 2015 11:32:03 +0100 Subject: [PATCH] mainMenu: fix strict mode SyntaxError in Chrome 37 This declaration (introduced in r5041) raises this compile-time exception in Chrome 37: "SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function." Newer Chromes don't seem to mind. I haven't bothered to check the spec... --- static/js/mainMenu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index 6f394ff..f89cee2 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -414,9 +414,9 @@ pandora.ui.mainMenu = function() { var action = data.id == 'copy' ? 'copy' : 'add', type = 'clip', clips; fromMenu = true; - function formatClip(clip) { + var formatClip = function(clip) { return clip.annotation || (clip.item||ui.item) + '/' + clip['in'] + '-' + clip.out; - } + }; if (pandora.isVideoView() && !pandora.$ui.browser.hasFocus()) { clips = [formatClip(ui.videoPoints[ui.item])]; } else if (pandora.isClipView() && !pandora.$ui.browser.hasFocus()) { -- 2.4.3