Fuck protocols.

This commit is contained in:
Zixaphir 2014-03-22 12:32:06 -07:00
parent 7aafc89cb8
commit 5e21c32a4a
4 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.9.7 - 2014-03-21
* appchan x - Version 2.9.7 - 2014-03-22
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

View File

@ -25,7 +25,7 @@
// ==/UserScript==
/*
* appchan x - Version 2.9.7 - 2014-03-21
* appchan x - Version 2.9.7 - 2014-03-22
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -8224,7 +8224,7 @@
range.setEnd(range.endContainer, range.endOffset - i);
}
}
if (!/(https?|mailto|git|magnet|ftp|irc):/.test(text)) {
if (!/(mailto:|.+:\/\/)/.test(text)) {
text = (/@/.test(text) ? 'mailto:' : 'http://') + text;
}
a = $.el('a', {

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* appchan x - Version 2.9.7 - 2014-03-21
* appchan x - Version 2.9.7 - 2014-03-22
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -8275,7 +8275,7 @@
range.setEnd(range.endContainer, range.endOffset - i);
}
}
if (!/(https?|mailto|git|magnet|ftp|irc):/.test(text)) {
if (!/(mailto:|.+:\/\/)/.test(text)) {
text = (/@/.test(text) ? 'mailto:' : 'http://') + text;
}
a = $.el('a', {

View File

@ -116,7 +116,7 @@ Linkify =
range.setEnd range.endContainer, range.endOffset - i
# Make our link 'valid' if it is formatted incorrectly.
unless /(https?|mailto|git|magnet|ftp|irc):/.test text
unless /(mailto:|.+:\/\/)/.test text
text = (
if /@/.test text
'mailto:'