webcompat / webcompat-reporter-extensions

Browser extensions to help report site compatibilty issues.
26 stars 21 forks source link

Switch to whitelist for `isReportableURL` #61

Closed miketaylr closed 6 years ago

miketaylr commented 7 years ago

We should only accept http and https, 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

miketaylr commented 6 years ago

https://github.com/webcompat/web-bugs/issues/14468

miketaylr commented 6 years ago

See https://bugzilla.mozilla.org/show_bug.cgi?id=1427055 for the native version.

miketaylr commented 6 years ago

https://github.com/webcompat/webcompat-reporter-extensions/blob/master/firefox-bootstrap/bootstrap.js#L57-L58

That's 404 now, but ["http", "https"].includes(location.protocol.slice(0, -1)) works.

miketaylr commented 6 years ago

(uh, or just include https: and skip sliceing anything)