Coder Social home page Coder Social logo

Comments (5)

makyen avatar makyen commented on August 19, 2024

The userscript you're wanting to use is, currently, incompatible with Greasemonkey 4.X (i.e., Greasemonkey 4.X is the incompatibility, not Firefox). While this particular issue is that the userscript isn't taking into account the more restrictive security context in which Greasemonkey runs userscripts, there are many compatibility issues with running userscripts under Greasemonkey 4.X, due to the Greasemonkey developers intentionally breaking compatibility in the 4.X versions with earlier versions of Greasemonkey. IIRC, I found that about 75% of the userscripts I use for Stack Exchange are not compatible with Greasemonkey 4.x.

I used to strongly recommend people use Greasemonkey 3.X, due to better security. Unfortunately, there are just too many userscripts which are not compatible with Greasemonkey 4.X, so I recommend against using it (and Firefox dropped support for Greasemonkey 3.X a couple years ago), unless you really want some of the remaining added security, and are willing to deal with a large number of userscripts not working without changes, potentially major changes. From the point of view of not running into major and consistent compatibility issues, I recommend using either Tampermonkey or Violentmonkey.

from se-userscripts.

bbrk24 avatar bbrk24 commented on August 19, 2024

Unfortunately, there are just too many userscripts which are not compatible with Greasemonkey 4.X, so I recommend against using it (and Firefox dropped support for Greasemonkey 3.X a couple years ago)

So 4.x is broken and 3.x is unsupported? That's unfortunate.

from se-userscripts.

makyen avatar makyen commented on August 19, 2024

Basically, yes. The move from 3.X to 4.X was forced by Firefox switching to allowing only WebExtensions-based browser extensions, so that's on Firefox/Mozilla. That 4.X has a variety of breaking-incompatibilities with 3.X (and all other userscript managers) was a choice on the part of the Greasemonkey developers. It's possible to be compatible (as demonstrated by all the other userscript managers), it's just not as easy and would add some overhead processing/memory.

The issue this particular userscript has with being in a different security context is an issue it would have had in Greasemonkey 3.X too, so it wouldn't have worked there either. Basically, this userscript assumes that it's running in the page context, specifically that it has access to the $ function from jQuery that's loaded into the page by SE. That assumption is something which a lot of userscript writers make, including myself sometimes, because it can make things quite a bit easier. In addition, that the userscript might be running in a different context is something which most JavaScript programmers really aren't used to and don't think about. Tampermonkey and Violentmonkey do quite a bit to try to allow things to "just work", even though that's at the expense of some of the security which is provided by running the userscript in a different context, which is what Greasemonkey (now) does in 4.X (and did in 3.X and earlier).

from se-userscripts.

tuywassam avatar tuywassam commented on August 19, 2024

https://github.com/Glorfindel83//Stack

from se-userscripts.

tuywassam avatar tuywassam commented on August 19, 2024

Script error in [Greasemonkey script https://github.com/Glorfindel83//Stack Exchange Rejoin Favorite Chatrooms; version 0.1.1]:
ReferenceError: $ is not defined

user-script:https://github.com/Glorfindel83//Stack Exchange Rejoin Favorite Chatrooms:144

from se-userscripts.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.