Bug Tracker

Modify

Ticket #5519 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

Problem using data() in GreaseMonkey script

Reported by: kipthegreat Owned by:
Priority: minor Milestone: 1.4
Component: data Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

I'm not 100% sure if this is a problem with jQuery or GreaseMonkey. When I am using jQuery's data() function from a GreaseMonkey script, it does not find the data. (GreaseMonkey is a Firefox extension that allows the user to run arbitrary Javascript when a given page is loaded.)

I've attached a greasemonkey script (gmscript.js), and an HTML page to test the problem on (gmtarget.html). I've also attached a local-only HTML file, which has identical jQuery code defined in the HTML file (local-only.html), so no GreaseMonkey script is involved.

In both cases, I store 'abc' on a text area, then add a listener to the text area that will alert() with the data stored on that text area when the user hits spacebar. It works as expected in the local-only version, but not in the GreaseMonkey script.

Like I said, this could be a GreaseMonkey problem, but I don't know for sure.

Attachments

gmscript.js Download (610 bytes) - added by kipthegreat 4 years ago.
GreaseMonkey script
gmtarget.html Download (201 bytes) - added by kipthegreat 4 years ago.
Page that GreaseMonkey script should be enabled for
local-only.html Download (526 bytes) - added by kipthegreat 4 years ago.
Page using only locally-defined javascript, works OK.

Change History

Changed 4 years ago by kipthegreat

GreaseMonkey script

Changed 4 years ago by kipthegreat

Page that GreaseMonkey script should be enabled for

Changed 4 years ago by kipthegreat

Page using only locally-defined javascript, works OK.

comment:1 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

If you can narrow it down to a jQuery problem, reopen this with a clear description of the bug. Maybe someone in a jQuery or Greasemonkey forum could help isolate it.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.