0

Expecting:

  • conditionally add // ==UserScript== comments or
  • other ways to use this script injected into conetnt only if firefox and Why?

Firefox has CSP issues while using Violentmonkey and the script i'm using.

What works: //@inject-into content works but my issue occurs when cross compatibility of my script around Tampermonkey & Violentmonkey

Case:

We're looking at a GM API called //@inject-into content which is Violentmonkey API and doesn't exist at this time of writing on Tampermonkey. So,in order to allow //@inject-into content to exist on script, if/else conditions are met. Again i just need my script to get working with Firefox CSP

// ==UserScript==
// @name        com-hCaptcha Captcha Solver by noCaptchaAi
// @inject-into content
// ==/UserScript==

How to achieve something like this? Also i gu

// ==UserScript==
// @name        com-hCaptcha Captcha Solver by noCaptchaAi

if(if_Violentmonkey && if_Firefox){
// @inject-into content
}

// ==/UserScript==
if(if_Violentmonkey && if_Firefox){
// @inject-into content
}
TheMaster
  • 45,448
  • 6
  • 62
  • 85
Advoot
  • 731
  • 6
  • 5
  • 1
    There's no way to declare injection target conditionally. What specific problems do you have if you use this mode? There might be workarounds for each one. – wOxxOm Dec 08 '22 at 19:53

0 Answers0