comparison geotemco/js/Build/Minifier/basic.js @ 0:b12c99b7c3f0

commit for previous development
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 19 Jan 2015 17:13:49 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b12c99b7c3f0
1 /*
2 * basic.js
3 *
4 * Copyright (c) 2012, Stefan Jänicke. All rights reserved.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301 USA
20 */
21
22 /**
23 * basic code which is included first for the minified version
24 * @author Stefan Jänicke (stjaenicke@informatik.uni-leipzig.de)
25 * @release 1.0
26 * @release date: 2012-07-27
27 * @version date: 2012-07-27
28 */
29
30 var arrayIndex = function(array, obj) {
31 if (Array.indexOf) {
32 return array.indexOf(obj);
33 }
34 for (var i = 0; i < array.length; i++) {
35 if (array[i] == obj) {
36 return i;
37 }
38 }
39 return -1;
40 }
41 var GeoTemCoMinifier_urlPrefix;
42 for (var i = 0; i < document.getElementsByTagName("script").length; i++) {
43 var script = document.getElementsByTagName("script")[i];
44 var index = script.src.indexOf("platin.js");
45 if (index == -1) {
46 index = script.src.indexOf("platin-min.js");
47 }
48 if (index != -1) {
49 GeoTemCoMinifier_urlPrefix = script.src.substring(0, index);
50 break;
51 }
52 }