[Greasemonkey] Quickgallery script broken in gm 0.6.3 in FF1.5b2
Stefan Berndtsson
stefan at nocrew.org
Wed Nov 2 12:02:43 EST 2005
Mattias Hällkvist <mattiasha at gmail.com> writes:
> The 0.6.3 update fixed alot of borken scripts in 0.6.2 but not one of my
> favorite scripts: Quickgallery. The script can be found here:
> http://www.vandenoever.info/software/greasemonkey/quickgallery.user.js
>
> If you have time, could you take a look at it and see if it's easily
> fixable.
Applying this patch seems to fix it:
--- /tmp/quickgallery.user.js.orig 2005-11-02 11:43:03.736969112 +0100
+++ quickgallery.user.js 2005-11-02 12:01:23.729785048 +0100
@@ -131,16 +131,16 @@
}
// make the images clickable
var setToggle = function(img, bigimg) {
- img.onclick = function(event) {
+ img.addEventListener("click", function(event) {
setVisible(bigimg, event);
// return 'false' so that the hyperlink is not followed
return false;
- }
- bigimg.onclick = function(event) {
+ }, true);
+ bigimg.addEventListener("click", function(event) {
setInvisible(bigimg, event);
i = imgs.length;
return false;
- }
+ }, true);
}
// handle user clicks: go one further
var forward = function(event) {
@@ -228,7 +228,7 @@
i = imgs.length;
if (i > 1) {
// handle arrow keys an 'z' for navigation
- document.onkeypress = keyHandler;
+ document.addEventListener("keypress", keyHandler, true);
// show a note with instructions
var div = document.createElement('div');
More information about the Greasemonkey
mailing list