_gup.js 214 B

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