row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]];
}
/* If you want a stable sort, uncomment the following line */
- //sorttable.shaker_sort(row_array, this.sorttable_sortfunction);
+ sorttable.shaker_sort(row_array, this.sorttable_sortfunction);
/* and comment out this one */
- row_array.sort(this.sorttable_sortfunction);
+ //row_array.sort(this.sorttable_sortfunction);
tb = this.sorttable_tbody;
for (var j=0; j<row_array.length; j++) {
if (when >= 0) {
var empty = queue[what].length == 0;
queue[what].push([how, arg]);
+ if (console && console.log && empty && when > 2000) {
+ console.log("GitHub rate limit on: " + arg + " time to wait: " +
+ (when > 120 * 1000 ? Math.ceil(when / 1000 / 60) + " m" : Math.ceil(when / 1000) + " s"));
+ }
if (empty) window.setTimeout(function(){reQueue(what);}, when);
} else {
ghLimits[what].remaining--;
}
function signalDone() {
- if (!todo) $("#th-votes").html("Votes");
+ if (!todo) {
+ var myTH = $("#th-votes");
+ myTH.html("Votes");
+ var isSorted = [0];
+ Array.prototype.forEach.call(myTH[0].parentNode.children, function(e) {
+ if (e.classList.contains("sorttable_sorted") || e.classList.contains("sorttable_sorted_reverse")) {
+ isSorted[0] = 1;
+ }
+ });
+ if (!isSorted[0]) {
+ sorttable.innerSortFunction.apply(myTH[0].parentNode.children[0], []);
+ sorttable.innerSortFunction.apply(myTH[0].parentNode.children[0], []);
+ sorttable.innerSortFunction.apply(myTH[0], []);
+ sorttable.innerSortFunction.apply(myTH[0], []);
+ }
+ }
}
function _jsonpToJson(dta, typ) {