Jump to content

User Javascript Context trouble, chromium/firefox greasemonkey


Skitty
 Share

Recommended Posts

I don't know where else to ask, and I've been here more than other places so I assume maybe there is someone who's experienced an issue I just stumbled into while developing a user javascript file..

I created a simple extension for a website, rather large actually.. I was testing it on Firefox during its development using greasemonkey and everything worked well, I could access variables created by scripts delivered by the site in the context of the window and listen to fired off events created by another jquery script in the window, but when I attempted to use it in chromium by dragging dropping file called "script.user.js" into extensions window, somehow chromium seems to not allow the script to interact with the variables of the other script, I cannot listen to events or use the existing jquery that is in the sites main scripts, I have to manually include my own copy of jquery,

chromium somehow does it so that the scritp has its own context to the window and does not allow it to interact with the context of the other script... This is strange. Greasemonkey under firefox does not do this though and seems it is more lenient on permissions...

This has complicated development of the script to keep it comparable on both browsers. Does anyone know what can be done to make chromium allow the script to "see"  and interact with the other scripts that are delivered server side? I'm not sure if this is a good explanation, I hope you can understand.

tl;dr somehow chromium does not let a userscript file access variables outside of the script file in a webpage while firefox does, any fix to this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...