14 lines
54 KiB
JavaScript
14 lines
54 KiB
JavaScript
|
// ==UserScript==
|
||
|
// @name Kobo Price
|
||
|
// @namespace https://tertyshny.dev
|
||
|
// @description Find lowest book price on kobo.com
|
||
|
// @noframes
|
||
|
// @match https://www.kobo.com/*/*/ebook/*
|
||
|
// @match https://www.kobo.com/*/*/audiobook/*
|
||
|
// @run-at document-end
|
||
|
// @version 2
|
||
|
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfoBw8NLTdMz5O6AAACdnpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAAOI2tVVuS3CAM/NcpcgQsCQmO4zHmL1X5zPHTAs/sPDy72ao1VX4gkFqtFqa/v//Qr7iKGckm3YsnW0zsYtmVk7Flc6u2S2Pe++Vy6cyYr6Yxk12yNknaPKlgbbFKWnx1bMziq+5ZDU84FMEmZumyc5LNi6xeDButRTBbOMW3bba7hI0iAtCo9cAh6zTclg8kH24wd4kdetvBKRdtOREHuO5jSjLvYtyAZxERuBCXirlFslRhKaK8YZYlYc6446m4L1KJ29i0HneVxM+Dj/QYKEzWzKpqT6kxDWOkV1wxkqxIp/u4eHes4n0g9hk5xkDCuDPubQYAIhdHfYIRL0gLEcL+iAIQUCoUgq0OpioYwoqr3RYCYd1BbKCaxN7XIgjWhlK/YB4B948yET5AtjWkU4ApRQKgF084bNeq3TkX1xw6eyKEzry/dx5KdCSHNT3cuYx82IQgxeE/eDlL7OukZlg6i3t1efCzalStzqaBg03DhXgO2UaZtKoOZc9N8Kyjm1YL+UFR2BRDuA1OPN4EEoJgIVspWCtQfxtkA1ZGvXNsgUnC+ILoBMEzAAoEmpXRDHCEns2QS9UF6o1GWXR+G9oDVgyNtsC3woKYsGkEpofIIUwJaVoQmF8i15n6U+Acgem7kY9arhoqByEIi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Ke=Object.defineProperties,Ze=Object.getOwnPropertyDescriptor,et=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertyNames,ce=Object.getOwnPropertySymbols,rt=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable;var se=(e,t,r)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t)=>{for(var r in t||(t={}))ue.call(t,r)&&se(e,r,t[r]);if(ce)for(var r of ce(t))nt.call(t,r)&&se(e,r,t[r]);return e},F=(e,t)=>Ke(e,et(t));var ot=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var at=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tt(t))!ue.call(e,o)&&o!==r&&B(e,o,{get:()=>t[o],enumerable:!(n=Ze(t,o))||n.enumerable});return e};var it=(e,t,r)=>(r=e!=null?Ue(rt(e)):{},at(t||!e||!e.__esModule?B(r,"default",{value:e,enumerable:!0}):r,e));var Ge=ot((z,J)=>{(function(e,t){typeof z=="object"&&typeof J<"u"?J.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.currency=t())})(z,function(){function e(a,i){if(!(this instanceof e))return new e(a,i);i=Object.assign({},r,i);var c=Math.pow(10,i.precision);this.intValue=a=t(a,i),this.value=a/c,i.increment=i.increment||1/c,i.groups=i.useVedic?o:n,this.s=i,this.p=c}function t(a,i){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:!0,s=i.decimal,f=i.errorOnInvalid,h=i.fromCents,y=Math.pow(10,i.precision),d=a instanceof e;if(d&&h)return a.intValue;if(typeof a=="number"||d)s=d?a.value:a;else if(typeof a=="string")f=new RegExp("[^-\\d"+s+"]","g"),s=new RegExp("\\"+s,"g"),s=(s=a.replace(/\((.*)\)/,"-$1").replace(f,"").replace(s,"."))||0;else{if(f)throw Error("Invalid Input");s=0}return h||(s=(s*y).toFixed(4)),c?Math.round(s):s}var r={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:function(a,i){var c=i.pattern,s=i.negativePattern,f=i.symbol,h=i.separator,y=i.decimal;i=i.groups;var d=(""+a).replace(/^-/,"").split("."),w=d[0];return d=d[1],(0<=a.value?c:s).replace("!",f).replace("#",w.replace(i,"$1"+h)+(d?y+d:""))},fromCents:!1},n=/(\d)(?=(\d{3})+\b)/g,o=/(\d)(?=(\d\d)+\d\b)/g;return e.prototype={add:function(a){var i=this.s,c=this.p;return e((this.intValue+t(a,i))/(i.fromCents?1:c),i)},subtract:function(a){var i=this.s,c=this.p;return e((this.intValue-t(a,i))/(i.fromCents?1:c),i)},multiply:function(a){var i=this.s;return e(this.intValue*a/(i.fromCents?1:Math.pow(10,i.precision)),i)},divide:function(a){var i=this.s;return e(this.intValue/t(a,i,!1),i)},distribute:function(a){var i=this.intValue,c=this.p,s=this.s,f=[],h=Math[0<=i?"floor":"ceil"](i/a),y=Math.abs(i-h*a);for(c=s.fromCents?1:c;a!==0;a--){var d=e(h/c,s);0<y--&&(d=d[0<=i?"add":"subtract"](1/c)),f.push(d)}return f},dollars:function(){return~~this.value},cents:function(){return~~(this.intValue%this.p)},format:function(a){var i=this.s;return typeof a=="function"?a(this,i):i.format(this,Object.assign({},i,a))},toString:function(){var a=this.s,i=a.increment;return(Math.round(this.intValue/this.p/i)*i).toFixed(a.precision)},toJSON:function(){return this.value}},e})});globalThis.l=(...e)=>console.log("KOBOPRICE",...e);var de=[{countryCode:"ww",currencyCode:"usd"},{countryCode:"ca",currencyCode:"cad"},{countryCode:"us",currencyCode:"usd"},{countryCode:"in",currencyCode:"inr"},{countryCode:"za",currencyCode:"zar"},{countryCode:"au",currencyCode:"aud"},{countryCode:"hk",currencyCode:"hkd"},{countryCode:"jp",currencyCode:"jpy"},{countryCode:"my",currencyCode:"myr"},{countryCode:"nz",currencyCode:"nzd"},{countryCode:"ph",currencyCode:"php"},{countryCode:"sg",currencyCode:"sgd"},{countryCode:"tw",currencyCode:"twd"},{countryCode:"th",currencyCode:"usd"},{countryCode:"at",currencyCode:"eur"},{countryCode:"be",currencyCode:"eur"},{countryCode:"cy",currencyCode:"eur"},{countryCode:"cz",currencyCode:"czk"},{countryCode:"dk",currencyCode:"dkk"},{countryCode:"ee",currencyCode:"eur"},{countryCode:"fi",currencyCode:"eur"},{countryCode:"fr",currencyCode:"eur"},{countryCode:"de",currencyCode:"eur"},{countryCode:"gr",
|
||
|
//# sourceMappingURL=index.js.map
|