jrschumacher / Gmail-StrikeThrough

Google Chrome extension for strikethrough within Gmail including Google Apps
9 stars 3 forks source link

deprecated "DOMSubtreeModified" event causes problems #5

Open rnevet opened 12 years ago

rnevet commented 12 years ago

The script wasn't adding the "Strike" button on chrome 18.0.1025.162 m I checked and this line is basically doing nothing, this.canvas_frame_document.addEventListener("DOMSubtreeModified", this.pingCanvas, false);

The event DOMSubtreeModified is never called. Reading a bit I found that it is deprecated.

rnevet commented 12 years ago

I fixed it locally by adding this to text script after the gmailStrikeThroughButton.loadCanvas(); command. $.ready( function() { gmailStrikeThroughButton.pingCanvas();});

cjraven commented 12 years ago

I took a different direction & basically knocked one outta the park.

  1. Installed tampermonkey
  2. Installed this; http://userscripts.org/scripts/show/57725

Badda bing. That bad boy is now working!!

jrschumacher commented 12 years ago

@rnevet I'll add that to the script

cjraven commented 12 years ago

For what it's worth, it works in Google Apps (all themes I've tried at least) ==AND== all themes in gmail.

For posterity (those who are reading this) At first I didn't know if that greasemonkey script WAS the strikethrough itself, or the "cosmetic overlay" to the extension, but removing the extension disabled strikethrough, so I've come to conclude the script was indeed was the overlay. Can someone with more knowledge than I please confirm this?

rnevet commented 12 years ago

@jrschumacher,

I would consider removing this line, as I wrote the event DOMSubtreeModified is deprecated. this.canvas_frame_document.addEventListener("DOMSubtreeModified", this.pingCanvas, false); I don't know what would be the effect of having both on a browser that supports the DOMSubtreeModified event, needs more testing.

Anyway, thanks for the nice extension. Very much appreciated.

cjraven commented 12 years ago

Well if GMail strikethrough goes through an update and the greasemonkey script conflicts or anything blows up, I'll remove it (greasemonkey script) & report back with the results.

Any idea when the update will hit?

OlderBudWeiser commented 12 years ago

Thanks to @rnevet & @cjraven for digging into this.

@jrschumacher

Hoping for an update soon, even one that just re-enables the old functionality, without taking it to the next level with a re-worked UI that also supports other supscript & subscript with a single button.

And yes, let me join in thanking you for a great extension.

jrschumacher commented 12 years ago

I'll release something this afternoon.

On May 8, 2012, at 10:30, OlderBudWeiserreply@reply.github.com wrote:

Thanks to @rnevet & @cjraven for digging into this.

@jrschumacher

Hoping for an update soon, even one that just re-enables the old functionality, without taking it to the next level with a re-worked UI that also supports other supscript & subscript with a single button.

And yes, let me join in thanking you for a great extension.


Reply to this email directly or view it on GitHub: https://github.com/jrschumacher/Gmail-StrikeThrough/issues/5#issuecomment-5577448

jrschumacher commented 12 years ago

@rnevet I've been working on the issue, but I don't see how the jquery ready statement works. The document is ready way before the richtext editor is finished loading. Do you want to send a pull request with the fix?

rnevet commented 12 years ago

@jrschumacher I'm sorry, I edited the js file a week ago and I don't remember exactly what I did,.

This is my working version: https://gist.github.com/2644320 so you can compare.