Skip to content

Commit 8ad3efd

Browse files
committed
Fix error with api.dom.compose.send()
This event would also trigger all custom compose-buttons added through api.tools.add_compose_button()-function. This closes #480.
1 parent 5e4f861 commit 8ad3efd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

22
# Changelog
33

4+
## Version 0.7.3
5+
6+
- Fix error with `api.dom.compose.send()` introduced in 0.7.2.
7+
48
## Version 0.7.2
59

610
- Fix look of `api.tools.add_compose_button()` in new Gmail.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gmail-js",
3-
"version": "0.7.2",
3+
"version": "0.7.3",
44
"description": "JavaScript API for Gmail (useful for chrome extensions)",
55
"main": "src/gmail.js",
66
"types": "src/gmail.d.ts",

src/gmail.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,7 +2662,7 @@ var Gmail = function(localJQuery) {
26622662

26632663
api.tools.add_compose_button = function(composeWindow, content_html, onClickFunction, styleClass) {
26642664
var button = $(document.createElement("div"));
2665-
var buttonClasses = "T-I J-J5-Ji aoO T-I-atl L3 ";
2665+
var buttonClasses = "T-I J-J5-Ji aoO T-I-atl L3 gmailjscomposebutton ";
26662666
if(styleClass !== undefined){
26672667
buttonClasses += styleClass;
26682668
}
@@ -3011,7 +3011,7 @@ var Gmail = function(localJQuery) {
30113011
reply: "M9",
30123012
forward: "M9",
30133013
from: "input[name=from]",
3014-
send_button: "div.T-I.T-I-atl"
3014+
send_button: "div.T-I.T-I-atl:not(.gmailjscomposebutton)"
30153015
};
30163016
if(!config[lookup]) api.tools.error("Dom lookup failed. Unable to find config for \"" + lookup + "\"",config,lookup,config[lookup]);
30173017
return this.$el.find(config[lookup]);

0 commit comments

Comments
 (0)