You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: background.js
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -398,6 +398,8 @@ function summarizeDocument(document, url, sectionTitle, pageURL) {
398
398
if(response.status===429){
399
399
if(data.error==="You've exceeded your monthly summary limit for the FREE plan"){
400
400
message=`You've exceeded your monthly summary limit for the FREE plan. Please <a id="premium-subscribe-txt-sums" href="#" class="underline">subscribe</a> for unlimited summaries.`;
401
+
}elseif(data.error==="You've exceeded your monthly summary limit for the PREMIUM plan"){
402
+
message=`You've exceeded your monthly summary limit of 15 for the premium plan.`;
401
403
}else{
402
404
message="Please slow down, you've made too many requests in a short amount of time. Please wait an hour and try again. If you're still seeing this message, please contact us at [email protected].";
document.getElementById('welcomeContainer').innerHTML=`You've used <span class="font-semibold">${result.summariesCount}</span> <span class="tooltip"><span id="sumtokenexplainer">summary tokens</span><span class="tooltiptext">Summary tokens can be spent on generating your own summaries for policies that we've not yet summarised. One token is worth one summary.</span></span> so far this month!`;
537
+
}elseif(isPremiumUser&&userPlan==='premium'){
538
+
document.getElementById('welcomeContainer').innerHTML=`You've used <span class="font-semibold">${result.summariesCount}/15</span> <span class="tooltip"><span id="sumtokenexplainer">summary tokens</span><span class="tooltiptext">Summary tokens can be spent on generating your own summaries for policies that we've not yet summarised. One token is worth one summary.</span></span> this month!`;
537
539
}elseif(!isPremiumUser){
538
540
document.getElementById('welcomeContainer').innerHTML=`You've used <span class="font-semibold">${result.summariesCount}/2</span> <span class="tooltip"><span id="sumtokenexplainer">summary tokens</span><span class="tooltiptext">Summary tokens can be spent on generating your own summaries for policies that we've not yet summarised. One token is worth one summary.</span></span> this month.`;
0 commit comments