comparison mercurial/templates/static/mercurial.js @ 35654:59c842a3d1e1

hgweb: remove unused second argument of nextPageVarGet() nextPageVarGet is a function that's used in ajaxScrollInit() to produce URL of the next page. Before f84b01257e06, its second argument previousVal was a number on /graph pages, and the code was simply adding 60 to it and returning the resulting value. Now previousVal can only be a string containing changeset hash, which can't be used the same way (and in fact isn't used in any way).
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 15 Jan 2018 19:44:18 +0800
parents 45a816361926
children 2ead51dcde71
comparison
equal deleted inserted replaced
35653:48fe4f56a3b4 35654:59c842a3d1e1
469 469
470 if (mode === 'graph') { 470 if (mode === 'graph') {
471 var graph = window.graph; 471 var graph = window.graph;
472 var dataStr = htmlText.match(/^\s*var data = (.*);$/m)[1]; 472 var dataStr = htmlText.match(/^\s*var data = (.*);$/m)[1];
473 var data = JSON.parse(dataStr); 473 var data = JSON.parse(dataStr);
474 if (data.length < nextPageVar) {
475 nextPageVar = undefined;
476 }
477 graph.reset(); 474 graph.reset();
478 adoptChildren(doc.querySelector('#graphnodes'), container.querySelector('#graphnodes')); 475 adoptChildren(doc.querySelector('#graphnodes'), container.querySelector('#graphnodes'));
479 graph.render(data); 476 graph.render(data);
480 } else { 477 } else {
481 adoptChildren(doc.querySelector(containerSelector), container); 478 adoptChildren(doc.querySelector(containerSelector), container);
482 } 479 }
483 480
484 nextPageVar = nextPageVarGet(htmlText, nextPageVar); 481 nextPageVar = nextPageVarGet(htmlText);
485 }, 482 },
486 function onerror(errorText) { 483 function onerror(errorText) {
487 var message = { 484 var message = {
488 'class': 'scroll-loading-error', 485 'class': 'scroll-loading-error',
489 text: 'Error: ' + errorText 486 text: 'Error: ' + errorText