Email link Mobile fix

This commit is contained in:
Mahdi Dibaiee 2014-02-07 18:18:26 +03:30
parent eaf4cba87d
commit 09995efb64
2 changed files with 13 additions and 1 deletions

Binary file not shown.

View File

@ -8,7 +8,7 @@ $('*').click(function(e) {
e.preventDefault(); e.preventDefault();
}) })
$('a[href^="http"]').on('tap', function(e) { $('a[href^="http"]').tap(function(e) {
e.preventDefault(); e.preventDefault();
var href = $(this).attr('href'); var href = $(this).attr('href');
var view = new MozActivity({ var view = new MozActivity({
@ -20,6 +20,18 @@ $('a[href^="http"]').on('tap', function(e) {
}) })
}) })
$('a[href^="mailto"]').tap(function(e) {
e.preventDefault();
var mail = /mailto:(.*)/.exec($(this).attr('href'))[1];
var mail = new MozActivity({
name: 'new',
data: {
type: 'mail',
url: mail
}
})
})
window.save = function() { window.save = function() {
switch(save.background) { switch(save.background) {
case 'white': { case 'white': {