gulp
This commit is contained in:
parent
c7e2afb0c0
commit
40d430c065
7
dist/mailgo.js
vendored
7
dist/mailgo.js
vendored
@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var V = "0.4.3";
|
var V = "0.4.4";
|
||||||
var MAILTO = "mailto:"; // mailgo style
|
var MAILTO = "mailto:"; // mailgo style
|
||||||
|
|
||||||
var mailgoCSS = document.createElement("link");
|
var mailgoCSS = document.createElement("link");
|
||||||
@ -261,7 +261,7 @@ var actions = {
|
|||||||
* function to check if an element is mailgo-enabled or not referencing to the old
|
* function to check if an element is mailgo-enabled or not referencing to the old
|
||||||
* document.querySelectorAll(
|
* document.querySelectorAll(
|
||||||
* 'a[href^="mailto:" i]:not(.no-mailgo), a[href="#mailgo"], a.mailgo'
|
* 'a[href^="mailto:" i]:not(.no-mailgo), a[href="#mailgo"], a.mailgo'
|
||||||
* ); and the new a[mailgo]
|
* );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var mailgoCheckRender = function mailgoCheckRender(event) {
|
var mailgoCheckRender = function mailgoCheckRender(event) {
|
||||||
@ -273,8 +273,7 @@ var mailgoCheckRender = function mailgoCheckRender(event) {
|
|||||||
if ( // first case: it is an <a> element with "mailto:..." in href and no no-mailgo in classList
|
if ( // first case: it is an <a> element with "mailto:..." in href and no no-mailgo in classList
|
||||||
e.href && e.href.toLowerCase().startsWith(MAILTO) && !e.classList.contains("no-mailgo") || // second case: the href=#mailgo
|
e.href && e.href.toLowerCase().startsWith(MAILTO) && !e.classList.contains("no-mailgo") || // second case: the href=#mailgo
|
||||||
e.href && e.getAttribute("href").toLowerCase() === "#mailgo" || // third case: the classList contains mailgo
|
e.href && e.getAttribute("href").toLowerCase() === "#mailgo" || // third case: the classList contains mailgo
|
||||||
e.classList.contains("mailgo") || // fourth case: exists the attribute mailgo in the <a> element
|
e.classList.contains("mailgo")) {
|
||||||
!!e.getAttribute("mailgo")) {
|
|
||||||
// stop the normal execution of the element click
|
// stop the normal execution of the element click
|
||||||
event.preventDefault(); // render mailgo
|
event.preventDefault(); // render mailgo
|
||||||
|
|
||||||
|
2
dist/mailgo.min.js
vendored
2
dist/mailgo.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user