| 50 | } |
| 51 | |
| 52 | export function getHashParams() { |
| 53 | const hashParams = {}; |
| 54 | const a = /\+/g; // Regex for replacing addition symbol with a space |
| 55 | const r = /([^&;=]+)=?([^&;]*)/g; |
| 56 | const d = (s: string) => decodeURIComponent(s.replace(a, ' ')); |
| 57 | const q = window.location.hash.substring(1); |
| 58 | |
| 59 | let e = r.exec(q); |
| 60 | while (e) { |
| 61 | hashParams[d(e[1])] = d(e[2]); |
| 62 | e = r.exec(q); |
| 63 | } |
| 64 | |
| 65 | return hashParams; |
| 66 | } |
| 67 | |
| 68 | const fallbackCopyTextToClipboard = (text: any) => { |
| 69 | const textArea = document.createElement('textarea'); |