diff options
author | Wu Cheng-Han | 2016-07-13 10:40:34 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-07-13 10:40:34 +0800 |
commit | cb75424f8ea8c164c3762136b6c38eedf189f66a (patch) | |
tree | 89dfdb4dabeb1c3c1fb0fe539d72f2e8adcb65b3 | |
parent | 44e2dab9ee6febdabd306d7a7e24e50d133bfb26 (diff) |
Update gist-embed to 2.5 and using bower to manage it
Diffstat (limited to '')
-rw-r--r-- | bower.json | 3 | ||||
-rw-r--r-- | public/vendor/gist-embed.min.js | 1 | ||||
-rw-r--r-- | public/views/foot.ejs | 2 | ||||
-rw-r--r-- | public/views/html.hbs | 2 | ||||
-rw-r--r-- | public/views/pretty.ejs | 2 | ||||
-rw-r--r-- | public/views/slide.ejs | 2 |
6 files changed, 6 insertions, 6 deletions
@@ -56,7 +56,8 @@ "store-js": "store.js#^1.3.20", "string": "^3.3.1", "visibilityjs": "^1.2.3", - "pdfobject": "pdfobject2#*" + "pdfobject": "pdfobject2#*", + "gist-embed": "*" }, "resolutions": { "jquery": "~2.2.4" diff --git a/public/vendor/gist-embed.min.js b/public/vendor/gist-embed.min.js deleted file mode 100644 index 880adc7e..00000000 --- a/public/vendor/gist-embed.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"use strict";function e(t){var e,i,s=[];if("number"==typeof t)s.push(t);else{i=t.split(",");for(var n=0;n<i.length;n++)if(e=i[n].split("-"),2===e.length)for(var a=parseInt(e[0],10);a<=e[1];a++)s.push(a);else 1===e.length&&s.push(parseInt(e[0],10))}return s}t.fn.gist=function(i){return this.each(function(){var s,n,a,l,o,r,d,h,g,f,c=t(this),u={};return c.css("display","block"),s=c.data("gist-id")||"",a=c.data("gist-file"),d=c.data("gist-hide-footer")===!0,h=c.data("gist-hide-line-numbers")===!0,l=c.data("gist-line"),r=c.data("gist-highlight-line"),f=c.data("gist-show-spinner")===!0,g=!f&&(void 0===c.data("gist-show-loading")||c.data("gist-show-loading")),a&&(u.file=a),!!s&&(n="https://gist.github.com/"+s+".json",o="Loading gist "+n+(u.file?", file: "+u.file:"")+"...",g&&c.html(o),f&&c.html('<img style="display:block;margin-left:auto;margin-right:auto" alt="'+o+'" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif">'),void t.ajax({url:n,data:u,dataType:"jsonp",timeout:1e4,success:function(i){var s,a,o,g,f;i&&i.div?(i.stylesheet&&(0===i.stylesheet.indexOf("<link")?i.stylesheet=i.stylesheet.replace(/\\/g,"").match(/href=\"([^\s]*)\"/)[1]:0!==i.stylesheet.indexOf("http")&&(0!==i.stylesheet.indexOf("/")&&(i.stylesheet="/"+i.stylesheet),i.stylesheet="https://gist.github.com"+i.stylesheet)),i.stylesheet&&0===t('link[href="'+i.stylesheet+'"]').length&&(s=document.createElement("link"),a=document.getElementsByTagName("head")[0],s.type="text/css",s.rel="stylesheet",s.href=i.stylesheet,a.insertBefore(s,a.firstChild)),f=t(i.div),f.removeAttr("id"),c.html("").append(f),r&&(g=e(r),f.find("td.line-data").css({width:"100%"}),f.find(".js-file-line").each(function(e){t.inArray(e+1,g)!==-1&&t(this).css({"background-color":"rgb(255, 255, 204)"})})),l&&(o=e(l),f.find(".js-file-line").each(function(e){t.inArray(e+1,o)===-1&&t(this).parent().remove()})),d&&(f.find(".gist-meta").remove(),f.find(".gist-data").css("border-bottom","0px"),f.find(".gist-file").css("border-bottom","1px solid #ddd")),h&&f.find(".js-line-number").remove()):c.html("Failed loading gist "+n)},error:function(t,e){c.html("Failed loading gist "+n+": "+e)},complete:function(){i&&"function"==typeof i&&i()}}))})},t(function(){t("[data-gist-id]").gist()})}(jQuery);
\ No newline at end of file diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 4b8a566f..67018c21 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -45,7 +45,7 @@ <script src="<%- url %>/vendor/markdown-it-mathjax.js" defer></script> <script src="<%- url %>/vendor/markdown-it-regexp.js" defer></script> <script src="<%- url %>/vendor/markdown-it-imsize.js" defer></script> -<script src="<%- url %>/vendor/gist-embed.min.js" defer></script> +<script src="<%- url %>/vendor/gist-embed/gist-embed.min.js" defer></script> <script src="<%- url %>/vendor/lz-string/libs/lz-string.min.js" defer></script> <script src="<%- url %>/vendor/xss/dist/xss.min.js" defer></script> <script src="<%- url %>/vendor/string/dist/string.min.js" defer></script> diff --git a/public/views/html.hbs b/public/views/html.hbs index f6e57497..e9521e6d 100644 --- a/public/views/html.hbs +++ b/public/views/html.hbs @@ -49,7 +49,7 @@ </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" defer></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.4/gist-embed.min.js" defer></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.5/gist-embed.min.js" defer></script> <script> var markdown = $(".markdown-body"); //smooth all hash trigger scrolling diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index 7a3b96b7..bf4d7d47 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -106,7 +106,7 @@ <script src="<%- url %>/vendor/markdown-it-mathjax.js" defer></script> <script src="<%- url %>/vendor/markdown-it-regexp.js" defer></script> <script src="<%- url %>/vendor/markdown-it-imsize.js" defer></script> -<script src="<%- url %>/vendor/gist-embed.min.js" defer></script> +<script src="<%- url %>/vendor/gist-embed/gist-embed.min.js" defer></script> <script src="<%- url %>/vendor/string/dist/string.min.js" defer></script> <script src="<%- url %>/vendor/highlightjs/highlight.pack.min.js" defer></script> <script src="<%- url %>/vendor/js-cookie/src/js.cookie.js" defer></script> diff --git a/public/views/slide.ejs b/public/views/slide.ejs index 04d75b5e..5f6f8b0a 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -83,7 +83,7 @@ <script src="<%- url %>/vendor/markdown-it-mathjax.js" defer></script> <script src="<%- url %>/vendor/markdown-it-regexp.js" defer></script> <script src="<%- url %>/vendor/markdown-it-imsize.js" defer></script> - <script src="<%- url %>/vendor/gist-embed.min.js" defer></script> + <script src="<%- url %>/vendor/gist-embed/gist-embed.min.js" defer></script> <script src="<%- url %>/vendor/string/dist/string.min.js" defer></script> <script src="<%- url %>/vendor/highlightjs/highlight.pack.min.js" defer></script> <script src="<%- url %>/vendor/js-cookie/src/js.cookie.js" defer></script> |