Closed miketaylr closed 6 years ago
See https://bugzilla.mozilla.org/show_bug.cgi?id=1427055 for the native version.
That's 404 now, but ["http", "https"].includes(location.protocol.slice(0, -1))
works.
(uh, or just include https:
and skip slice
ing anything)
We should only accept
http
andhttps
, rather than attempt to know what shouldnt be allowed.There's a nice idiom suggested by Dennis we can re-use:
https://github.com/webcompat/webcompat-reporter-extensions/blob/master/firefox-bootstrap/bootstrap.js#L57-L58