diff --git a/tampermonkey.js b/tampermonkey.js index cdba967..e7378ad 100644 --- a/tampermonkey.js +++ b/tampermonkey.js @@ -148,7 +148,7 @@ function generalCapIsEnabled () { return retVal; } -function getBidCap(countyId) { +function getBidCapForCountyId(countyId) { //Get the default bidcap from settings var bidCap = alwaysWinSettings.generalCap; const countyOversight = alwaysWinSettings.oversight.find(({ id }) => id === countyId); @@ -184,7 +184,7 @@ function getCountyInfo(countyId){ num_clicksToMinWin = (winGap + bidIncriment) / bidIncriment; } - let num_bidCap = getBidCap(countyId); + let num_bidCap = getBidCapForCountyId(countyId); let num_clicksToBidCap = num_clicksToMinWin; bidController.readTimestamp = new Date(); @@ -526,14 +526,14 @@ function getBidCapReasonIcon(reason) { } function getBidCapReason(tieBid, myBid, oversightAction, rowCapIsEnabled, rowCap, generalCapIsEnabled, generalCap, capPresidence, applyPresidenceTo) { - let tieBidNum = number(tieBid); - let winBidNum = number(tieBid) + 25; - let generalCapNum = number(generalCap); - let rowCapNum = number(rowCap); - let myBidNum = number(myBid); + let tieBidNum = Number(tieBid); + let winBidNum = Number(tieBid) + 25; + let generalCapNum = Number(generalCap); + let rowCapNum = Number(rowCap); + let myBidNum = Number(myBid); //Build our response object - let bidCapData = {}; + let results = {}; results.shouldApplyCap = false; //Flag to indicate if the cap should be applied results.reason = 0; //No Cap to start of with results.trueCap = null; //Default to no true cap @@ -790,15 +790,14 @@ jQuery(window).on('load',function() { //Inject our controls var newDiv = document.createElement ('div'); var newHtml = '
'; - newHtml += ' | '; newHtml += ' | '; newHtml += '
'; - - newHtml += ': to seconds
'; + newHtml += ' '; + newHtml += ': to seconds
'; newHtml += ' '; newHtml += ' per county
'; - newHtml += '
'; + newHtml += '
'; newHtml += '
'; newHtml += '
';