Skip to content

Commit 6b35c3f

Browse files
committed
Add function to show errors and information.
Just like gmail does
1 parent 6e05b15 commit 6b35c3f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/gmail.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,24 @@ var Gmail = function() {
846846
}
847847

848848

849+
api.tools.infobox = function(message, time){
850+
var top = $(".b8.UC");
851+
if(top.length > 0){
852+
var info = top.find(".vh");
853+
info.text(message);
854+
if(tyoeof time !== "undefined"){
855+
top.css('visibility', 'visible').fadeTo(time, 0, function(){
856+
$(this).css("visibility", "hidden");
857+
$(this).css("opacity", "");
858+
});
859+
}
860+
else{
861+
top.css('visibility', 'visible');
862+
}
863+
}
864+
};
865+
}
866+
849867
api.tools.parse_email_data = function(email_data) {
850868
var data = {};
851869
var threads = {}

0 commit comments

Comments
 (0)