Bug Tracker

Opened 13 years ago

Closed 13 years ago

#5519 closed bug (invalid)

Problem using data() in GreaseMonkey script

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

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 (3)

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

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by kipthegreat

Attachment: gmscript.js added

GreaseMonkey script

Changed 13 years ago by kipthegreat

Attachment: gmtarget.html added

Page that GreaseMonkey script should be enabled for

Changed 13 years ago by kipthegreat

Attachment: local-only.html added

Page using only locally-defined javascript, works OK.

comment:1 Changed 13 years ago by dmethvin

Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.