Skip to content
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.

Commit

Permalink
Compiled Coffee sources
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-alexandrov committed Jul 2, 2013
1 parent 453fa4b commit 9926093
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
wiselinks (0.7.0)
wiselinks (0.7.1)

GEM
remote: https://rubygems.org/
Expand Down
Binary file removed build/wiselinks-0.7.0.min.js.gz
Binary file not shown.
16 changes: 12 additions & 4 deletions build/wiselinks-0.7.0.js → build/wiselinks-0.7.1.js
@@ -1,5 +1,5 @@
/**
* Wiselinks-0.7.0
* Wiselinks-0.7.1
* @copyright 2012-2013 Igor Alexandrov, Alexey Solilin, Julia Egorova, Alexandr Borisov
* @preserve https://github.com/igor-alexandrov/wiselinks
*/
Expand Down Expand Up @@ -126,7 +126,7 @@
};

Link.prototype._cross_origin_link = function(link) {
return (location.protocol !== link.protocol) || (location.host.split(':')[0] !== link.host.split(':')[0]);
return (location.protocol !== link.protocol) || (location.port !== link.port) || (location.host.split(':')[0] !== link.host.split(':')[0]);
};

Link.prototype._non_standard_click = function(event) {
Expand Down Expand Up @@ -286,13 +286,13 @@
dataType: "html"
}).done(function(data, status, xhr) {
var assets_digest, url;
url = xhr.getResponseHeader('X-Wiselinks-Url');
url = self._normalize(xhr.getResponseHeader('X-Wiselinks-Url'));
assets_digest = xhr.getResponseHeader('X-Wiselinks-Assets-Digest');
if (self._assets_changed(assets_digest)) {
return window.location.reload(true);
} else {
state = History.getState();
if ((url != null) && url !== encodeURI(state.url)) {
if ((url != null) && (url !== encodeURI(self._normalize(state.url)))) {
self._redirect_to(url, $target, state, xhr);
}
$target.html(data);
Expand All @@ -306,6 +306,14 @@
});
};

RequestManager.prototype._normalize = function(url) {
if (url == null) {
return;
}
url = url.replace(/\/+$/, '');
return url;
};

RequestManager.prototype._assets_changed = function(assets_digest) {
return (this.options.assets_digest != null) && this.options.assets_digest !== assets_digest;
};
Expand Down
18 changes: 9 additions & 9 deletions build/wiselinks-0.7.0.min.js → build/wiselinks-0.7.1.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added build/wiselinks-0.7.1.min.js.gz
Binary file not shown.

0 comments on commit 9926093

Please sign in to comment.