envjs 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/envjs/env.js +5 -1
- metadata +3 -3
data/lib/envjs/env.js
CHANGED
@@ -190,7 +190,8 @@ $env.location = function(path, base){
|
|
190
190
|
(base.href.length > 0) ) {
|
191
191
|
base = base.href.substring(0, base.href.lastIndexOf('/'));
|
192
192
|
var result;
|
193
|
-
|
193
|
+
// print("XXXXX",base);
|
194
|
+
if ( base[base.length-1] == "/" || path[0] == "/" ) {
|
194
195
|
result = base + path;
|
195
196
|
} else {
|
196
197
|
result = base + '/' + path;
|
@@ -1807,6 +1808,9 @@ $w.__defineSetter__("location", function(url){
|
|
1807
1808
|
var to = $master.first_script_window && $master.first_script_window.location.href;
|
1808
1809
|
// var to = $env.location(url,window.location.href != "about:blank" ? window.location.href: undefined);
|
1809
1810
|
// I'm not sure why this code is here ... looking at the FSW
|
1811
|
+
// print("nu",now,url,to);
|
1812
|
+
to = to || $env.location(url,window.location.href);
|
1813
|
+
// print("nu",now,url,to);
|
1810
1814
|
if (to && to.indexOf(now)===0 && to[now.length]==="#") {
|
1811
1815
|
// print("return diff anchor only");
|
1812
1816
|
return;
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 5
|
9
|
+
version: 0.1.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- John Resig
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-02-
|
19
|
+
date: 2010-02-25 00:00:00 -08:00
|
20
20
|
default_executable: envjsrb
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|