Permalink
Browse files

look for '://' to determine if it's a link

  • Loading branch information...
1 parent 5cd3ba9 commit ea61ff0146ff2a1f54f19535d5c7347eb647e6fa Christian Brassat committed Jul 12, 2012
Showing with 5 additions and 4 deletions.
  1. +1 −0 index.html
  2. +4 −4 js/script.js
View
@@ -62,6 +62,7 @@
Title 2
http://pixelfuckers.org || PF
+chrome://bookmarks/ || Chrome bookmarks
Coconut
http://newgrounds.com || NG
View
@@ -90,10 +90,10 @@ $(document).ready(function() {
if(!line)
continue;
- /* If it doesn't start with http, *\
- |* it must be a seperator *|
- \*==================================*/
- if(line.substr(0,4) != 'http') {
+ /* If it doesn't contain "://", *\
+ |* it's not a URL *|
+ \*================================*/
+ if(/:\/\//.test(line) != true) {
if(count > 1)
html = html + '</div>';
html = html + '<div class="block"><h1>' + line + '</h1><ul>';

0 comments on commit ea61ff0

Please sign in to comment.