PageSourceSearch

https://bonus.fo/wp-content/cache/min/1/wp-content/themes/lunnarst…/gavukort-saldo.js?ver=1783516462

js bonus.fo collected 2026-10-02 21:46:39 UTC 1,169 bytes, 9 lines download raw bytes

1Number.prototype.format=function(decimalPlaces=0){return String(this.toFixed(decimalPlaces)).replace('.',',').replace(/\B(?=(\d{3})+(?!\d))/g,'.')};function initVue(){new Vue({el:'.lunnar-gavukort-saldo',data(){return{loading:!1,balance:null,cardNumber:'',cv2:'',nok:!1,}},computed:{cardNumberSpaced(){if(!this.cardNumber){return''}
2const spaces='    ';return this.cardNumber.slice(0,1)+spaces+this.cardNumber.slice(1,7)+spaces+this.cardNumber.slice(7,13)},buttonText(){return this.loading?'Bíða við...':'Kanna saldo'},},methods:{async submit(){if(this.loading){return}
3let string=this.cardNumber;if(string.startsWith('98')){string=string.replace('98','')}
4if(string.length===11){string=string.slice(0,10)}
5this.nok=!1;this.loading=!0;const response=await fetch(`/wp-json/v1/saldo?cardNumber=${string}&cv2=${this.cv2}`);if(!response.ok){this.loading=!1;return}
6const json=await response.json();this.loading=!1;if(json.status==='NOK'){this.nok=!0;this.balance=0;return}
7if(!isNaN(json.balance)){this.balance=Number(json.balance)}
8this.blurInputs()},blurInputs(){const inputs=document.querySelectorAll('input');for(const input of inputs){input.blur()}},},})}
9initVue()

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.