Logical test for Lightning or Classic Salesforce

Is there a logical test to determine if the page is running in Lightning or Classic Salesforce?  I want to do a Row Action URL redirect…but the URL should be different for Lightning than for Classic depending on which environment the page is currently running in.

You can use {{$Platform.name}} in merge syntax to get the name of the current platform, which will be either “lightning ” or “visualforce”

https://docs.skuid.com/latest/v2/en/skuid/merge-syntax/global-merge-variables.html#platform

The page runs in a visualforce wrapper regardless of whether the user is clicking the tab from Classic or Lightning…won’t the Platform Name still show Visualforce regardless?

My use case here is that I need to redirect to a Salesforce report from a row action and pass a parameter from the row (record owner) to the report.  I mdoing this using the URL and appending the correct filter number…but the syntax is different for Classic and Lightning…“pv” vs “fv”  so the same URL doesn’t work in both

That makes sense, yeah the Platform Name will still say Visualforce in both cases. 

Could you pass both parameter values? Or does that not work?