Skip to content

Commit

Permalink
Fixed loading current image limits temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
ccloli committed Aug 26, 2024
1 parent 53751d6 commit dd50b1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var ehDownloadRegex = {
pagesRange: /^(!?\d*(-\d*(\/\d+)?)?\s*,\s*)*!?\d*(-\d*(\/\d+)?)?$/,
pagesURL: /(?:<a href=").+?(?=")/gi,
mpvKey: /var imagelist\s*=\s*(\[.+?\]);/,
imageLimits: /You are currently at <strong>(\d+)<\/strong> towards a limit of <strong>(\d+)<\/strong>/,
imageLimits: /You are currently at <strong>([\d,]+)<\/strong> towards.*?limit of <strong>([\d,]+)<\/strong>/,
pagesLength: /<table class="ptt".+>(\d+)<\/a>.+?<\/table>/,
IPBanExpires: /The ban expires in \d+ hours?( and \d+ minutes?)?/,
donatorPower: /<td>Donations<\/td><td.*>([+-]?[\d\.]+)<\/td>/,
Expand Down Expand Up @@ -2656,8 +2656,8 @@ function loadImageLimits(forced, host){
else {
var data = responseText.match(ehDownloadRegex.imageLimits);
if (!data || data.length < 3) return;
preData.cur = data[1];
preData.total = data[2];
preData.cur = +data[1].replace(/,/g, '');
preData.total = +data[2].replace(/,/g, '');

var donatorPower = responseText.match(ehDownloadRegex.donatorPower);
if (!donatorPower || donatorPower.length < 2) return;
Expand Down

0 comments on commit dd50b1d

Please sign in to comment.