Kobo: Hide Non-whitelisted Billing Address Countries

Hide non-whitelisted countries on billing address’ country selection.

  1. /* ==UserStyle==
  2. @name Kobo: Hide Non-whitelisted Billing Address Countries
  3. @description Hide non-whitelisted countries on billing address’ country selection.
  4. @author Jason Kwok
  5. @namespace https://jasonhk.dev/
  6. @version 1.0.0
  7. @license MIT
  8. @preprocessor stylus
  9. @var text countries "Country Codes (Separated with “ ” or “,”)" "()"
  10. ==/UserStyle== */
  11.  
  12. @-moz-document regexp("https://www.kobo.com/[a-z]{2}/[a-z]{2}/account/paymentinformation/billingaddress"), regexp("https://www.kobo.com/[a-z]{2}/[a-z]{2}/checkout/index/.+")
  13. {
  14. if countries
  15. {
  16. :is(#Input_Country, #Country) > option
  17. {
  18. display: none;
  19. }
  20. for country in countries
  21. {
  22. :is(#Input_Country, #Country) > option[value={country}]
  23. {
  24. display: initial;
  25. }
  26. }
  27. }
  28. }