Added more intelligent link (lack of) recognition

This commit is contained in:
David Coallier 2011-02-06 18:58:53 +00:00
parent a8bfd54c0d
commit 0db8e99cd3
2 changed files with 9 additions and 3 deletions

View File

@ -78,8 +78,8 @@ var run = function() {
since: since
};
if (data.user.blog !== undefined) {
view.blog = addHttp + data.user.blog;
if (data.user.blog !== undefined && data.user.blog !== null) {
view.blog = addHttp + data.user.blog;
}
$.ajax({

View File

@ -32,7 +32,7 @@
{{/location}}
with {{repos}} public {{plural}}. I've been using github.com since {{since}}
{{#blog}}
and sometimes I blog at <a href="http://{{blog}}" title="my blog">{{blog}}</a>
and sometimes I blog at <a href="" id="myblog" title="my blog">{{blog}}</a>
{{/blog}}
</p>
</div>
@ -84,3 +84,9 @@
</div><!--// doc -->
<script type="text/javascript">
$(document).ready(function() {
var blog = $('#myblog').html();
$('#myblog').attr('href', blog);
});
</script>