From b816337e1846bdbafe269943e34d8f1a1f3170f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ju=CC=88rg=20Lehni?= Date: Fri, 26 Dec 2014 06:21:56 +0100 Subject: [PATCH] Remove legay.js since we're about to hit 2015. Closes #592 --- src/core/PaperScript.js | 2 +- src/legacy.js | 23 ----------------------- src/paper.js | 4 ---- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 src/legacy.js diff --git a/src/core/PaperScript.js b/src/core/PaperScript.js index 86d601b2..228a08b1 100644 --- a/src/core/PaperScript.js +++ b/src/core/PaperScript.js @@ -393,7 +393,7 @@ Base.exports.PaperScript = (function() { // functions: // https://code.google.com/p/chromium/issues/detail?id=331655 var script = document.createElement('script'), - head = document.head; + head = document.head || document.getElementsByTagName('head')[0]; // Add a new-line before the code on Firefox since the error // messages appear to be aligned to line number 0... if (browser.firefox) diff --git a/src/legacy.js b/src/legacy.js deleted file mode 100644 index 33f45f58..00000000 --- a/src/legacy.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Paper.js - The Swiss Army Knife of Vector Graphics Scripting. - * http://paperjs.org/ - * - * Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey - * http://scratchdisk.com/ & http://jonathanpuckey.com/ - * - * Distributed under the MIT license. See LICENSE file for details. - * - * All rights reserved. - */ - -// Support for legacy browsers (mainly FF 3.6). Remove 2nd half of 2014? - -if (!Array.isArray) { - Array.isArray = function(obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; - }; -} - -if (!document.head) { - document.head = document.getElementsByTagName('head')[0]; -} diff --git a/src/paper.js b/src/paper.js index 0bdab168..4368f234 100644 --- a/src/paper.js +++ b/src/paper.js @@ -40,10 +40,6 @@ var paper = new function(undefined) { /*#*/ include('../bower_components/stats.js/build/stats.min.js'); /*#*/ } -/*#*/ if (__options.legacy) { -/*#*/ include('legacy.js'); -/*#*/ } - /*#*/ if (__options.version == 'dev') { /*#*/ include('constants.js'); /*#*/ }