signature.js 400 B

123456789101112131415161718192021
  1. const getHashQuery = function(query) {
  2. //console.log(location.hash)
  3. if (location.hash.indexOf(query) > -1) {
  4. const cur = location.hash.slice(location.hash.indexOf(query) + query.length + 1, location.hash.length)
  5. if (cur.indexOf('&') > -1) {
  6. return cur.slice(0, cur.indexOf('&'))
  7. } else {
  8. return cur
  9. }
  10. } else {
  11. return false
  12. }
  13. }
  14. export default {
  15. getHashQuery
  16. }