diff options
author | Wu Cheng-Han | 2016-10-10 20:48:56 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-10-10 20:48:56 +0800 |
commit | b54b3cbe6957b46d3b689b0108b0b767b7da261b (patch) | |
tree | 70515cf72ccc396dfdb8776a396ca0bfce4bff4e /public | |
parent | e4b40d11a20c4d6ab0676f7fe82a2421f8bf0800 (diff) |
Add more comments in the code and remove unused code file
Diffstat (limited to '')
-rw-r--r-- | public/js/unused.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/public/js/unused.js b/public/js/unused.js deleted file mode 100644 index 4ff5b280..00000000 --- a/public/js/unused.js +++ /dev/null @@ -1,45 +0,0 @@ - - //parse Youtube - result.find(".youtube").each(function (key, value) { - if (!$(value).attr('videoid')) return; - setSizebyAttr(this, this); - var icon = '<i class="icon fa fa-youtube-play fa-5x"></i>'; - $(this).append(icon); - var videoid = $(value).attr('videoid'); - var thumbnail_src = '//img.youtube.com/vi/' + videoid + '/hqdefault.jpg'; - $(value).css('background-image', 'url(' + thumbnail_src + ')'); - $(this).click(function () { - imgPlayiframe(this, '//www.youtube.com/embed/'); - }); - }); - //parse vimeo - result.find(".vimeo").each(function (key, value) { - if (!$(value).attr('videoid')) return; - setSizebyAttr(this, this); - var icon = '<i class="icon fa fa-vimeo-square fa-5x"></i>'; - $(this).append(icon); - var videoid = $(value).attr('videoid'); - $.ajax({ - type: 'GET', - url: 'http://vimeo.com/api/v2/video/' + videoid + '.json', - jsonp: 'callback', - dataType: 'jsonp', - success: function (data) { - var thumbnail_src = data[0].thumbnail_large; - $(value).css('background-image', 'url(' + thumbnail_src + ')'); - } - }); - $(this).click(function () { - imgPlayiframe(this, '//player.vimeo.com/video/'); - }); - }); - //todo list - var lis = result[0].getElementsByTagName('li'); - for (var i = 0; i < lis.length; i++) { - var html = lis[i].innerHTML; - if (/^\s*\[[x ]\]\s*/.test(html)) { - lis[i].innerHTML = html.replace(/^\s*\[ \]\s*/, '<input type="checkbox" class="task-list-item-checkbox" disabled>') - .replace(/^\s*\[x\]\s*/, '<input type="checkbox" class="task-list-item-checkbox" checked disabled>'); - lis[i].setAttribute('class', 'task-list-item'); - } - }
\ No newline at end of file |