Post

Replies

Boosts

Views

Activity

Can injected scripts add rules to injected stylesheets?
In normal javascript, it seems like it's possible to select a particular stylesheet and add a rule to it via .addRule(...). Yet, it doesn't seem my injected script has access to my injected stylesheet because console.log(document.styleSheets) does not list my app-extension's injected stylesheet. Is there any way to access my injected stylesheet from my injected script so I can customize the styling of the elements I generate? There are, of course, cheesy workarounds. I could simply add the rules I want to a webpage's first stylesheet, but that lowers the seniority of the rule (in that adding !important tags won't guarantee it's implemented). The ultimage goal is to let user's customize the coloring of the pretty complicated & dynamic elements rendered by my injected script. Thanks, Pat
2
0
641
Jan ’20
On WatchOS, is it possible to classify gestures in real time in the background?
I am thinking of developing a watchOS app that will record someones audio, whenever they raise their wrist to their face (so as to classify coughs and sneezes and help detect flu outbreaks). Of course, this is possible first-party (Siri's raise to wake & hand wash detection), but I am wondering if it's possible third-party. I have seen some similar questions asked on StackExchange, but they all seem to be suggesting that starting a Watch Kit Workout Session would do the trick. However, this presents a UI and precludes the user from using the app as normal. Moreover, if it is possible to classify gestures in the background, is it possible to subsequently record the audio or would that require the app to be opened? My sense upon researching this is that it's probably not possible, but I'm really excited about this idea and I know there's lots of stuff out there with Research Kit that I'm not aware of, so I wanted to ask.
2
0
843
Oct ’20