Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am rishoej on github.
  • I am tobiasrr (https://keybase.io/tobiasrr) on keybase.
  • I have a public key ASBGRTxmEzfNnGOpEkdL2uom4s-FpkSkGseAk0kJtTF2dAo

To claim this, I am signing this object:

@rishoej
rishoej / Monkey patch window.location.origin typescript
Created Sep 18, 2018
Monkey patch window.location.origin with typescript
View Monkey patch window.location.origin typescript
if (!window.location.origin) {
// window.location.origin is "readonly", not sure how to overwrite that so use any type for this.
const wl: any = window.location
const port = wl.port ? `:${wl.port}` : ''
wl.origin = `${wl.protocol}//${wl.hostname}${port}`
}