Skip to content

Commit fb152e3

Browse files
committed
New changes.
1 parent bad2821 commit fb152e3

File tree

11 files changed

+49
-10
lines changed

11 files changed

+49
-10
lines changed

Mailify/component.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function mailify(str) {
2+
return str.replace(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/g, function(m, b, c) {
3+
var len = m.length;
4+
var l = m.substring(len - 1);
5+
if (l === '.' || l === ',')
6+
m = m.substring(0, len - 1);
7+
else
8+
l = '';
9+
return '<a href="mailto:' + m + '">' + m + '</a>' + l;
10+
});
11+
}

Mailify/component.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"datecreated": "2017-01-18T08:10:00.000Z",
3+
"dateupdated": null,
4+
"name": "Mailify",
5+
"tags": [
6+
"email"
7+
],
8+
"color": "transparent",
9+
"version": 1,
10+
"responsive": false,
11+
"picture": "picture.jpg",
12+
"dependencies": "",
13+
"author": "Peter Širka",
14+
"email": "[email protected]",
15+
"license": "MIT"
16+
}

Mailify/example.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div id="content">Please contact us [email protected] or [email protected].</div>
2+
<script>
3+
var el = document.getElementById('content');
4+
el.innerHTML = mailify(el.innerHTML);
5+
</script>

Mailify/picture.jpg

9.15 KB
Loading

Mailify/readme.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## URLify
2+
3+
4+
5+
### Author
6+
7+
- Peter Širka <[email protected]>
8+
- License: MIT

Smilefy/component.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ function smilefy(text) {
22
var db = { ':-)': 1, ':)': 1, ';)': 8, ':D': 0, '8)': 5, ':((': 7, ':(': 3, ':|': 2, ':P': 6, ':O': 4, ':*': 9, '+1': 10, '1': 11, '\/': 12 };
33
return text.replace(/(\-1|[:;8O\-)DP(|\*]|\+1){1,3}/g, function(match) {
44
var smile = db[match.replace('-', '')];
5-
if (smile == null)
6-
return match;
7-
return '<span class="smiles smiles-' + smile + '"></span>';
5+
return smile === undefined ? match : '<i class="smiles smiles-' + smile + '"></i>';
86
});
97
}

Smilefy/component.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"datecreated": "2016-02-22T13:27:34.652Z",
3-
"dateupdated": "2016-09-05T21:48:00.000Z",
3+
"dateupdated": "2017-01-18T08:06:00.000Z",
44
"name": "Smilefy",
55
"tags": [
66
"function",
77
"smile",
88
"smiles"
99
],
1010
"color": "transparent",
11-
"version": 2,
11+
"version": 3,
1212
"responsive": false,
1313
"picture": "picture.jpg",
1414
"dependencies": "",

URLify/component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ function urlify(str) {
88
l = '';
99
url = c === 'www.' ? 'http://' + url : url;
1010
return '<a href="' + url + '" target="_blank">' + url + '</a>' + l;
11-
}) ;
11+
});
1212
}

URLify/component.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"datecreated": "2016-02-22T13:39:43.589Z",
3-
"dateupdated": "2016-08-29T17:50:00.000Z",
3+
"dateupdated": "2017-01-18T08:07:00.000Z",
44
"name": "URLify",
55
"tags": [
66
"url"
77
],
88
"color": "transparent",
9-
"version": 2,
9+
"version": 3,
1010
"responsive": false,
1111
"picture": "picture.jpg",
1212
"dependencies": "",

components.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@
9393
"j-Binder",
9494
"Tangular-Time",
9595
"j-reCAPTCHA",
96-
"j-Clipboard"
96+
"j-Clipboard",
97+
"Mailify"
9798
]

0 commit comments

Comments
 (0)