Skip to content

Commit

Permalink
jslinted for fun
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Oct 21, 2011
1 parent 0645330 commit 11de00e
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 75 deletions.
14 changes: 8 additions & 6 deletions src/Leaflet.js
Expand Up @@ -4,15 +4,15 @@
* See http://leaflet.cloudmade.com for more information.
*/

/*global L */
/*global L*/ /*jslint browser: true, sloppy: true, vars: true, nomen: true, plusplus: true */

(function (root) {
root.L = {
VERSION: '0.3',

ROOT_URL: (function () {
ROOT_URL: root.L_ROOT_URL || (function () {
var scripts = document.getElementsByTagName('script'),
leafletRe = /^(.*\/)leaflet\-?([\w\-]*)\.js.*$/;
leafletRe = /\/?leaflet\-?([\w\-]*)\.js\??/;

var i, len, src, matches;

Expand All @@ -21,11 +21,13 @@
matches = src.match(leafletRe);

if (matches) {
if (matches[2] === 'include') { break; }
return matches[1];
if (matches[1] === 'include') {
return '../../dist/';
}
return src.replace(leafletRe, '');
}
}
return '../../dist/';
return '';
}()),

noConflict: function () {
Expand Down

0 comments on commit 11de00e

Please sign in to comment.