Skip to content

Commit 4e68d13

Browse files
- Fix for issue #96 in GitHub.
1 parent 11c42ee commit 4e68d13

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

app/design/frontend/base/default/template/strategery/infinitescroll/init.phtml

+18
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,24 @@
155155

156156
$('<?php echo Mage::getStoreConfig('infinitescroll/selectors/toolbar') ?>').<?php echo $helper->getConfigData('design/hide_toolbar') ? 'hide' : 'show' ?>();
157157

158+
// custom fix for url protocol issue in jquery ias library:
159+
window.ias.getNextUrl = function(container) {
160+
if (!container) {
161+
container = window.ias.$container;
162+
}
163+
// always take the last matching item + fix to be protocol relative
164+
var nexturl = $(window.ias.nextSelector, container).last().attr('href');
165+
if(typeof nexturl !== "undefined") {
166+
if (window.location.protocol == 'https:') {
167+
nexturl = nexturl.replace('http:', window.location.protocol);
168+
} else {
169+
nexturl = nexturl.replace('https:', window.location.protocol);
170+
}
171+
}
172+
return nexturl;
173+
};
174+
// custom fix for url protocol issue in jquery ias library.
175+
158176
if(windowLoadedFlag){
159177
$(window).load();
160178
}

0 commit comments

Comments
 (0)