|
Two months ago I was able to run AppleScript from Automator that injects JavaScript into a series of YouTube edit pages on Safari. Now I am getting "Content Security Policy" errors which prevent additional further scripts to run:
At first I thought I was required to add additional information to a script tag that includes a nonce, but now it seems apparent just because any error is happening that stops the script from running any further. I tried running my AppleScript to inject JavaScript on an older version of Safari (9), but I am still somehow getting those same errors plus additional ones. Sorry for making a new thread. It's critical for me to run these scripts as soon as possible. How can I prevent these errors from occurring so I can run my scripts?
|
# ? Mar 27, 2018 17:23 |
|
|
# ? May 3, 2024 10:54 |
|
i saw your post last night but couldn't really figure out what it was doing. can you post a reduced example?
|
# ? Mar 27, 2018 17:32 |
|
YO MAMA HEAD posted:i saw your post last night but couldn't really figure out what it was doing. can you post a reduced example? Sure, although my script isn't causing the error. The errors are already there when the page loads without my script. code:
I was thinking about moving onto Chrome, but Chrome gives me this error twice. Not sure if it will prevent me from running my JS yet: O7WUW1q-Kpg?autohide…QhGe8O9p-zpesvoTn:1 Error parsing header X-XSS-Protection: 1; mode=block; report=https://www.google.com/appserve/security-bugs/log/youtube: insecure reporting URL for secure page at character position 22. The default protections will be applied.
|
# ? Mar 27, 2018 17:36 |
|
i see the CSP errors, but the script runs as expected for me. my automator script:code:
|
# ? Mar 27, 2018 17:54 |
|
Holy crap, that works. It must be how I'm handling my document's text values of strings, but as of now I have no clue what could be different. I'm going to see my backups and check.
|
# ? Mar 27, 2018 18:12 |
|
Thank you. Found out it was my text file with extra single quotes I thought I escaped. So this has nothing to do with those security errors. I know you’re not supposed to close threads, but mods, feel free to do whatever because I don’t think this will help anyone else.
|
# ? Mar 27, 2018 20:02 |
|
|
# ? May 3, 2024 10:54 |
|
glad it worked man
|
# ? Mar 28, 2018 01:50 |