拝啓 UserScript作者の皆様におかれましてはいかがお過ごしでしょうか。 わたしは以前書いたUserScriptが、サイト側のCSP導入によって <style> の挿入だけ動かなくなっていました。 今日はその話。 いつものやつ document.head.insertAdjacentHTML('beforeend', ` <style> #foo { display: none } #bar { cursor: pointer } </style> `); …このシンタックスハイライト、Template literal 認識してなくない? CSPでunsafe-inlineが許可されなくなると、こんな感じで蹴られるようになる。 Refused to apply inline style because it violates the following Content Securit