disable not-working history fix
This commit is contained in:
@@ -52,22 +52,26 @@ function isNewToHistory(url){
|
|||||||
//last page already in history
|
//last page already in history
|
||||||
if ( history[0] == url) return null;
|
if ( history[0] == url) return null;
|
||||||
|
|
||||||
|
|
||||||
//replace url in history by current one, if controller is the same
|
//replace url in history by current one, if controller is the same
|
||||||
var urlController=url.split('.cgi').shift();
|
var urlController=url.split('.cgi').shift();
|
||||||
var historyController=history[0].split('.cgi').shift();
|
var historyController=history[0].split('.cgi').shift();
|
||||||
|
|
||||||
//remove last entry on same controller
|
//remove last entry on same controller
|
||||||
if(urlController==historyController){
|
if(urlController==historyController){
|
||||||
var ignore=0;
|
console.log("same controller\n"+url+"\n"+history[0])
|
||||||
|
//var ignore=0;
|
||||||
//provide back to series from series details
|
//provide back to series from series details
|
||||||
if(contains(url,'series')){
|
//if(contains(url,'series')){
|
||||||
//console.log(url);
|
//console.log(url);
|
||||||
//console.log(history[0]);
|
//console.log(history[0]);
|
||||||
if( (contains(url,'series_id')==true) && (contains(history[0],'series_id')==false)) ignore=1;
|
//if( (contains(url,'series_id')==true) && (contains(history[0],'series_id')==false)) ignore=1;
|
||||||
//console.log(ignore);
|
//console.log(ignore);
|
||||||
|
//}
|
||||||
|
//if (ignore==0)
|
||||||
|
//history.shift();
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
if (ignore==0) history.shift();
|
|
||||||
}
|
|
||||||
|
|
||||||
return history;
|
return history;
|
||||||
}
|
}
|
||||||
@@ -101,22 +105,22 @@ function appendHistory(url, rewrite){
|
|||||||
|
|
||||||
function showHistory(){
|
function showHistory(){
|
||||||
var history=getHistory();
|
var history=getHistory();
|
||||||
var s='<pre style="z-index:110;position:absolute;right:0;top:0">';
|
var s='<pre style="z-index:110;position:absolute;right:0;top:0;padding:0">';
|
||||||
for (var i=5; i>=0;i--){
|
for (var i=5; i>=0;i--){
|
||||||
if(history[i]!=null) s+=i+" "+history[i]+"\n";
|
if(history[i]!=null) s+=i+" "+history[i]+"\n";
|
||||||
}
|
}
|
||||||
s+='</pre>';
|
s+='</pre>';
|
||||||
//alert(s)
|
|
||||||
$('#content').prepend(s);
|
$('#content').prepend(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBack(){
|
function getBack(){
|
||||||
var history=getHistory();
|
var history=getHistory();
|
||||||
//alert("getBack")
|
|
||||||
if (history.length==0)return;
|
if (history.length==0)return;
|
||||||
|
|
||||||
//remove current page
|
//remove current page
|
||||||
history.shift();
|
var url=history.shift();
|
||||||
if (history.length==0)return;
|
if (history.length==0)return;
|
||||||
|
|
||||||
//remove previous page
|
//remove previous page
|
||||||
var url=history.shift();
|
var url=history.shift();
|
||||||
setCookie("history", history.join("|"));
|
setCookie("history", history.join("|"));
|
||||||
|
|||||||
Reference in New Issue
Block a user