_gup.js 218 B

123456789101112
  1. function gup(b) {
  2. b = b.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]")
  3. let a = "[\\?&]" + b + "=([^&#]*)"
  4. let d = new RegExp(a)
  5. let c = d.exec(window.location.href)
  6. if (c === null) return ''
  7. else return c[1]
  8. }