turbolinks-js 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/assets/javascripts/turbolinks.js +6 -6
- metadata +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
// Generated by CoffeeScript 1.3.3
|
2
2
|
(function() {
|
3
|
-
var anchoredLink, browserSupportsPushState, cacheCurrentPage, changePage, createDocument, crossOriginLink, currentState, extractLink, extractTitleAndBody, fetchHistory, fetchReplacement,
|
3
|
+
var anchoredLink, browserSupportsPushState, cacheCurrentPage, changePage, constrainPageCacheTo, createDocument, crossOriginLink, currentState, extractLink, extractTitleAndBody, fetchHistory, fetchReplacement, handleClick, ignoreClick, initialized, newTabClick, noTurbolink, nonHtmlLink, pageCache, recallScrollPosition, reflectNewUrl, rememberCurrentState, rememberCurrentUrl, rememberInitialPage, samePageLink, triggerEvent, visit;
|
4
4
|
|
5
5
|
pageCache = [];
|
6
6
|
|
@@ -52,12 +52,12 @@
|
|
52
52
|
positionY: window.pageYOffset,
|
53
53
|
positionX: window.pageXOffset
|
54
54
|
};
|
55
|
-
return
|
55
|
+
return constrainPageCacheTo(10);
|
56
56
|
};
|
57
57
|
|
58
|
-
|
59
|
-
if (currentState.position === window.history.length - 1
|
60
|
-
return delete pageCache[currentState.position -
|
58
|
+
constrainPageCacheTo = function(limit) {
|
59
|
+
if (currentState.position === window.history.length - 1) {
|
60
|
+
return delete pageCache[currentState.position - limit];
|
61
61
|
}
|
62
62
|
};
|
63
63
|
|
@@ -157,7 +157,7 @@
|
|
157
157
|
};
|
158
158
|
|
159
159
|
nonHtmlLink = function(link) {
|
160
|
-
return link.href.match(/\.[a-z]
|
160
|
+
return link.href.match(/\.[a-z]+(\?.*)?$/g) && !link.href.match(/\.html?(\?.*)?$/g);
|
161
161
|
};
|
162
162
|
|
163
163
|
noTurbolink = function(link) {
|