odensc / ttv-ublock

Blocking ads on that certain streaming website
MIT License
897 stars 60 forks source link

concat scripts to a single file #18

Open Scrxtchy opened 3 years ago

Scrxtchy commented 3 years ago

Not really much point in adding complexity to the build operation when you can just use a test what browser someone is using and alter the operation based on that condition.

Build script may need testing, I believe my version of zip behaves differently, you could forgo the build version folder entirely if you wanted seeing there's now only single output

vercel[bot] commented 3 years ago

@Scrxtchy is attempting to deploy a commit to a Personal Account owned by @odensc on Vercel.

@odensc first needs to authorize it.

odensc commented 3 years ago

Is there a better way of checking the browser besides detecting chrome.app?

Scrxtchy commented 3 years ago

There's a few other ways, but you're really just going to check if any of these functions exist or not. Firefox has a [runtime.getBrowserInfo()](runtime.getBrowserInfo()) which returns an Promise if you want to do string compare, but this function doesn't appear to exist within chrome's runtime api.

An old way of checking was to check if the chrome api was undefined on firefox, but this now exists on the platform for porting assistance (the browser standard api uses Promises)