Closed Dead4W closed 6 years ago
1) Fixed a page offset on a search store page when was used data GET "page" Example: How to fix: Replace search_page = 2; to search_page = +$("#search_current_page").val() + 1; on lines 3451 and 3524 (enhancedsteam.js) 2) Changed URL to URL last loaded page ( After page reload (F5) offset will begin from last loaded page ) How to add: Add additional function: (enhancedsteam.js) function setLoc(loc,historySave) { curLoc = loc.replace(/#(\/|!)?/, ''); var l = (location.toString().match(/#(.*)/) || {})[1] || ''; if (!l) { l = (location.pathname || '') + (location.search || ''); } l = encodeURIComponent(l); if (l.replace(/^(\/|!)/, '') != curLoc) { try { if( historySave !== undefined ) { history.pushState({}, '', '/' + curLoc); } else { history.replaceState({}, '', '/' + curLoc); } return; } catch(e) {} window.chHashFlag = true; location.hash = '#/' + curLoc; if (withFrame && getLoc() != curLoc) { setFrameContent(curLoc); } } Remove string search_page = search_page + 1; After string runInPageContext(ripc); in load_search_results() insert setLoc('search/' + search + '&page=' + search_page++); Example function load_search_results() runInPageContext(ripc); setLoc('search/' + search + '&page=' + search_page++); }).error(function() { Optional: Add page select input
search_page = 2;
search_page = +$("#search_current_page").val() + 1;
function setLoc(loc,historySave) { curLoc = loc.replace(/#(\/|!)?/, ''); var l = (location.toString().match(/#(.*)/) || {})[1] || ''; if (!l) { l = (location.pathname || '') + (location.search || ''); } l = encodeURIComponent(l); if (l.replace(/^(\/|!)/, '') != curLoc) { try { if( historySave !== undefined ) { history.pushState({}, '', '/' + curLoc); } else { history.replaceState({}, '', '/' + curLoc); } return; } catch(e) {} window.chHashFlag = true; location.hash = '#/' + curLoc; if (withFrame && getLoc() != curLoc) { setFrameContent(curLoc); } }
search_page = search_page + 1;
runInPageContext(ripc);
setLoc('search/' + search + '&page=' + search_page++);
runInPageContext(ripc); setLoc('search/' + search + '&page=' + search_page++); }).error(function() {
I apologize for any mistakes in English :P
1) Fixed a page offset on a search store page when was used data GET "page" Example:
How to fix:
Replace ![2](https://user-images.githubusercontent.com/34807886/34325620-bbfaf228-e8a7-11e7-9034-4751af924450.png)
search_page = 2;
tosearch_page = +$("#search_current_page").val() + 1;
on lines 3451 and 3524 (enhancedsteam.js) 2) Changed URL to URL last loaded page ( After page reload (F5) offset will begin from last loaded page ) How to add: Add additional function: (enhancedsteam.js)function setLoc(loc,historySave) { curLoc = loc.replace(/#(\/|!)?/, ''); var l = (location.toString().match(/#(.*)/) || {})[1] || ''; if (!l) { l = (location.pathname || '') + (location.search || ''); } l = encodeURIComponent(l); if (l.replace(/^(\/|!)/, '') != curLoc) { try { if( historySave !== undefined ) { history.pushState({}, '', '/' + curLoc); } else { history.replaceState({}, '', '/' + curLoc); } return; } catch(e) {} window.chHashFlag = true; location.hash = '#/' + curLoc; if (withFrame && getLoc() != curLoc) { setFrameContent(curLoc); } }
Remove stringsearch_page = search_page + 1;
After stringrunInPageContext(ripc);
in load_search_results() insertsetLoc('search/' + search + '&page=' + search_page++);
Example function load_search_results()runInPageContext(ripc); setLoc('search/' + search + '&page=' + search_page++); }).error(function() {
Optional: Add page select inputI apologize for any mistakes in English :P