mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
More work on JSHint compliance.
This commit is contained in:
parent
81273d2e6c
commit
64f997a3bc
1 changed files with 5 additions and 4 deletions
|
@ -14,6 +14,7 @@
|
||||||
* @name PaperScript
|
* @name PaperScript
|
||||||
* @namespace
|
* @namespace
|
||||||
*/
|
*/
|
||||||
|
/*jshint -W082 */
|
||||||
Base.exports.PaperScript = (function() {
|
Base.exports.PaperScript = (function() {
|
||||||
// Locally turn of exports and define for inlined acorn.
|
// Locally turn of exports and define for inlined acorn.
|
||||||
// Just declaring the local vars is enough, as they will be undefined.
|
// Just declaring the local vars is enough, as they will be undefined.
|
||||||
|
@ -260,13 +261,13 @@ Base.exports.PaperScript = (function() {
|
||||||
var sourceMap = null,
|
var sourceMap = null,
|
||||||
browser = paper.browser,
|
browser = paper.browser,
|
||||||
version = browser.versionNumber,
|
version = browser.versionNumber,
|
||||||
lineBreaks = /\r\n|\n|\r/mg;
|
lineBreaks = /\r\n|\n|\r/mg,
|
||||||
|
offset = 0;
|
||||||
// TODO: Verify these browser versions for source map support, and check
|
// TODO: Verify these browser versions for source map support, and check
|
||||||
// other browsers.
|
// other browsers.
|
||||||
if (browser.chrome && version >= 30
|
if (browser.chrome && version >= 30
|
||||||
|| browser.webkit && version >= 537.76 // >= Safari 7.0.4
|
|| browser.webkit && version >= 537.76 // >= Safari 7.0.4
|
||||||
|| browser.firefox && version >= 23) {
|
|| browser.firefox && version >= 23) {
|
||||||
var offset = 0;
|
|
||||||
if (window.location.href.indexOf(url) === 0) {
|
if (window.location.href.indexOf(url) === 0) {
|
||||||
// If the code stems from the actual html page, determine the
|
// If the code stems from the actual html page, determine the
|
||||||
// offset of inlined code.
|
// offset of inlined code.
|
||||||
|
@ -347,8 +348,8 @@ Base.exports.PaperScript = (function() {
|
||||||
// Compile a list of all handlers that can be defined globally
|
// Compile a list of all handlers that can be defined globally
|
||||||
// inside the PaperScript. These are passed on to the function as
|
// inside the PaperScript. These are passed on to the function as
|
||||||
// undefined arguments, so that their name exists, rather than
|
// undefined arguments, so that their name exists, rather than
|
||||||
// injecting a code line that defines them as variables.
|
// injecting a code line that defines them as variables. They are
|
||||||
// They are exported again at the end of the function.
|
// exported again at the end of the function.
|
||||||
handlers = ['onFrame', 'onResize'].concat(toolHandlers),
|
handlers = ['onFrame', 'onResize'].concat(toolHandlers),
|
||||||
// compile a list of parameter names for all variables that need to
|
// compile a list of parameter names for all variables that need to
|
||||||
// appear as globals inside the script. At the same time, also
|
// appear as globals inside the script. At the same time, also
|
||||||
|
|
Loading…
Reference in a new issue