From e989276049d6cb3465e9a44e679031bb6667c142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 23 Jul 2017 16:51:24 -0700 Subject: [PATCH 0001/1193] Fixes #29 --- assets/css/main.css | 2 +- assets/css/main.css.map | 2 +- assets/js/app.js | 2 +- assets/scss/main.scss | 2 +- dist/buttons.js | 2 +- test/lib/main.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index b64903fd..abf64e7b 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1,3 +1,3 @@ -html{position:relative;min-height:100%}.header{border-bottom:1px solid #e5e5e5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-brand{cursor:pointer}.octicon-logo-github{color:#000}.logo{line-height:24px;vertical-align:bottom}.logo-colon{color:#afafaf}.logo-buttons{color:#4ea6ea}.main{padding-bottom:57px}.footer{position:absolute;bottom:0;width:100%;height:57px;overflow-y:hidden;border-top:1px solid #e5e5e5}.form-check-label:before{position:absolute;display:block;width:100%;height:100%;content:''}p{overflow-x:scroll;overflow-y:hidden}textarea,textarea[readonly]{font-family:monospace, sans-serif;font-size:11px;cursor:pointer;background-color:#fff !important;resize:none}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor} +html{position:relative;min-height:100%}.header{border-bottom:1px solid #e5e5e5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-brand{cursor:pointer}.octicon-logo-github{color:#000}.logo{line-height:24px;vertical-align:bottom}.logo-colon{color:#afafaf}.logo-buttons{color:#4ea6ea}.main{padding-bottom:57px}.footer{position:absolute;bottom:0;width:100%;height:57px;overflow-y:hidden;border-top:1px solid #e5e5e5}.form-check-label:before{position:absolute;display:block;width:100%;height:100%;content:''}p{overflow-x:auto;overflow-y:hidden}textarea,textarea[readonly]{font-family:monospace, sans-serif;font-size:11px;cursor:pointer;background-color:#fff !important;resize:none}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor} /*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/assets/css/main.css.map b/assets/css/main.css.map index 40739163..153d8e2f 100644 --- a/assets/css/main.css.map +++ b/assets/css/main.css.map @@ -5,5 +5,5 @@ "../scss/main.scss" ], "names": [], - "mappings": "AAAA,AAAA,IAAI,AAAC,CACH,QAAQ,CAAE,QAAQ,CAClB,UAAU,CAAE,IAAI,CACjB,AACD,AAAA,OAAO,AAAC,CACN,aAAa,CAAE,iBAAiB,CAChC,mBAAmB,CAAE,IAAI,CACzB,gBAAgB,CAAE,IAAI,CACtB,eAAe,CAAE,IAAI,CACrB,WAAW,CAAE,IAAI,CAClB,AACD,AAAA,aAAa,AAAC,CACZ,MAAM,CAAE,OAAO,CAChB,AACD,AAAA,oBAAoB,AAAC,CACnB,KAAK,CAAE,IAAI,CACZ,AACD,AAAA,KAAK,AAAC,CACJ,WAAW,CAAE,IAAI,CACjB,cAAc,CAAE,MAAM,CACvB,AACD,AAAA,WAAW,AAAC,CACV,KAAK,CAAE,OAAO,CACf,AACD,AAAA,aAAa,AAAC,CACZ,KAAK,CAAE,OAAO,CACf,AACD,AAAA,KAAK,AAAC,CACJ,cAAc,CAAE,IAAI,CACrB,AACD,AAAA,OAAO,AAAC,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,CAAC,CACT,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,UAAU,CAAE,MAAM,CAClB,UAAU,CAAE,iBAAiB,CAC9B,AACD,AAAA,iBAAiB,AAAA,OAAO,AAAC,CACvB,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,EAAE,CACZ,AACD,AAAA,CAAC,AAAC,CACA,UAAU,CAAE,MAAM,CAClB,UAAU,CAAE,MAAM,CACnB,AACD,AAAA,QAAQ,CACR,AAAA,QAAQ,CAAA,AAAA,QAAC,AAAA,CAAU,CACjB,WAAW,CAAE,qBAAqB,CAClC,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,OAAO,CACf,gBAAgB,CAAE,eAAe,CACjC,MAAM,CAAE,IAAI,CACb,AACD,AAAA,QAAQ,AAAC,CACP,OAAO,CAAE,YAAY,CACrB,cAAc,CAAE,QAAQ,CACxB,IAAI,CAAE,YAAY,CACnB" + "mappings": "AAAA,AAAA,IAAI,AAAC,CACH,QAAQ,CAAE,QAAQ,CAClB,UAAU,CAAE,IAAI,CACjB,AACD,AAAA,OAAO,AAAC,CACN,aAAa,CAAE,iBAAiB,CAChC,mBAAmB,CAAE,IAAI,CACzB,gBAAgB,CAAE,IAAI,CACtB,eAAe,CAAE,IAAI,CACrB,WAAW,CAAE,IAAI,CAClB,AACD,AAAA,aAAa,AAAC,CACZ,MAAM,CAAE,OAAO,CAChB,AACD,AAAA,oBAAoB,AAAC,CACnB,KAAK,CAAE,IAAI,CACZ,AACD,AAAA,KAAK,AAAC,CACJ,WAAW,CAAE,IAAI,CACjB,cAAc,CAAE,MAAM,CACvB,AACD,AAAA,WAAW,AAAC,CACV,KAAK,CAAE,OAAO,CACf,AACD,AAAA,aAAa,AAAC,CACZ,KAAK,CAAE,OAAO,CACf,AACD,AAAA,KAAK,AAAC,CACJ,cAAc,CAAE,IAAI,CACrB,AACD,AAAA,OAAO,AAAC,CACN,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,CAAC,CACT,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,UAAU,CAAE,MAAM,CAClB,UAAU,CAAE,iBAAiB,CAC9B,AACD,AAAA,iBAAiB,AAAA,OAAO,AAAC,CACvB,QAAQ,CAAE,QAAQ,CAClB,OAAO,CAAE,KAAK,CACd,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,EAAE,CACZ,AACD,AAAA,CAAC,AAAC,CACA,UAAU,CAAE,IAAI,CAChB,UAAU,CAAE,MAAM,CACnB,AACD,AAAA,QAAQ,CACR,AAAA,QAAQ,CAAA,AAAA,QAAC,AAAA,CAAU,CACjB,WAAW,CAAE,qBAAqB,CAClC,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,OAAO,CACf,gBAAgB,CAAE,eAAe,CACjC,MAAM,CAAE,IAAI,CACb,AACD,AAAA,QAAQ,AAAC,CACP,OAAO,CAAE,YAAY,CACrB,cAAc,CAAE,QAAQ,CACxB,IAAI,CAAE,YAAY,CACnB" } \ No newline at end of file diff --git a/assets/js/app.js b/assets/js/app.js index 321b1c68..f64e3a8a 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.12.5 +// Generated by CoffeeScript 1.12.7 (function() { var BASEURL, BUTTON_CLASS, GITHUB_API_BASEURL, ICON_CLASS, ICON_CLASS_DEFAULT, Math, UUID, ceilPixel, createElement, createTextNode, decodeURIComponent, defer, document, encodeURIComponent, getFrameContentSize, jsonp, onEvent, onceEvent, onceScriptLoad, parseConfig, parseQueryString, render, renderAll, renderButton, renderCount, renderFrameContent, setFrameSize, stringifyQueryString; diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 614e3522..57a45e96 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -44,7 +44,7 @@ html { content: ''; } p { - overflow-x: scroll; + overflow-x: auto; overflow-y: hidden; } textarea, diff --git a/dist/buttons.js b/dist/buttons.js index 5425028a..db66cc11 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.12.5 +// Generated by CoffeeScript 1.12.7 (function() { var BASEURL, BUTTON_CLASS, GITHUB_API_BASEURL, ICON_CLASS, ICON_CLASS_DEFAULT, Math, UUID, ceilPixel, createElement, createTextNode, decodeURIComponent, defer, document, encodeURIComponent, getFrameContentSize, jsonp, onEvent, onceEvent, onceScriptLoad, parseConfig, parseQueryString, render, renderAll, renderButton, renderCount, renderFrameContent, setFrameSize, stringifyQueryString; diff --git a/test/lib/main.js b/test/lib/main.js index e51883da..38c0fd32 100644 --- a/test/lib/main.js +++ b/test/lib/main.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.12.5 +// Generated by CoffeeScript 1.12.7 (function() { var BASEURL, BUTTON_CLASS, GITHUB_API_BASEURL, ICON_CLASS, ICON_CLASS_DEFAULT, Math, UUID, ceilPixel, createElement, createTextNode, decodeURIComponent, defer, document, encodeURIComponent, getFrameContentSize, jsonp, onEvent, onceEvent, onceScriptLoad, parseConfig, parseQueryString, render, renderAll, renderButton, renderCount, renderFrameContent, setFrameSize, stringifyQueryString; From a8459415ebc9b696e91d34352b5afdb65c0319c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 30 Jul 2017 11:54:46 -0700 Subject: [PATCH 0002/1193] Migrate to CircleCI 2.0 --- .circleci/config.yml | 17 +++++++++++++++++ .npmignore | 1 - circle.yml | 10 ---------- 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..c52ac72b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,17 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/node:latest-browsers + steps: + - checkout + - run: git submodule sync && git submodule update --init + - restore_cache: + key: dependency-cache-{{ checksum "package.json" }} + - run: npm install + - save_cache: + key: dependency-cache-{{ checksum "package.json" }} + paths: + - ./node_modules + - run: npm test + - run: git diff --exit-code diff --git a/.npmignore b/.npmignore index 5d0311b7..6473565e 100644 --- a/.npmignore +++ b/.npmignore @@ -7,5 +7,4 @@ index.html buttons.html favicon.ico Cakefile -circle.yml coffeelint.json diff --git a/circle.yml b/circle.yml deleted file mode 100644 index db8b6aff..00000000 --- a/circle.yml +++ /dev/null @@ -1,10 +0,0 @@ -machine: - node: - version: 6.1.0 -checkout: - post: - - git submodule sync - - git submodule update --init -test: - post: - - git diff --exit-code From 2b52abe51be33f467246753fecc4272cd46a68b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Mon, 31 Jul 2017 16:36:36 -0700 Subject: [PATCH 0003/1193] Update dependencies --- Cakefile | 6 ++---- assets/js/app.min.js | 2 +- assets/js/app.min.js.map | 2 +- buttons.js | 2 +- buttons.js.map | 2 +- package.json | 16 ++++++++-------- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Cakefile b/Cakefile index 541c2a0c..ab7f69d5 100644 --- a/Cakefile +++ b/Cakefile @@ -72,16 +72,14 @@ task 'build', 'Build everything', -> task 'build:coffee', 'Build scripts', -> system "coffee", "-o", "dist/", "src/buttons.coffee", -> - system "uglifyjs", "--compress", "--mangle", "--source-map", "buttons.js.map", "--output", "buttons.js", "dist/buttons.js" + system "uglifyjs", "--compress", "--mangle", "--source-map", "url='buttons.js.map'", "--output", "buttons.js", "dist/buttons.js" coffee.compile "src/buttons.coffee", "src/app.coffee", "assets/js/app.js", -> system "uglifyjs", "--compress", "--mangle", - "--source-map", "assets/js/app.min.js.map", - "--source-map-root", "../../", - "--source-map-url", "app.min.js.map", + "--source-map", "root='../../',url='app.min.js.map'", "--output", "assets/js/app.min.js", "assets/js/app.js" diff --git a/assets/js/app.min.js b/assets/js/app.min.js index f724cccd..e6e262f6 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1,2 +1,2 @@ -(function(){var t,e,n,o,r,s,i,a,c,u,l,d,h,p,f,w,m,g,b,y,v,C,x,S,$,E,_,k;"undefined"!=typeof window&&(h=window.document,p=window.encodeURIComponent,l=window.decodeURIComponent,c=function(t){return h.createElement(t)},u=function(t){return h.createTextNode(t)},s=window.Math,t=(/^http:/.test(h.location)?"http":"https")+"://buttons.github.io/",e="github-button",n="https://api.github.com/",o="octicon",r=o+"-mark-github",i="faa75404-3b97-5585-b449-4bc51338fbd1",k=function(t){var e,n,o;n=[];for(e in t)null!=(o=t[e])&&n.push(p(e)+"="+p(o));return n.join("&")},v=function(t){var e,n,o,r,s,i;for(r={},i=t.split("&"),e=0,n=i.length;e1?s.ceil(s.round(t*e)/e*2)/2:s.ceil(t))||0},f=function(t){var e,n,o,r,i,c;return o=t.contentWindow.document,i=o.documentElement,e=o.body,c=i.scrollWidth,r=i.scrollHeight,e.getBoundingClientRect&&(e.style.display="inline-block",n=e.getBoundingClientRect(),c=s.max(c,a(n.width||n.right-n.left)),r=s.max(r,a(n.height||n.bottom-n.top)),e.style.display=""),[c,r]},_=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"},y=function(t){var e,n,o,r,s,i;for(n={href:t.href,"aria-label":t.getAttribute("aria-label")},i=["icon","text","size","show-count"],r=0,s=i.length;r'+i+'"); - contentDocument.close(); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); }; - - renderAll = function() { - var anchor, anchors, j, k, len, len1, ref1; - anchors = []; - if (document.querySelectorAll) { - anchors = document.querySelectorAll("a." + BUTTON_CLASS); + onceEvent(iframe, "load", function() { + var callback; + if (callback = iframe.contentWindow._) { + onceScriptLoad(callback.$, onload); } else { - ref1 = document.getElementsByTagName("a"); - for (j = 0, len = ref1.length; j < len; j++) { - anchor = ref1[j]; - if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + BUTTON_CLASS + " ")) { - anchors.push(anchor); - } - } - } - for (k = 0, len1 = anchors.length; k < len1; k++) { - anchor = anchors[k]; - render(anchor); + onload(); } - }; + }); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); +}; - if (typeof define === "function" && define.amd) { - define([], { - render: render - }); - } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { - exports.render = render; + +/* istanbul ignore next */ + +renderAll = function() { + var anchor, anchors, j, k, len, len1, ref; + anchors = []; + if (document.querySelectorAll) { + anchors = document.querySelectorAll("a." + buttonClass); } else { - if (!{}.hasOwnProperty.call(document, "currentScript") && document.currentScript && delete document.currentScript && document.currentScript) { - BASEURL = document.currentScript.src.replace(/[^\/]*([?#].*)?$/, ""); - } - if (document.title === UUID) { - renderFrameContent(parseQueryString(document.location.hash.replace(/^#/, ""))); - } else { - defer(renderAll); + ref = document.getElementsByTagName("a"); + for (j = 0, len = ref.length; j < len; j++) { + anchor = ref[j]; + if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { + anchors.push(anchor); + } } } - - if (!{}.hasOwnProperty.call(document, 'currentScript') && delete document.currentScript && document.currentScript) { - BASEURL = document.currentScript.src.replace(/[^\/]*([?#].*)?$/, '').replace(/[^\/]*\/[^\/]*\/$/, ''); + for (k = 0, len1 = anchors.length; k < len1; k++) { + anchor = anchors[k]; + render(anchor); } - - this.onbeforeunload = function() {}; - - defer(function() { - Vue.component('github-button-preview', { - template: '#github-button-preview-template', - props: ['config'], - data: function() { - return { - timeoutId: null - }; - }, - computed: { - rateLimitWait: function() { - if (this.config['data-show-count']) { - return 300; - } else { - return 0; - } +}; + +if (currentScriptURL) { + setBaseURL(currentScriptURL.replace(/[^\/]*\/[^\/]*\/[^\/]*([?#].*)?$/, '')); +} + +window.onbeforeunload = function() {}; + +defer(function() { + Vue.component('github-button-preview', { + template: '#github-button-preview-template', + props: ['config'], + data: function() { + return { + timeoutId: null + }; + }, + computed: { + rateLimitWait: function() { + if (this.config['data-show-count']) { + return 300; + } else { + return 0; } - }, - mounted: function() { - var iframe, onload; + } + }, + mounted: function() { + var iframe, onload; + iframe = this.$el.firstChild; + onload = function() { + setFrameSize(iframe, getFrameContentSize(iframe)); + }; + onEvent(iframe, 'load', function() { + var callback; + if (callback = iframe.contentWindow._) { + onceScriptLoad(callback.$, onload); + } else { + onload(); + } + }); + this.update(); + }, + updated: function() { + this.update(); + }, + methods: { + update: function() { + var iframe; iframe = this.$el.firstChild; - onload = function() { - setFrameSize(iframe, getFrameContentSize(iframe)); - }; - onEvent(iframe, 'load', function() { - var callback; - if (callback = iframe.contentWindow._) { - onceScriptLoad(callback.$, onload); + setFrameSize(iframe, [1, 0]); + clearTimeout(this.timeoutId); + this.timeoutId = setTimeout((function(_this) { + return function() { + iframe = _this.$el.removeChild(iframe); + iframe.src = 'buttons.html#' + stringifyQueryString(_this.config); + _this.$el.appendChild(iframe); + }; + })(this), this.rateLimitWait); + } + } + }); + Vue.component('github-button-code', { + template: '#github-button-code-template', + props: ['text'] + }); + new Vue({ + el: '#app', + template: '#app-template', + mounted: function() { + setTimeout(renderAll); + }, + updated: function() { + if (this.focus) { + this.focus.focus(); + this.focus = null; + } + }, + data: function() { + return { + script: '\n', + focus: null, + options: { + type: null, + user: '', + repo: '', + largeButton: false, + showCount: false, + standardIcon: false + } + }; + }, + watch: { + 'options.type': function() { + if (document.activeElement !== this.$refs.user && document.activeElement !== this.$refs.repo) { + if (this.options.type === 'follow' || !this.successes.user || (this.successes.user && this.successes.repo)) { + this.focus = this.$refs.user; } else { - onload(); + this.focus = this.$refs.repo; } - }); - this.update(); - }, - updated: function() { - this.update(); - }, - methods: { - update: function() { - var iframe; - iframe = this.$el.firstChild; - setFrameSize(iframe, [1, 0]); - clearTimeout(this.timeoutId); - this.timeoutId = setTimeout((function(_this) { - return function() { - iframe = _this.$el.removeChild(iframe); - iframe.src = 'buttons.html#' + stringifyQueryString(_this.config); - _this.$el.appendChild(iframe); - }; - })(this), this.rateLimitWait); } } - }); - Vue.component('github-button-code', { - template: '#github-button-code-template', - props: ['text'] - }); - new Vue({ - el: '#app', - template: '#app-template', - mounted: function() { - setTimeout(renderAll); - }, - updated: function() { - if (this.focus) { - this.focus.focus(); - this.focus = null; + }, + computed: { + code: function() { + var a, name, ref, value; + a = createElement('a'); + a.className = 'github-button'; + a.href = this.config.href; + a.textContent = this.config['data-text']; + ref = this.config; + for (name in ref) { + value = ref[name]; + if (name !== 'href' && name !== 'data-text' && (value != null)) { + a.setAttribute(name, value); + } } + return '\n' + a.outerHTML; }, - data: function() { + successes: function() { return { - script: '\n', - focus: null, - options: { - type: null, - user: '', - repo: '', - largeButton: false, - showCount: false, - standardIcon: false - } + user: (function(user) { + return 0 < user.length && user.length < 40 && !/[^A-Za-z0-9-]|^-|-$|--/i.test(user); + })(this.options.user), + repo: (function(repo) { + return 0 < repo.length && repo.length < 101 && !/[^\w-.]|\.git$|^\.\.?$/i.test(repo); + })(this.options.repo) }; }, - watch: { - 'options.type': function() { - if (document.activeElement !== this.$refs.user && document.activeElement !== this.$refs.repo) { - if (this.options.type === 'follow' || !this.successes.user || (this.successes.user && this.successes.repo)) { - this.focus = this.$refs.user; - } else { - this.focus = this.$refs.repo; - } - } + hasSuccess: function() { + if (this.options.type === 'follow') { + return this.successes.user; + } else { + return this.successes.user && this.successes.repo; } }, - computed: { - code: function() { - var a, name, ref1, value; - a = createElement('a'); - a.className = 'github-button'; - a.href = this.config.href; - a.textContent = this.config['data-text']; - ref1 = this.config; - for (name in ref1) { - value = ref1[name]; - if (name !== 'href' && name !== 'data-text' && (value != null)) { - a.setAttribute(name, value); + dangers: function() { + return { + user: this.options.user !== '' && !this.successes.user, + repo: this.options.type !== 'follow' && this.options.repo !== '' && !this.successes.repo + }; + }, + hasDanger: function() { + return this.dangers.user || this.dangers.repo; + }, + config: function() { + var options; + if (this.options.type == null) { + return; + } + options = { + type: this.options.type, + user: this.hasSuccess ? this.options.user : 'ntkme', + repo: this.hasSuccess ? this.options.repo : 'github-buttons', + largeButton: this.options.largeButton, + showCount: this.options.showCount, + standardIcon: this.options.standardIcon + }; + return { + href: (function() { + var base, repo, user; + base = 'https://github.com/'; + user = '/' + options.user; + repo = user + '/' + options.repo; + switch (options.type) { + case 'follow': + return base + user; + case 'watch': + return base + repo + '/subscription'; + case 'star': + return base + repo; + case 'fork': + return base + repo + '/fork'; + case 'issue': + return base + repo + '/issues'; + case 'download': + return base + repo + '/archive/master.zip'; + default: + return base; } - } - return '\n' + a.outerHTML; - }, - successes: function() { - return { - user: (function(user) { - return 0 < user.length && user.length < 40 && !/[^A-Za-z0-9-]|^-|-$|--/i.test(user); - })(this.options.user), - repo: (function(repo) { - return 0 < repo.length && repo.length < 101 && !/[^\w-.]|\.git$|^\.\.?$/i.test(repo); - })(this.options.repo) - }; - }, - hasSuccess: function() { - if (this.options.type === 'follow') { - return this.successes.user; - } else { - return this.successes.user && this.successes.repo; - } - }, - dangers: function() { - return { - user: this.options.user !== '' && !this.successes.user, - repo: this.options.type !== 'follow' && this.options.repo !== '' && !this.successes.repo - }; - }, - hasDanger: function() { - return this.dangers.user || this.dangers.repo; - }, - config: function() { - var options; - if (this.options.type == null) { - return; - } - options = { - type: this.options.type, - user: this.hasSuccess ? this.options.user : 'ntkme', - repo: this.hasSuccess ? this.options.repo : 'github-buttons', - largeButton: this.options.largeButton, - showCount: this.options.showCount, - standardIcon: this.options.standardIcon - }; - return { - href: (function() { - var base, repo, user; - base = 'https://github.com/'; - user = '/' + options.user; - repo = user + '/' + options.repo; - switch (options.type) { - case 'follow': - return base + user; - case 'watch': - return base + repo + '/subscription'; - case 'star': - return base + repo; - case 'fork': - return base + repo + '/fork'; - case 'issue': - return base + repo + '/issues'; - case 'download': - return base + repo + '/archive/master.zip'; - default: - return base; - } - })(), - 'data-text': (function() { - switch (options.type) { - case 'follow': - return 'Follow @' + options.user; - default: - return options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase(); - } - })(), - 'data-icon': (function() { - if (options.standardIcon) { - return; - } - switch (options.type) { - case 'watch': - return 'octicon-eye'; - case 'star': - return 'octicon-star'; - case 'fork': - return 'octicon-repo-forked'; - case 'issue': - return 'octicon-issue-opened'; - case 'download': - return 'octicon-cloud-download'; - } - })(), - 'data-size': (function() { - if (options.largeButton) { - return 'large'; - } else { - return null; - } - })(), - 'data-show-count': (function() { - if (options.showCount) { - switch (options.type) { - case 'download': - return null; - default: - return true; - } - } + })(), + 'data-text': (function() { + switch (options.type) { + case 'follow': + return 'Follow @' + options.user; + default: + return options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase(); + } + })(), + 'data-icon': (function() { + if (options.standardIcon) { + return; + } + switch (options.type) { + case 'watch': + return 'octicon-eye'; + case 'star': + return 'octicon-star'; + case 'fork': + return 'octicon-repo-forked'; + case 'issue': + return 'octicon-issue-opened'; + case 'download': + return 'octicon-cloud-download'; + } + })(), + 'data-size': (function() { + if (options.largeButton) { + return 'large'; + } else { return null; - })(), - 'aria-label': (function() { + } + })(), + 'data-show-count': (function() { + if (options.showCount) { switch (options.type) { - case 'follow': - return 'Follow @' + options.user + ' on GitHub'; - case 'watch': - case 'star': - case 'fork': - case 'issue': case 'download': - return (options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase()) + ' ' + options.user + '/' + options.repo + ' on GitHub'; + return null; default: - return 'GitHub'; + return true; } - })() - }; - } + } + return null; + })(), + 'aria-label': (function() { + switch (options.type) { + case 'follow': + return 'Follow @' + options.user + ' on GitHub'; + case 'watch': + case 'star': + case 'fork': + case 'issue': + case 'download': + return (options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase()) + ' ' + options.user + '/' + options.repo + ' on GitHub'; + default: + return 'GitHub'; + } + })() + }; } - }); + } }); +}); -}).call(this); +}()); diff --git a/assets/js/app.min.js b/assets/js/app.min.js index e6e262f6..7ef989f0 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1,2 +1 @@ -(function(){var t,e,n,o,r,s,i,a,c,u,l,d,h,p,f,w,b,g,m,y,v,C,x,S;"undefined"!=typeof window&&(c=window.document,u=window.encodeURIComponent,i=window.decodeURIComponent,r=function(t){return c.createElement(t)},s=function(t){return c.createTextNode(t)},e=window.Math,t=(/^http:/.test(c.location)?"http":"https")+"://buttons.github.io/","github-button","https://api.github.com/","octicon","octicon-mark-github",n="faa75404-3b97-5585-b449-4bc51338fbd1",S=function(t){var e,n,o;n=[];for(e in t)null!=(o=t[e])&&n.push(u(e)+"="+u(o));return n.join("&")},b=function(t){var e,n,o,r,s,a;for(r={},e=0,n=(a=t.split("&")).length;e1?e.ceil(e.round(t*n)/n*2)/2:e.ceil(t))||0},l=function(t){var n,r,s,i,a,c;return s=t.contentWindow.document,a=s.documentElement,n=s.body,c=a.scrollWidth,i=a.scrollHeight,n.getBoundingClientRect&&(n.style.display="inline-block",r=n.getBoundingClientRect(),c=e.max(c,o(r.width||r.right-r.left)),i=e.max(i,o(r.height||r.bottom-r.top)),n.style.display=""),[c,i]},x=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"},w=function(t){var e,n,o,r,s,i;for(n={href:t.href,"aria-label":t.getAttribute("aria-label")},r=0,s=(i=["icon","text","size","show-count"]).length;r'+n+'"); - contentDocument.close(); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); }; - - renderAll = function() { - var anchor, anchors, j, k, len, len1, ref1; - anchors = []; - if (document.querySelectorAll) { - anchors = document.querySelectorAll("a." + BUTTON_CLASS); + onceEvent(iframe, "load", function() { + var callback; + if (callback = iframe.contentWindow._) { + onceScriptLoad(callback.$, onload); } else { - ref1 = document.getElementsByTagName("a"); - for (j = 0, len = ref1.length; j < len; j++) { - anchor = ref1[j]; - if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + BUTTON_CLASS + " ")) { - anchors.push(anchor); - } - } - } - for (k = 0, len1 = anchors.length; k < len1; k++) { - anchor = anchors[k]; - render(anchor); + onload(); } - }; + }); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); +}; - if (typeof define === "function" && define.amd) { - define([], { - render: render - }); - } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { - exports.render = render; + +/* istanbul ignore next */ + +renderAll = function() { + var anchor, anchors, j, k, len, len1, ref; + anchors = []; + if (document.querySelectorAll) { + anchors = document.querySelectorAll("a." + buttonClass); } else { - if (!{}.hasOwnProperty.call(document, "currentScript") && document.currentScript && delete document.currentScript && document.currentScript) { - BASEURL = document.currentScript.src.replace(/[^\/]*([?#].*)?$/, ""); - } - if (document.title === UUID) { - renderFrameContent(parseQueryString(document.location.hash.replace(/^#/, ""))); - } else { - defer(renderAll); + ref = document.getElementsByTagName("a"); + for (j = 0, len = ref.length; j < len; j++) { + anchor = ref[j]; + if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { + anchors.push(anchor); + } } } + for (k = 0, len1 = anchors.length; k < len1; k++) { + anchor = anchors[k]; + render(anchor); + } +}; + +if (typeof define === "function" && define.amd) { + define([], { + render: render + }); +} else if (typeof exports === "object" && typeof exports.nodeName !== "string") { + exports.render = render; +} else { + if (currentScriptURL) { + setBaseURL(currentScriptURL.replace(/[^\/]*([?#].*)?$/, "")); + } + if (document.title === uuid) { + renderFrameContent(parseQueryString(document.location.hash.replace(/^#/, ""))); + } else { + defer(renderAll); + } +} -}).call(this); +}()); diff --git a/dist/buttons.min.js b/dist/buttons.min.js new file mode 100644 index 00000000..8267f0c9 --- /dev/null +++ b/dist/buttons.min.js @@ -0,0 +1 @@ +!function(){"use strict";var t,e,n,a,o=window.document,r=window.encodeURIComponent,i=window.decodeURIComponent,c=window.Math,s=function(t){return o.createElement(t)},d=function(t){return o.createTextNode(t)};a="faa75404-3b97-5585-b449-4bc51338fbd1",t=(/^http:/.test(o.location)?"http":"https")+"://buttons.github.io/",n=function(e){t=e},e=!{}.hasOwnProperty.call(o,"currentScript")&&o.currentScript&&delete o.currentScript&&o.currentScript?o.currentScript.src:void 0;var l,u,h,p=function(t){var e,n,a;n=[];for(e in t)null!=(a=t[e])&&n.push(r(e)+"="+r(a));return n.join("&")};l=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},u=function(t,e,n){var a;l(t,e,a=function(o){return t.removeEventListener?t.removeEventListener(""+e,a):t.detachEvent("on"+e,a),n(o)})},h=function(t,e){var n,a;a=0,l(t,"load",n=function(){!a&&(a=1)&&e()}),l(t,"error",n),l(t,"readystatechange",function(){/i/.test(t.readyState)||n()})};var f;f=function(t){var e,n;/m/.test(o.readyState)||!/g/.test(o.readyState)&&!o.documentElement.doScroll?window.setTimeout(t):o.addEventListener?(n=0,u(o,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),u(window,"load",e)):(e=function(){/m/.test(o.readyState)&&(o.detachEvent("onreadystatechange",e),t())},o.attachEvent("onreadystatechange",e))};var b,m=function(t){var e,n,a,o,r,i;for(r={href:t.href,"aria-label":t.getAttribute("aria-label")},a=0,o=(i=["icon","text","size","show-count"]).length;a1?c.ceil(c.round(t*e)/e*2)/2:c.ceil(t))||0};g=function(t){var e,n,a,o,r,i;return a=t.contentWindow.document,r=a.documentElement,e=a.body,i=r.scrollWidth,o=r.scrollHeight,e.getBoundingClientRect&&(e.style.display="inline-block",n=e.getBoundingClientRect(),i=c.max(i,v(n.width||n.right-n.left)),o=c.max(o,v(n.height||n.bottom-n.top)),e.style.display=""),[i,o]},w=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"};var y,C,x,S,_;x=function(t){var e,n,a;return e=s("a"),e.href=t.href,/\.github\.com$/.test("."+e.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(e.href)&&(e.target="_top"):(e.href="#",e.target="_self"),e.className="btn",(n=t["aria-label"])&&e.setAttribute("aria-label",n),a=e.appendChild(s("i")),a.className="octicon "+(t["data-icon"]||"octicon-mark-github"),a.setAttribute("aria-hidden","true"),e.appendChild(d(" ")),e.appendChild(s("span")).appendChild(d(t["data-text"]||"")),o.body.appendChild(e)},S=function(t){var e,n,a,o;"github.com"===t.hostname&&(a=t.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!a[6]&&(a[2]?(e="/repos"+(n="/"+a[1]+"/"+a[2]),a[3]?(o="subscribers_count",n+="/watchers"):a[4]?(o="forks_count",n+="/network"):a[5]?(o="open_issues_count",n+="/issues"):(o="stargazers_count",n+="/stargazers")):(e="/users/"+a[1],o="followers",n="/"+a[1]+"/"+o),b("https://api.github.com/"+e,function(e){var a,r;200===e.meta.status&&(r=e.data[o],(a=s("a")).href="https://github.com/"+n,a.className="social-count",a.setAttribute("aria-label",r+" "+o.replace(/_count$/,"").replace("_"," ")+" on GitHub"),a.appendChild(s("b")),a.appendChild(s("i")),a.appendChild(s("span")).appendChild(d((""+r).replace(/\B(?=(\d{3})+(?!\d))/g,","))),t.parentNode.insertBefore(a,t.nextSibling))}))},_=function(t){var e;t&&(/^large$/i.test(t["data-size"])&&(o.body.className="large"),e=x(t),/^(true|1)$/i.test(t["data-show-count"])&&S(e))},y=function(e,n){var r,i,c,d,l,f,b;if(null==e)return C();null==n&&(n=m(e)),i="#"+p(n),c=s("iframe"),f={allowtransparency:!0,scrolling:"no",frameBorder:0};for(d in f)b=f[d],c.setAttribute(d,b);w(c,[1,0]),c.style.border="none",c.src="/service/javascript:0",o.body.appendChild(c),l=function(){var n;n=g(c),c.parentNode.removeChild(c),u(c,"load",function(){w(c,n)}),c.src=t+"buttons.html"+i,e.parentNode.replaceChild(c,e)},u(c,"load",function(){var t;(t=c.contentWindow._)?h(t.$,l):l()}),(r=c.contentWindow.document).open().write(''+a+' diff --git a/karma.conf.coffee b/karma.conf.coffee deleted file mode 100644 index c1c811da..00000000 --- a/karma.conf.coffee +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = (config) -> - config.set - frameworks: [ - 'mocha' - 'chai' - 'sinon' - 'sinon-chai' - ] - files: [ - 'test/**/*.js', { - pattern: 'test/api.github.com/**/*' - included: false - served: true - } - ] - proxies: - '/api.github.com/': '/base/test/api.github.com/' - browsers: ['ChromeHeadless', 'Firefox', 'Safari'] diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 00000000..4f802444 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,63 @@ +const path = require('path') +const webpack = require('webpack') + +module.exports = function(config) { + return config.set({ + frameworks: ['mocha', 'chai', 'sinon', 'sinon-chai'], + reporters: ['mocha', 'coverage-istanbul'], + preprocessors: { + '**/*.coffee': ['webpack', 'sourcemap'] + }, + webpack: { + devtool: 'inline-source-map', + resolve: { + alias: { + '@': path.resolve(__dirname, 'src') + }, + extensions: ['.coffee', '.js', '.json'] + }, + module: { + rules: [ + { + test: /\.coffee$/, + use: { + loader: 'coffee-loader', + options: { + sourceMap: true + } + } + }, { + test: /src\/.+\.coffee$/, + exclude: /(node_modules|test\/.+\.coffee$|src\/(app|buttons)\.coffee$)/, + loader: 'istanbul-instrumenter-loader', + enforce: 'post', + options: { + esModules: true + } + } + ] + }, + plugins: [ + new webpack.SourceMapDevToolPlugin({ + filename: null, + test: /\.(coffee|js)($|\?)/i + }) + ] + }, + webpackMiddleware: { + noInfo: true + }, + files: [ + 'test/unit/**/*.coffee', { + pattern: 'test/fixtures/**/*', + included: false, + served: true + }, { + pattern: 'buttons.js', + included: false, + served: true + } + ], + browsers: ['ChromeHeadless', 'Firefox', 'Safari'] + }) +} diff --git a/package.json b/package.json index 16a4c66d..8def6dfd 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,12 @@ "main": "dist/buttons.js", "typings": "dist/buttons.d.ts", "scripts": { - "build": "cake build", - "test": "cake test" + "build": "npm run build:octicons && npm run build:css && npm run build:js", + "build:octicons": "coffee build/octicons/sizes.coffee assets/css/octicons/sizes.css && coffee build/octicons/lt-ie8.coffee assets/css/octicons/lt-ie8.css", + "build:css": "node-sass --output-style compressed --output assets/css assets/scss", + "build:js": "rollup -c rollup.config.js", + "pretest": "coffeelint src/ test/", + "test": "karma start --single-run" }, "repository": { "type": "git", @@ -25,24 +29,38 @@ "homepage": "https://buttons.github.io/", "devDependencies": { "chai": "^4.1.0", + "codecov": "^2.3.0", + "coffee-loader": "^0.7.3", "coffee-script": "^1.12.7", "coffeelint": "^1.16.0", "css": "^2.2.1", + "istanbul-instrumenter-loader": "^3.0.0", "jsdom": "^11.1.0", "karma": "^1.7.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", + "karma-coffee-preprocessor": "^1.0.1", + "karma-coverage": "^1.1.1", + "karma-coverage-istanbul-reporter": "^1.3.0", "karma-firefox-launcher": "^1.0.1", "karma-mocha": "^1.3.0", + "karma-mocha-reporter": "^2.2.3", "karma-safari-launcher": "^1.0.0", "karma-sinon": "^1.0.5", "karma-sinon-chai": "^1.3.1", + "karma-sourcemap-loader": "^0.3.7", + "karma-webpack": "^2.0.4", "mocha": "^3.5.0", "node-sass": "^4.5.3", - "recess": "^1.1.9", + "rollup": "^0.45.2", + "rollup-plugin-coffee-script": "^1.1.0", + "rollup-plugin-node-resolve": "^3.0.0", + "rollup-plugin-uglify": "^2.0.1", + "rollup-watch": "^4.3.1", "sinon": "^2.4.1", "sinon-chai": "^2.12.0", - "uglify-js": "^3.0.27" + "uglify-js": "^3.0.27", + "webpack": "^3.4.1" }, "engines": { "node": ">=6.0.0" diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 00000000..f2edd30e --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,28 @@ +import coffeescript from 'rollup-plugin-coffee-script' +import resolve from 'rollup-plugin-node-resolve' +import uglify from 'rollup-plugin-uglify' + +export default [ + { + entry: 'src/buttons.coffee', + dest: 'dist/buttons.js' + }, { + entry: 'src/buttons.coffee', + dest: 'dist/buttons.min.js' + }, { + entry: 'src/app.coffee', + dest: 'assets/js/app.js' + }, { + entry: 'src/app.coffee', + dest: 'assets/js/app.min.js' + } +].map(config => Object.assign({ + format: 'iife', + plugins: [ + resolve({ + extensions: ['.coffee', '.js', '.json'] + }), + coffeescript(), + ...(/\.min\.js$/.test(config.dest) ? [uglify()] : []) + ] +}, config)) diff --git a/src/alias.coffee b/src/alias.coffee new file mode 100644 index 00000000..c293698e --- /dev/null +++ b/src/alias.coffee @@ -0,0 +1,6 @@ +export document = window.document +export encodeURIComponent = window.encodeURIComponent +export decodeURIComponent = window.decodeURIComponent +export Math = window.Math +export createElement = (tag) -> document.createElement tag +export createTextNode = (text) -> document.createTextNode text diff --git a/src/app.coffee b/src/app.coffee index 1c2e4be8..2689a5b6 100644 --- a/src/app.coffee +++ b/src/app.coffee @@ -1,8 +1,33 @@ -if not {}.hasOwnProperty.call(document, 'currentScript') and delete document.currentScript and document.currentScript - BASEURL = document.currentScript.src.replace /[^/]*([?#].*)?$/, '' - .replace /[^/]*\/[^/]*\/$/, '' +import { + document + createElement +} from "./alias" +import { + stringifyQueryString +} from "./querystring" +import { + onEvent + onceScriptLoad +} from "./event" +import { + defer +} from "./defer" +import { + setFrameSize + getFrameContentSize +} from "./frame" +import { + renderAll +} from "./render" +import { + setBaseURL + currentScriptURL +} from "./config" -@onbeforeunload = -> +if currentScriptURL + setBaseURL currentScriptURL.replace /[^/]*\/[^/]*\/[^/]*([?#].*)?$/, '' + +window.onbeforeunload = -> defer -> Vue.component 'github-button-preview', diff --git a/src/buttons.coffee b/src/buttons.coffee index 6cfbb21e..9913fc5c 100644 --- a/src/buttons.coffee +++ b/src/buttons.coffee @@ -1,309 +1,31 @@ -return if typeof window is "undefined" - -document = window.document -encodeURIComponent = window.encodeURIComponent -decodeURIComponent = window.decodeURIComponent -createElement = (tag) -> document.createElement tag -createTextNode = (text) -> document.createTextNode text -Math = window.Math - -BASEURL = "#{if /^http:/.test document.location then "http" else "https"}://buttons.github.io/" -BUTTON_CLASS = "github-button" -GITHUB_API_BASEURL = "https://api.github.com/" -ICON_CLASS = "octicon" -ICON_CLASS_DEFAULT = "#{ICON_CLASS}-mark-github" -UUID = "faa75404-3b97-5585-b449-4bc51338fbd1" - -stringifyQueryString = (obj) -> - params = [] - for name, value of obj - params.push "#{encodeURIComponent name}=#{encodeURIComponent value}" if value? - params.join "&" - -parseQueryString = (str) -> - params = {} - for pair in str.split "&" when pair isnt "" - ref = pair.split "=" - params[decodeURIComponent ref[0]] = decodeURIComponent ref.slice(1).join "=" if ref[0] isnt "" - params - -onEvent = (target, eventName, func) -> - if target.addEventListener - target.addEventListener "#{eventName}", func - else - target.attachEvent "on#{eventName}", func - return - -onceEvent = (target, eventName, func) -> - callback = (event) -> - if target.removeEventListener - target.removeEventListener "#{eventName}", callback - else - target.detachEvent "on#{eventName}", callback - func event || window.event - onEvent target, eventName, callback - return - -onceScriptLoad = (script, func) -> - token = 0 - callback = -> - func() if !token and token = 1 - return - onEvent script, "load", callback - onEvent script, "error", callback - onEvent script, "readystatechange", -> - callback() if not /i/.test script.readyState - return - return - -defer = (func) -> - if /m/.test(document.readyState) or (!/g/.test(document.readyState) and !document.documentElement.doScroll) - window.setTimeout func - else - if document.addEventListener - token = 0 - callback = -> - func() if !token and token = 1 - return - onceEvent document, "DOMContentLoaded", callback - onceEvent window, "load", callback - else - callback = -> - if /m/.test document.readyState - document.detachEvent "onreadystatechange", callback - func() - return - document.attachEvent "onreadystatechange", callback - return - -jsonp = (url, func) -> - script = createElement "script" - script.async = true - script.src = url + (if /\?/.test url then "&" else "?") + "callback=_" - - window._ = (json) -> - window._ = null - func json - return - window._.$ = script - - onEvent script, "error", -> - window._ = null - return - - if script.readyState - onEvent script, "readystatechange", -> - window._ = null if script.readyState is "loaded" and script.children and script.readyState is "loading" - return - - head = document.getElementsByTagName("head")[0] - if "[object Opera]" is {}.toString.call window.opera - onEvent document, "DOMContentLoaded", -> - head.appendChild script - return - else - head.appendChild script - return - -ceilPixel = (px) -> - devicePixelRatio = window.devicePixelRatio or 1 - (if devicePixelRatio > 1 then Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 else Math.ceil(px)) or 0 - -getFrameContentSize = (iframe) -> - contentDocument = iframe.contentWindow.document - html = contentDocument.documentElement - body = contentDocument.body - width = html.scrollWidth - height = html.scrollHeight - if body.getBoundingClientRect - body.style.display = "inline-block" - boundingClientRect = body.getBoundingClientRect() - width = Math.max width, ceilPixel boundingClientRect.width or boundingClientRect.right - boundingClientRect.left - height = Math.max height, ceilPixel boundingClientRect.height or boundingClientRect.bottom - boundingClientRect.top - body.style.display = "" - [width, height] - -setFrameSize = (iframe, size) -> - iframe.style.width = "#{size[0]}px" - iframe.style.height = "#{size[1]}px" - return - -parseConfig = (anchor) -> - config = - "href": anchor.href - "aria-label": anchor.getAttribute "aria-label" - for attribute in [ - "icon" - "text" - "size" - "show-count" - ] - attribute = "data-" + attribute - config[attribute] = anchor.getAttribute attribute - if !config["data-text"]? - config["data-text"] = anchor.textContent or anchor.innerText - - deprecate = (oldAttribute, newAttribute, newValue) -> - if anchor.getAttribute oldAttribute - config[newAttribute] = newValue - window.console and window.console.warn "GitHub Buttons deprecated `#{oldAttribute}`: use `#{newAttribute}=\"#{newValue}\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info." - return - deprecate "data-count-api", "data-show-count", "true" - deprecate "data-style", "data-size", "large" - - config - -renderButton = (config) -> - a = createElement "a" - a.href = config.href - - if not /\.github\.com$/.test ".#{a.hostname}" - a.href = "#" - a.target = "_self" - else if /// - ^https?://( - (gist\.)?github\.com/[^/?#]+/[^/?#]+/archive/ | - github\.com/[^/?#]+/[^/?#]+/releases/download/ | - codeload\.github\.com/ - ) - ///.test a.href - a.target = "_top" - - a.className = "btn" - a.setAttribute "aria-label", ariaLabel if ariaLabel = config["aria-label"] - i = a.appendChild createElement "i" - i.className = "#{ICON_CLASS} #{config["data-icon"] or ICON_CLASS_DEFAULT}" - i.setAttribute "aria-hidden", "true" - a.appendChild createTextNode " " - span = a.appendChild createElement "span" - span.appendChild createTextNode config["data-text"] or "" - document.body.appendChild a - -renderCount = (button) -> - return unless button.hostname is "github.com" - - match = button.pathname.replace(/^(?!\/)/, "/").match /// - ^/([^/?#]+) - (?: - /([^/?#]+) - (?: - /(?:(subscription)|(fork)|(issues)|([^/?#]+)) - )? - )? - (?:[/?#]|$) - /// - - return unless match and not match[6] - - if match[2] - href = "/#{match[1]}/#{match[2]}" - api = "/repos#{href}" - if match[3] - property = "subscribers_count" - href += "/watchers" - else if match[4] - property = "forks_count" - href += "/network" - else if match[5] - property = "open_issues_count" - href += "/issues" - else - property = "stargazers_count" - href += "/stargazers" - else - api = "/users/#{match[1]}" - property = "followers" - href = "/#{match[1]}/#{property}" - - jsonp GITHUB_API_BASEURL + api, (json) -> - if json.meta.status is 200 - data = json.data[property] - - a = createElement "a" - a.href = "https://github.com/" + href - a.className = "social-count" - a.setAttribute "aria-label", "#{data} #{property.replace(/_count$/, "").replace("_", " ")} on GitHub" - a.appendChild createElement "b" - a.appendChild createElement "i" - span = a.appendChild createElement "span" - span.appendChild createTextNode "#{data}".replace /\B(?=(\d{3})+(?!\d))/g, "," - button.parentNode.insertBefore a, button.nextSibling - return - return - -renderFrameContent = (config) -> - return unless config - document.body.className = "large" if /^large$/i.test config["data-size"] - button = renderButton config - renderCount button if /^(true|1)$/i.test config["data-show-count"] - return - - - -render = (targetNode, config) -> - return renderAll() unless targetNode? - config = parseConfig targetNode unless config? - - hash = "#" + stringifyQueryString config - - iframe = createElement "iframe" - iframe.setAttribute name, value for name, value of { - allowtransparency: true - scrolling: "no" - frameBorder: 0 - } - setFrameSize iframe, [1, 0] - iframe.style.border = "none" - iframe.src = "javascript:0" - - document.body.appendChild iframe - - onload = -> - size = getFrameContentSize iframe - iframe.parentNode.removeChild iframe - onceEvent iframe, "load", -> - setFrameSize iframe, size - return - iframe.src = "#{BASEURL}buttons.html#{hash}" - targetNode.parentNode.replaceChild iframe, targetNode - return - - onceEvent iframe, "load", -> - if callback = iframe.contentWindow._ - onceScriptLoad callback.$, onload - else - onload() - return - - contentDocument = iframe.contentWindow.document - contentDocument.open().write \ - """ - #{UUID} - """ - contentDocument.close() - return - -renderAll = -> - anchors = [] - if document.querySelectorAll - anchors = document.querySelectorAll "a.#{BUTTON_CLASS}" - else - for anchor in document.getElementsByTagName "a" - if ~" #{anchor.className} ".replace(/[ \t\n\f\r]+/g, " ").indexOf(" #{BUTTON_CLASS} ") - anchors.push anchor - render anchor for anchor in anchors - return - - +import { + document +} from "./alias" +import { + uuid + setBaseURL + currentScriptURL +} from "./config" +import { + parseQueryString +} from "./querystring" +import { + defer +} from "./defer" +import { + renderFrameContent + render + renderAll +} from "./render" if typeof define is "function" and define.amd define [], { render: render } else if typeof exports is "object" and typeof exports.nodeName isnt "string" exports.render = render else - if not {}.hasOwnProperty.call(document, "currentScript") and document.currentScript and delete document.currentScript and document.currentScript - BASEURL = document.currentScript.src.replace /[^/]*([?#].*)?$/, "" - if document.title is UUID + setBaseURL currentScriptURL.replace /[^/]*([?#].*)?$/, "" if currentScriptURL + + if document.title is uuid renderFrameContent parseQueryString document.location.hash.replace /^#/, "" else defer renderAll diff --git a/src/config.coffee b/src/config.coffee new file mode 100644 index 00000000..131b05a8 --- /dev/null +++ b/src/config.coffee @@ -0,0 +1,33 @@ +import { + document +} from "./alias" + +buttonClass = "github-button" +iconBaseClass = "octicon" +iconClass = "#{iconBaseClass}-mark-github" +uuid = "faa75404-3b97-5585-b449-4bc51338fbd1" + +### istanbul ignore next ### +baseURL = "#{if /^http:/.test document.location then "http" else "https"}://buttons.github.io/" + +setBaseURL = (url) -> + baseURL = url + return + +currentScript = "currentScript" +### istanbul ignore next ### +currentScriptURL = if not {}.hasOwnProperty.call(document, currentScript) \ + and document[currentScript] \ + and delete document[currentScript] \ + and document[currentScript] + document[currentScript].src + +export { + buttonClass + iconBaseClass + iconClass + uuid + baseURL + setBaseURL + currentScriptURL +} diff --git a/src/defer.coffee b/src/defer.coffee new file mode 100644 index 00000000..6db4972c --- /dev/null +++ b/src/defer.coffee @@ -0,0 +1,31 @@ +import { + document +} from "./alias" +import { + onceEvent +} from "./event" + +### istanbul ignore next ### +defer = (func) -> + if /m/.test(document.readyState) or (!/g/.test(document.readyState) and !document.documentElement.doScroll) + window.setTimeout func + else + if document.addEventListener + token = 0 + callback = -> + func() if !token and token = 1 + return + onceEvent document, "DOMContentLoaded", callback + onceEvent window, "load", callback + else + callback = -> + if /m/.test document.readyState + document.detachEvent "onreadystatechange", callback + func() + return + document.attachEvent "onreadystatechange", callback + return + +export { + defer +} diff --git a/src/event.coffee b/src/event.coffee new file mode 100644 index 00000000..a035951f --- /dev/null +++ b/src/event.coffee @@ -0,0 +1,38 @@ +onEvent = (target, eventName, func) -> + ### istanbul ignore else: IE lt 9 ### + if target.addEventListener + target.addEventListener "#{eventName}", func + else + target.attachEvent "on#{eventName}", func + return + +onceEvent = (target, eventName, func) -> + callback = (event) -> + ### istanbul ignore else: IE lt 9 ### + if target.removeEventListener + target.removeEventListener "#{eventName}", callback + else + target.detachEvent "on#{eventName}", callback + func event + onEvent target, eventName, callback + return + +onceScriptLoad = (script, func) -> + token = 0 + callback = -> + func() if !token and token = 1 + return + onEvent script, "load", callback + onEvent script, "error", callback + ### istanbul ignore next: IE lt 9 ### + onEvent script, "readystatechange", -> + unless /i/.test script.readyState + callback() + return + return + +export { + onEvent + onceEvent + onceScriptLoad +} diff --git a/src/frame.coffee b/src/frame.coffee new file mode 100644 index 00000000..3f2f7861 --- /dev/null +++ b/src/frame.coffee @@ -0,0 +1,30 @@ +import { + Math +} from "./alias" +import { + ceilPixel +} from "./pixel" + +getFrameContentSize = (iframe) -> + contentDocument = iframe.contentWindow.document + html = contentDocument.documentElement + body = contentDocument.body + width = html.scrollWidth + height = html.scrollHeight + if body.getBoundingClientRect + body.style.display = "inline-block" + boundingClientRect = body.getBoundingClientRect() + width = Math.max width, ceilPixel boundingClientRect.width or boundingClientRect.right - boundingClientRect.left + height = Math.max height, ceilPixel boundingClientRect.height or boundingClientRect.bottom - boundingClientRect.top + body.style.display = "" + [width, height] + +setFrameSize = (iframe, size) -> + iframe.style.width = "#{size[0]}px" + iframe.style.height = "#{size[1]}px" + return + +export { + getFrameContentSize + setFrameSize +} diff --git a/src/jsonp.coffee b/src/jsonp.coffee new file mode 100644 index 00000000..f4334050 --- /dev/null +++ b/src/jsonp.coffee @@ -0,0 +1,45 @@ +import { + document + createElement +} from "./alias" +import { + onEvent +} from "./event" +import { + defer +} from "./defer" + +jsonp = (url, func) -> + script = createElement "script" + script.async = true + script.src = url + (if /\?/.test url then "&" else "?") + "callback=_" + + window._ = (json) -> + window._ = null + func json + return + window._.$ = script + + onEvent script, "error", -> + window._ = null + return + + if script.readyState + ### istanbul ignore next: IE lt 9 ### + onEvent script, "readystatechange", -> + window._ = null if script.readyState is "loaded" and script.children and script.readyState is "loading" + return + + head = document.getElementsByTagName("head")[0] + ### istanbul ignore if: Presto based Opera ### + if "[object Opera]" is {}.toString.call window.opera + defer -> + head.appendChild script + return + else + head.appendChild script + return + +export { + jsonp +} diff --git a/src/options.coffee b/src/options.coffee new file mode 100644 index 00000000..91f9e7e8 --- /dev/null +++ b/src/options.coffee @@ -0,0 +1,24 @@ +export parseOptions = (anchor) -> + options = + "href": anchor.href + "aria-label": anchor.getAttribute "aria-label" + for attribute in [ + "icon" + "text" + "size" + "show-count" + ] + attribute = "data-" + attribute + options[attribute] = anchor.getAttribute attribute + if !options["data-text"]? + options["data-text"] = anchor.textContent or anchor.innerText + + deprecate = (oldAttribute, newAttribute, newValue) -> + if anchor.getAttribute oldAttribute + options[newAttribute] = newValue + window.console and window.console.warn "GitHub Buttons deprecated `#{oldAttribute}`: use `#{newAttribute}=\"#{newValue}\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info." + return + deprecate "data-count-api", "data-show-count", "true" + deprecate "data-style", "data-size", "large" + + options diff --git a/src/pixel.coffee b/src/pixel.coffee new file mode 100644 index 00000000..68982848 --- /dev/null +++ b/src/pixel.coffee @@ -0,0 +1,7 @@ +import { + Math +} from "./alias" + +export ceilPixel = (px) -> + devicePixelRatio = window.devicePixelRatio or 1 + (if devicePixelRatio > 1 then Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 else Math.ceil(px)) or 0 diff --git a/src/querystring.coffee b/src/querystring.coffee new file mode 100644 index 00000000..482515aa --- /dev/null +++ b/src/querystring.coffee @@ -0,0 +1,17 @@ +import { + encodeURIComponent + decodeURIComponent +} from "./alias" + +export stringifyQueryString = (obj) -> + params = [] + for name, value of obj + params.push "#{encodeURIComponent name}=#{encodeURIComponent value}" if value? + params.join "&" + +export parseQueryString = (str) -> + params = {} + for pair in str.split "&" when pair isnt "" + ref = pair.split "=" + params[decodeURIComponent ref[0]] = decodeURIComponent ref.slice(1).join "=" if ref[0] isnt "" + params diff --git a/src/render.coffee b/src/render.coffee new file mode 100644 index 00000000..036d9922 --- /dev/null +++ b/src/render.coffee @@ -0,0 +1,172 @@ +import { + document + createElement + createTextNode +} from "./alias" +import { + baseURL + buttonClass + iconBaseClass + iconClass + uuid +} from './config' +import { + parseOptions +} from "./options" +import { + jsonp +} from "./jsonp" +import { + stringifyQueryString +} from "./querystring" +import { + onceEvent + onceScriptLoad +} from "./event" +import { + getFrameContentSize + setFrameSize +} from "./frame" + +renderButton = (options) -> + a = createElement "a" + a.href = options.href + + if not /\.github\.com$/.test ".#{a.hostname}" + a.href = "#" + a.target = "_self" + else if /// + ^https?://( + (gist\.)?github\.com/[^/?#]+/[^/?#]+/archive/ | + github\.com/[^/?#]+/[^/?#]+/releases/download/ | + codeload\.github\.com/ + ) + ///.test a.href + a.target = "_top" + + a.className = "btn" + a.setAttribute "aria-label", ariaLabel if ariaLabel = options["aria-label"] + i = a.appendChild createElement "i" + i.className = "#{iconBaseClass} #{options["data-icon"] or iconClass}" + i.setAttribute "aria-hidden", "true" + a.appendChild createTextNode " " + span = a.appendChild createElement "span" + span.appendChild createTextNode options["data-text"] or "" + document.body.appendChild a + +renderCount = (button) -> + return unless button.hostname is "github.com" + + match = button.pathname.replace(/^(?!\/)/, "/").match /// + ^/([^/?#]+) + (?: + /([^/?#]+) + (?: + /(?:(subscription)|(fork)|(issues)|([^/?#]+)) + )? + )? + (?:[/?#]|$) + /// + + return unless match and not match[6] + + if match[2] + href = "/#{match[1]}/#{match[2]}" + api = "/repos#{href}" + if match[3] + property = "subscribers_count" + href += "/watchers" + else if match[4] + property = "forks_count" + href += "/network" + else if match[5] + property = "open_issues_count" + href += "/issues" + else + property = "stargazers_count" + href += "/stargazers" + else + api = "/users/#{match[1]}" + property = "followers" + href = "/#{match[1]}/#{property}" + + jsonp "https://api.github.com/#{api}", (json) -> + if json.meta.status is 200 + data = json.data[property] + + a = createElement "a" + a.href = "https://github.com/" + href + a.className = "social-count" + a.setAttribute "aria-label", "#{data} #{property.replace(/_count$/, "").replace("_", " ")} on GitHub" + a.appendChild createElement "b" + a.appendChild createElement "i" + span = a.appendChild createElement "span" + span.appendChild createTextNode "#{data}".replace /\B(?=(\d{3})+(?!\d))/g, "," + button.parentNode.insertBefore a, button.nextSibling + return + return + +renderFrameContent = (options) -> + return unless options + document.body.className = "large" if /^large$/i.test options["data-size"] + button = renderButton options + renderCount button if /^(true|1)$/i.test options["data-show-count"] + return + +### istanbul ignore next ### +render = (targetNode, options) -> + return renderAll() unless targetNode? + options = parseOptions targetNode unless options? + + hash = "#" + stringifyQueryString options + + iframe = createElement "iframe" + iframe.setAttribute name, value for name, value of { + allowtransparency: true + scrolling: "no" + frameBorder: 0 + } + setFrameSize iframe, [1, 0] + iframe.style.border = "none" + iframe.src = "javascript:0" + + document.body.appendChild iframe + + onload = -> + size = getFrameContentSize iframe + iframe.parentNode.removeChild iframe + onceEvent iframe, "load", -> + setFrameSize iframe, size + return + iframe.src = "#{baseURL}buttons.html#{hash}" + targetNode.parentNode.replaceChild iframe, targetNode + return + + onceEvent iframe, "load", -> + if callback = iframe.contentWindow._ + onceScriptLoad callback.$, onload + else + onload() + return + + contentDocument = iframe.contentWindow.document + contentDocument.open().write \ + """ + #{uuid} + """ + contentDocument.close() + return + +### istanbul ignore next ### +renderAll = -> + anchors = [] + if document.querySelectorAll + anchors = document.querySelectorAll "a.#{buttonClass}" + else + for anchor in document.getElementsByTagName "a" + if ~" #{anchor.className} ".replace(/[ \t\n\f\r]+/g, " ").indexOf(" #{buttonClass} ") + anchors.push anchor + render anchor for anchor in anchors + return + +export { renderButton, renderCount, renderFrameContent, render, renderAll } diff --git a/test/api.github.com/repos/ntkme/github-buttons b/test/fixtures/api.github.com/repos/ntkme/github-buttons similarity index 100% rename from test/api.github.com/repos/ntkme/github-buttons rename to test/fixtures/api.github.com/repos/ntkme/github-buttons diff --git a/test/api.github.com/users/ntkme b/test/fixtures/api.github.com/users/ntkme similarity index 100% rename from test/api.github.com/users/ntkme rename to test/fixtures/api.github.com/users/ntkme diff --git a/test/index.html b/test/index.html deleted file mode 100644 index 71cc85e8..00000000 --- a/test/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Mocha Tests - - - - - -
- - - - - - - - - - diff --git a/test/lib/main.js b/test/lib/main.js deleted file mode 100644 index d9ca6ad2..00000000 --- a/test/lib/main.js +++ /dev/null @@ -1,1021 +0,0 @@ -// Generated by CoffeeScript 1.12.7 -(function() { - var BASEURL, BUTTON_CLASS, GITHUB_API_BASEURL, ICON_CLASS, ICON_CLASS_DEFAULT, Math, UUID, ceilPixel, createElement, createTextNode, decodeURIComponent, defer, document, encodeURIComponent, getFrameContentSize, jsonp, onEvent, onceEvent, onceScriptLoad, parseConfig, parseQueryString, render, renderAll, renderButton, renderCount, renderFrameContent, setFrameSize, stringifyQueryString; - - if (typeof window === "undefined") { - return; - } - - document = window.document; - - encodeURIComponent = window.encodeURIComponent; - - decodeURIComponent = window.decodeURIComponent; - - createElement = function(tag) { - return document.createElement(tag); - }; - - createTextNode = function(text) { - return document.createTextNode(text); - }; - - Math = window.Math; - - BASEURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; - - BUTTON_CLASS = "github-button"; - - GITHUB_API_BASEURL = "https://api.github.com/"; - - ICON_CLASS = "octicon"; - - ICON_CLASS_DEFAULT = ICON_CLASS + "-mark-github"; - - UUID = "faa75404-3b97-5585-b449-4bc51338fbd1"; - - stringifyQueryString = function(obj) { - var name, params, value; - params = []; - for (name in obj) { - value = obj[name]; - if (value != null) { - params.push((encodeURIComponent(name)) + "=" + (encodeURIComponent(value))); - } - } - return params.join("&"); - }; - - parseQueryString = function(str) { - var j, len, pair, params, ref, ref1; - params = {}; - ref1 = str.split("&"); - for (j = 0, len = ref1.length; j < len; j++) { - pair = ref1[j]; - if (!(pair !== "")) { - continue; - } - ref = pair.split("="); - if (ref[0] !== "") { - params[decodeURIComponent(ref[0])] = decodeURIComponent(ref.slice(1).join("=")); - } - } - return params; - }; - - onEvent = function(target, eventName, func) { - if (target.addEventListener) { - target.addEventListener("" + eventName, func); - } else { - target.attachEvent("on" + eventName, func); - } - }; - - onceEvent = function(target, eventName, func) { - var callback; - callback = function(event) { - if (target.removeEventListener) { - target.removeEventListener("" + eventName, callback); - } else { - target.detachEvent("on" + eventName, callback); - } - return func(event || window.event); - }; - onEvent(target, eventName, callback); - }; - - onceScriptLoad = function(script, func) { - var callback, token; - token = 0; - callback = function() { - if (!token && (token = 1)) { - func(); - } - }; - onEvent(script, "load", callback); - onEvent(script, "error", callback); - onEvent(script, "readystatechange", function() { - if (!/i/.test(script.readyState)) { - callback(); - } - }); - }; - - defer = function(func) { - var callback, token; - if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { - window.setTimeout(func); - } else { - if (document.addEventListener) { - token = 0; - callback = function() { - if (!token && (token = 1)) { - func(); - } - }; - onceEvent(document, "DOMContentLoaded", callback); - onceEvent(window, "load", callback); - } else { - callback = function() { - if (/m/.test(document.readyState)) { - document.detachEvent("onreadystatechange", callback); - func(); - } - }; - document.attachEvent("onreadystatechange", callback); - } - } - }; - - jsonp = function(url, func) { - var head, script; - script = createElement("script"); - script.async = true; - script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; - window._ = function(json) { - window._ = null; - func(json); - }; - window._.$ = script; - onEvent(script, "error", function() { - window._ = null; - }); - if (script.readyState) { - onEvent(script, "readystatechange", function() { - if (script.readyState === "loaded" && script.children && script.readyState === "loading") { - window._ = null; - } - }); - } - head = document.getElementsByTagName("head")[0]; - if ("[object Opera]" === {}.toString.call(window.opera)) { - onEvent(document, "DOMContentLoaded", function() { - head.appendChild(script); - }); - } else { - head.appendChild(script); - } - }; - - ceilPixel = function(px) { - var devicePixelRatio; - devicePixelRatio = window.devicePixelRatio || 1; - return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; - }; - - getFrameContentSize = function(iframe) { - var body, boundingClientRect, contentDocument, height, html, width; - contentDocument = iframe.contentWindow.document; - html = contentDocument.documentElement; - body = contentDocument.body; - width = html.scrollWidth; - height = html.scrollHeight; - if (body.getBoundingClientRect) { - body.style.display = "inline-block"; - boundingClientRect = body.getBoundingClientRect(); - width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); - height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); - body.style.display = ""; - } - return [width, height]; - }; - - setFrameSize = function(iframe, size) { - iframe.style.width = size[0] + "px"; - iframe.style.height = size[1] + "px"; - }; - - parseConfig = function(anchor) { - var attribute, config, deprecate, j, len, ref1; - config = { - "href": anchor.href, - "aria-label": anchor.getAttribute("aria-label") - }; - ref1 = ["icon", "text", "size", "show-count"]; - for (j = 0, len = ref1.length; j < len; j++) { - attribute = ref1[j]; - attribute = "data-" + attribute; - config[attribute] = anchor.getAttribute(attribute); - } - if (config["data-text"] == null) { - config["data-text"] = anchor.textContent || anchor.innerText; - } - deprecate = function(oldAttribute, newAttribute, newValue) { - if (anchor.getAttribute(oldAttribute)) { - config[newAttribute] = newValue; - window.console && window.console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); - } - }; - deprecate("data-count-api", "data-show-count", "true"); - deprecate("data-style", "data-size", "large"); - return config; - }; - - renderButton = function(config) { - var a, ariaLabel, i, span; - a = createElement("a"); - a.href = config.href; - if (!/\.github\.com$/.test("." + a.hostname)) { - a.href = "#"; - a.target = "_self"; - } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { - a.target = "_top"; - } - a.className = "btn"; - if (ariaLabel = config["aria-label"]) { - a.setAttribute("aria-label", ariaLabel); - } - i = a.appendChild(createElement("i")); - i.className = ICON_CLASS + " " + (config["data-icon"] || ICON_CLASS_DEFAULT); - i.setAttribute("aria-hidden", "true"); - a.appendChild(createTextNode(" ")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(config["data-text"] || "")); - return document.body.appendChild(a); - }; - - renderCount = function(button) { - var api, href, match, property; - if (button.hostname !== "github.com") { - return; - } - match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); - if (!(match && !match[6])) { - return; - } - if (match[2]) { - href = "/" + match[1] + "/" + match[2]; - api = "/repos" + href; - if (match[3]) { - property = "subscribers_count"; - href += "/watchers"; - } else if (match[4]) { - property = "forks_count"; - href += "/network"; - } else if (match[5]) { - property = "open_issues_count"; - href += "/issues"; - } else { - property = "stargazers_count"; - href += "/stargazers"; - } - } else { - api = "/users/" + match[1]; - property = "followers"; - href = "/" + match[1] + "/" + property; - } - jsonp(GITHUB_API_BASEURL + api, function(json) { - var a, data, span; - if (json.meta.status === 200) { - data = json.data[property]; - a = createElement("a"); - a.href = "https://github.com/" + href; - a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); - a.appendChild(createElement("b")); - a.appendChild(createElement("i")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); - button.parentNode.insertBefore(a, button.nextSibling); - } - }); - }; - - renderFrameContent = function(config) { - var button; - if (!config) { - return; - } - if (/^large$/i.test(config["data-size"])) { - document.body.className = "large"; - } - button = renderButton(config); - if (/^(true|1)$/i.test(config["data-show-count"])) { - renderCount(button); - } - }; - - render = function(targetNode, config) { - var contentDocument, hash, iframe, name, onload, ref1, value; - if (targetNode == null) { - return renderAll(); - } - if (config == null) { - config = parseConfig(targetNode); - } - hash = "#" + stringifyQueryString(config); - iframe = createElement("iframe"); - ref1 = { - allowtransparency: true, - scrolling: "no", - frameBorder: 0 - }; - for (name in ref1) { - value = ref1[name]; - iframe.setAttribute(name, value); - } - setFrameSize(iframe, [1, 0]); - iframe.style.border = "none"; - iframe.src = "javascript:0"; - document.body.appendChild(iframe); - onload = function() { - var size; - size = getFrameContentSize(iframe); - iframe.parentNode.removeChild(iframe); - onceEvent(iframe, "load", function() { - setFrameSize(iframe, size); - }); - iframe.src = BASEURL + "buttons.html" + hash; - targetNode.parentNode.replaceChild(iframe, targetNode); - }; - onceEvent(iframe, "load", function() { - var callback; - if (callback = iframe.contentWindow._) { - onceScriptLoad(callback.$, onload); - } else { - onload(); - } - }); - contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + UUID + ""); - contentDocument.close(); - }; - - renderAll = function() { - var anchor, anchors, j, k, len, len1, ref1; - anchors = []; - if (document.querySelectorAll) { - anchors = document.querySelectorAll("a." + BUTTON_CLASS); - } else { - ref1 = document.getElementsByTagName("a"); - for (j = 0, len = ref1.length; j < len; j++) { - anchor = ref1[j]; - if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + BUTTON_CLASS + " ")) { - anchors.push(anchor); - } - } - } - for (k = 0, len1 = anchors.length; k < len1; k++) { - anchor = anchors[k]; - render(anchor); - } - }; - - if (typeof define === "function" && define.amd) { - define([], { - render: render - }); - } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { - exports.render = render; - } else { - if (!{}.hasOwnProperty.call(document, "currentScript") && document.currentScript && delete document.currentScript && document.currentScript) { - BASEURL = document.currentScript.src.replace(/[^\/]*([?#].*)?$/, ""); - } - if (document.title === UUID) { - renderFrameContent(parseQueryString(document.location.hash.replace(/^#/, ""))); - } else { - defer(renderAll); - } - } - - if (!String.prototype.endsWith) { - String.prototype.endsWith = function(searchString, position) { - var lastIndex, subjectString; - subjectString = this.toString(); - if (typeof position !== "number" || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { - position = subjectString.length; - } - position -= searchString.length; - lastIndex = subjectString.lastIndexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; - }; - } - - describe("QueryString", function() { - describe("stringifyQueryString(obj)", function() { - it("should stringify object when object is empty", function() { - return expect(stringifyQueryString({})).to.equal(""); - }); - it("should not stringify object when key in object does not have value", function() { - return expect(stringifyQueryString({ - test: null - })).to.equal(""); - }); - it("should stringify object when key in object does have value", function() { - expect(stringifyQueryString({ - hello: "world" - })).to.equal("hello=world"); - expect(stringifyQueryString({ - hello: "" - })).to.equal("hello="); - return expect(stringifyQueryString({ - hello: false - })).to.equal("hello=false"); - }); - return it("should stringify object", function() { - return expect(stringifyQueryString({ - hello: "world", - test: null - })).to.equal("hello=world"); - }); - }); - return describe("parseQueryString(str)", function() { - it("should parse string when string is empty", function() { - return expect(parseQueryString("")).to.deep.equal({}); - }); - return it("should parse string", function() { - return expect(parseQueryString("hello=world&test=")).to.deep.equal({ - hello: "world", - test: "" - }); - }); - }); - }); - - describe("Event", function() { - var input; - input = null; - beforeEach(function() { - return input = document.body.appendChild(createElement("input")); - }); - afterEach(function() { - return input.parentNode.removeChild(input); - }); - describe("onEvent(target, eventName, func)", function() { - return it("should call the function on event", function() { - var spy; - spy = sinon.spy(); - onEvent(input, "click", spy); - input.click(); - expect(spy).to.have.been.calledOnce; - input.click(); - return expect(spy).to.have.been.calledTwice; - }); - }); - return describe("onceEvent(target, eventName, func)", function() { - return it("should call the function on event only once", function() { - var spy; - spy = sinon.spy(); - onceEvent(input, "click", spy); - input.click(); - expect(spy).to.have.been.calledOnce; - input.click(); - expect(spy).to.have.been.calledOnce; - input.click(); - return expect(spy).to.have.been.calledOnce; - }); - }); - }); - - describe("ScriptEvent", function() { - return describe("onceScriptLoad", function() { - var head, script; - head = document.getElementsByTagName("head")[0]; - script = null; - beforeEach(function() { - return script = createElement("script"); - }); - afterEach(function() { - return script.parentNode.removeChild(script); - }); - it("should call the function on script load only once", function(done) { - script.src = "../buttons.js"; - onceScriptLoad(script, done); - return head.appendChild(script); - }); - return it("should call the function on script error only once", function(done) { - script.src = "404.js"; - onceScriptLoad(script, done); - return head.appendChild(script); - }); - }); - }); - - describe("Defer", function() { - return describe("defer(func)", function() { - return it("should call the function", function(done) { - return defer(function() { - return done(); - }); - }); - }); - }); - - describe("JSON-P", function() { - return describe("jsonp(url, func)", function() { - var head; - head = document.getElementsByTagName("head")[0]; - before(function() { - return sinon.stub(head, "appendChild"); - }); - after(function() { - return head.appendChild.restore(); - }); - return it("should setup the script and callback", function(done) { - var data, url; - data = { - test: "test" - }; - url = "/random/url/" + new Date().getTime(); - jsonp(url, function(json) { - expect(window._).to.be["null"]; - expect(json).to.deep.equal(data); - return done(); - }); - expect(window._).to.be.a("function"); - expect(window._.$).to.have.property("tagName").to.equal("SCRIPT"); - expect(window._.$.src.endsWith(url + "?callback=_")).to.be["true"]; - expect(head.appendChild).to.have.been.calledOnce.and.have.been.calledWith(window._.$); - return window._(data); - }); - }); - }); - - describe("Pixel", function() { - return describe("ceilPixel(px)", function() { - var devicePixelRatio; - devicePixelRatio = window.devicePixelRatio; - afterEach(function() { - return window.devicePixelRatio = devicePixelRatio; - }); - it("should ceil the pixel when devicePixelRatio is 1", function() { - window.devicePixelRatio = 1; - expect(ceilPixel(1)).to.equal(1); - expect(ceilPixel(1.5)).to.equal(2); - return expect(ceilPixel(1.25)).to.equal(2); - }); - it("should ceil the pixel to 1/2 when devicePixelRatio is 2", function() { - window.devicePixelRatio = 2; - expect(ceilPixel(1)).to.equal(1); - expect(ceilPixel(1.25)).to.equal(1.5); - expect(ceilPixel(1.5)).to.equal(1.5); - return expect(ceilPixel(1.75)).to.equal(2); - }); - return it("should round the pixel to 1/3 then ceil the pixel to 1/2 when devicePixelRatio is 3", function() { - window.devicePixelRatio = 3; - expect(ceilPixel(1)).to.equal(1); - expect(ceilPixel(1.16)).to.equal(1); - expect(ceilPixel(1.17)).to.equal(1.5); - expect(ceilPixel(1.25)).to.equal(1.5); - expect(ceilPixel(1.33)).to.equal(1.5); - expect(ceilPixel(1.34)).to.equal(1.5); - expect(ceilPixel(1.5)).to.equal(2); - expect(ceilPixel(1.66)).to.equal(2); - expect(ceilPixel(1.67)).to.equal(2); - expect(ceilPixel(1.75)).to.equal(2); - expect(ceilPixel(1.83)).to.equal(2); - expect(ceilPixel(1.84)).to.equal(2); - return expect(ceilPixel(2)).to.equal(2); - }); - }); - }); - - describe("Frame", function() { - var getRandomInt, html, iframe; - iframe = null; - getRandomInt = function(min, max) { - if (min == null) { - min = 0; - } - if (max == null) { - max = 1000; - } - min = Math.ceil(min); - max = Math.floor(max); - return Math.floor(Math.random() * (max - min)) + min; - }; - html = function(size) { - return "\n\n\n \n \n\n\n
\n\n"; - }; - beforeEach(function() { - return iframe = document.body.appendChild(createElement("iframe")); - }); - afterEach(function() { - return iframe.parentNode.removeChild(iframe); - }); - describe("getFrameContentSize(iframe)", function() { - return it("should return iframe content size", function(done) { - var contentDocument, size; - size = [getRandomInt(), getRandomInt()]; - setFrameSize(iframe, [1, 0]); - onEvent(iframe, "load", function() { - expect(getFrameContentSize(iframe)).to.deep.equal(size); - return done(); - }); - contentDocument = iframe.contentWindow.document; - contentDocument.open().write(html(size)); - return contentDocument.close(); - }); - }); - return describe("setFrameSize(iframe, size)", function() { - return it("should set width and height on iframe", function() { - setFrameSize(iframe, [0, 0]); - expect(iframe.scrollWidth).to.equal(0); - expect(iframe.scrollHeight).to.equal(0); - setFrameSize(iframe, [50, 100]); - expect(iframe.scrollWidth).to.equal(50); - return expect(iframe.scrollHeight).to.equal(100); - }); - }); - }); - - describe("Config", function() { - var a; - a = null; - beforeEach(function() { - return a = createElement("a"); - }); - return describe("parseConfig(anchor)", function() { - it("should parse the anchor without attribute", function() { - return expect(parseConfig(a)).to.deep.equal({ - "href": "", - "data-text": "", - "aria-label": null, - "data-icon": null, - "data-size": null, - "data-show-count": null - }); - }); - it("should parse the attribute href", function() { - a.href = "https://buttons.github.io/"; - return expect(parseConfig(a)).to.have.property("href").and.equal(a.href); - }); - it("should parse the attribute data-text", function() { - var text; - text = "test"; - a.setAttribute("data-text", text); - return expect(parseConfig(a)).to.have.property("data-text").and.equal(text); - }); - it("should parse the text content", function() { - var text; - text = "something"; - a.appendChild(createTextNode(text)); - return expect(parseConfig(a)).to.have.property("data-text").and.equal(text); - }); - it("should ignore the text content when the attribute data-text is given", function() { - var text; - text = "something"; - a.setAttribute("data-text", text); - a.appendChild(createTextNode("something else")); - return expect(parseConfig(a)).to.have.property("data-text").and.equal(text); - }); - it("should parse the attribute data-icon", function() { - var icon; - icon = "octicon"; - a.setAttribute("data-icon", icon); - return expect(parseConfig(a)).to.have.property("data-icon").and.equal(icon); - }); - it("should parse the attribute data-size", function() { - var size; - size = "large"; - a.setAttribute("data-size", size); - return expect(parseConfig(a)).to.have.property("data-size").and.equal(size); - }); - it("should parse the attribute data-style for backward compatibility", function() { - a.setAttribute("data-style", "mega"); - return expect(parseConfig(a)).to.have.property("data-size").and.equal("large"); - }); - it("should parse the attribute data-show-count", function() { - a.setAttribute("data-show-count", "true"); - return expect(parseConfig(a)).to.have.property("data-show-count").and.equal("true"); - }); - it("should parse the attribute data-count-api for backward compatibility", function() { - var api; - api = "/repos/:user/:repo#item"; - a.setAttribute("data-count-api", api); - return expect(parseConfig(a)).to.have.property("data-show-count").and.equal("true"); - }); - return it("should parse the attribute aria-label", function() { - var label; - label = "GitHub"; - a.setAttribute("aria-label", label); - return expect(parseConfig(a)).to.have.property("aria-label").and.equal(label); - }); - }); - }); - - describe("Render", function() { - describe("renderButton(config)", function() { - beforeEach(function() { - return sinon.stub(document.body, "appendChild"); - }); - afterEach(function() { - return document.body.appendChild.restore(); - }); - it("should append the button to document.body when the necessary config is given", function() { - var button; - renderButton({}); - expect(document.body.appendChild).to.have.been.calledOnce; - button = document.body.appendChild.args[0][0]; - return expect(button).to.have.property("className").and.equal("btn"); - }); - it("should append the button with given href", function() { - var button, config; - config = { - "href": "https://ntkme.github.com/" - }; - renderButton(config); - button = document.body.appendChild.args[0][0]; - return expect(button.getAttribute("href")).to.equal(config.href); - }); - it("should create a button with href # if domain is not github", function() { - var button; - renderButton({ - "href": "https://twitter/ntkme" - }); - button = document.body.appendChild.args[0][0]; - expect(button).to.have.property("href").to.equal(document.location.href + "#"); - return expect(button).to.have.property("target").to.equal("_self"); - }); - it("should create an anchor with href # if url contains javascript", function() { - var button, i, protocol, ref1, results; - ref1 = ["javascript:", "JAVASCRIPT:", "JavaScript:", " javascript:", " javascript:", "\tjavascript:", "\njavascript:", "\rjavascript:", "\fjavascript:"]; - results = []; - for (i in ref1) { - protocol = ref1[i]; - renderButton({ - "href": protocol - }); - button = document.body.appendChild.args[i][0]; - expect(button).to.have.property("href").to.equal(document.location.href + "#"); - results.push(expect(button).to.have.property("target").to.equal("_self")); - } - return results; - }); - it("should create an anchor with target _top if url is a download link", function() { - var button, i, ref1, results, url; - ref1 = ["https://github.com/ntkme/github-buttons/archive/master.zip", "https://codeload.github.com/ntkme/github-buttons/zip/master", "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip"]; - results = []; - for (i in ref1) { - url = ref1[i]; - renderButton({ - "href": url - }); - button = document.body.appendChild.args[i][0]; - results.push(expect(button).to.have.property("target").to.equal("_top")); - } - return results; - }); - it("should append the button with the default icon", function() { - var button; - renderButton({}); - button = document.body.appendChild.args[0][0]; - return expect((" " + button.firstChild.className + " ").indexOf(" " + ICON_CLASS_DEFAULT + " ")).to.be.at.least(0); - }); - it("should append the button with given icon", function() { - var button, config; - config = { - "data-icon": "octicon-star" - }; - renderButton(config); - button = document.body.appendChild.args[0][0]; - return expect((" " + button.firstChild.className + " ").indexOf(" " + config["data-icon"] + " ")).to.be.at.least(0); - }); - it("should append the button with given text", function() { - var button, config; - config = { - "data-text": "Follow" - }; - renderButton(config); - button = document.body.appendChild.args[0][0]; - return expect(button.lastChild.innerHTML).to.equal(config["data-text"]); - }); - return it("should append the button with given aria label", function() { - var button, config; - config = { - "aria-label": "GitHub" - }; - renderButton(config); - button = document.body.appendChild.args[0][0]; - return expect(button.getAttribute("aria-label")).to.equal(config["aria-label"]); - }); - }); - describe("rednerCount(button)", function() { - var REAL_GITHUB_API_BASEURL, button, head, real_jsonp, testRenderCount; - button = null; - head = document.getElementsByTagName("head")[0]; - REAL_GITHUB_API_BASEURL = GITHUB_API_BASEURL; - real_jsonp = jsonp; - beforeEach(function() { - GITHUB_API_BASEURL = "api.github.com"; - button = document.body.appendChild(createElement("a")); - sinon.stub(document.body, "insertBefore"); - return jsonp = sinon.spy(jsonp); - }); - afterEach(function() { - GITHUB_API_BASEURL = REAL_GITHUB_API_BASEURL; - button.parentNode.removeChild(button); - document.body.insertBefore.restore(); - return jsonp = real_jsonp; - }); - testRenderCount = function(url, func) { - sinon.stub(head, "appendChild").callsFake(function() { - var script; - sinon.stub(window, "_").callsFake(function() { - var args; - args = window._.args[0]; - window._.restore(); - window._.apply(null, args); - return func(); - }); - script = head.appendChild.args[0][0]; - head.appendChild.restore(); - return head.appendChild(script); - }); - button.href = url; - return renderCount(button); - }; - it("should append the count when a known button type is given", function(done) { - return testRenderCount("https://github.com/ntkme", function() { - var count; - expect(jsonp).to.have.been.calledOnce; - expect(document.body.insertBefore).to.have.been.calledOnce; - count = document.body.insertBefore.args[0][0]; - expect(count).to.have.property("className").and.equal("social-count"); - return done(); - }); - }); - it("should append the count for follow button", function(done) { - return testRenderCount("https://github.com/ntkme", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(jsonp.args[0][0]).to.equal(GITHUB_API_BASEURL + "/users/ntkme"); - expect(count.href).to.equal("https://github.com/ntkme/followers"); - expect(count.lastChild.innerHTML).to.equal("53"); - expect(count.getAttribute("aria-label")).to.equal("53 followers on GitHub"); - return done(); - }); - }); - it("should append the count for watch button", function(done) { - return testRenderCount("https://github.com/ntkme/github-buttons/subscription", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(jsonp.args[0][0]).to.equal(GITHUB_API_BASEURL + "/repos/ntkme/github-buttons"); - expect(count.href).to.equal("https://github.com/ntkme/github-buttons/watchers"); - expect(count.lastChild.innerHTML).to.equal("14"); - expect(count.getAttribute("aria-label")).to.equal("14 subscribers on GitHub"); - return done(); - }); - }); - it("should append the count for star button", function(done) { - return testRenderCount("https://github.com/ntkme/github-buttons", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(jsonp.args[0][0]).to.equal(GITHUB_API_BASEURL + "/repos/ntkme/github-buttons"); - expect(count.href).to.equal("https://github.com/ntkme/github-buttons/stargazers"); - expect(count.lastChild.innerHTML).to.equal("302"); - expect(count.getAttribute("aria-label")).to.equal("302 stargazers on GitHub"); - return done(); - }); - }); - it("should append the count for fork button", function(done) { - return testRenderCount("https://github.com/ntkme/github-buttons/fork", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(jsonp.args[0][0]).to.equal(GITHUB_API_BASEURL + "/repos/ntkme/github-buttons"); - expect(count.href).to.equal("https://github.com/ntkme/github-buttons/network"); - expect(count.lastChild.innerHTML).to.equal("42"); - expect(count.getAttribute("aria-label")).to.equal("42 forks on GitHub"); - return done(); - }); - }); - it("should append the count for issue button", function(done) { - return testRenderCount("https://github.com/ntkme/github-buttons/issues", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(jsonp.args[0][0]).to.equal(GITHUB_API_BASEURL + "/repos/ntkme/github-buttons"); - expect(count.href).to.equal("https://github.com/ntkme/github-buttons/issues"); - expect(count.lastChild.innerHTML).to.equal("1"); - expect(count.getAttribute("aria-label")).to.equal("1 open issues on GitHub"); - return done(); - }); - }); - it("should append the count for issue button when it links to new issue", function(done) { - return testRenderCount("https://github.com/ntkme/github-buttons/issues/new", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(jsonp.args[0][0]).to.equal(GITHUB_API_BASEURL + "/repos/ntkme/github-buttons"); - expect(count.href).to.equal("https://github.com/ntkme/github-buttons/issues"); - expect(count.lastChild.innerHTML).to.equal("1"); - expect(count.getAttribute("aria-label")).to.equal("1 open issues on GitHub"); - return done(); - }); - }); - it("should append the count for button whose link has a tailing slash", function(done) { - return testRenderCount("https://github.com/ntkme/", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(count.href).to.equal("https://github.com/ntkme/followers"); - return done(); - }); - }); - it("should append the count for button whose link has a query", function(done) { - return testRenderCount("https://github.com/ntkme?tab=repositories", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(count.href).to.equal("https://github.com/ntkme/followers"); - return done(); - }); - }); - it("should append the count for button whose link has a hash", function(done) { - return testRenderCount("https://github.com/ntkme#github-buttons", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(count.href).to.equal("https://github.com/ntkme/followers"); - return done(); - }); - }); - it("should append the count for button whose link has both a tailing slash and a query", function(done) { - return testRenderCount("https://github.com/ntkme/?tab=repositories", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(count.href).to.equal("https://github.com/ntkme/followers"); - return done(); - }); - }); - it("should append the count for button whose link has both a tailing slash and a hash", function(done) { - return testRenderCount("https://github.com/ntkme/#github-buttons", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(count.href).to.equal("https://github.com/ntkme/followers"); - return done(); - }); - }); - it("should append the count for button whose link has a tailing slash, a query, and a hash", function(done) { - return testRenderCount("https://github.com/ntkme/?tab=repositories#github-buttons", function() { - var count; - count = document.body.insertBefore.args[0][0]; - expect(count.href).to.equal("https://github.com/ntkme/followers"); - return done(); - }); - }); - it("should not append the count for unknown button type", function() { - button.href = "https://github.com/"; - renderCount(button); - button.href = "https://github.com/ntkme/github-buttons/test"; - renderCount(button); - expect(jsonp).to.have.not.been.called; - return expect(document.body.insertBefore).to.have.not.been.called; - }); - return it("should not append the count when it fails to pull api data", function() { - sinon.stub(head, "appendChild").callsFake(function() { - head.appendChild.restore(); - window._({ - meta: { - status: 404 - } - }); - return expect(document.body.insertBefore).to.have.not.been.called; - }); - button.href = "https://github.com/ntkme"; - return renderCount(button); - }); - }); - return describe("renderFrameContent(config)", function() { - var _renderButton, _renderCount, className; - className = document.body.className; - _renderButton = renderButton; - _renderCount = renderCount; - before(function() { - return sinon.stub(document.body, "appendChild"); - }); - after(function() { - document.body.className = className; - return document.body.appendChild.restore(); - }); - beforeEach(function() { - renderButton = sinon.stub().returns(createElement("a")); - return renderCount = sinon.stub(); - }); - afterEach(function() { - renderButton = _renderButton; - return renderCount = _renderCount; - }); - it("should do nothing when config is missing", function() { - renderFrameContent(); - return expect(document.body.appendChild).to.have.not.been.called; - }); - it("should set document.body.className when data-size is large", function() { - var config; - config = { - "data-size": "large" - }; - renderFrameContent(config); - return expect(document.body.className).to.equal("large"); - }); - it("should call renderButton(config)", function() { - renderFrameContent({}); - expect(renderButton).to.have.been.calledOnce; - return expect(renderCount).to.have.not.been.called; - }); - return it("should call renderCount(config) when data-show-count is true", function() { - renderFrameContent({ - "data-show-count": true - }); - expect(renderButton).to.have.been.calledOnce; - return expect(renderCount).to.have.been.calledOnce; - }); - }); - }); - -}).call(this); diff --git a/test/src/frame.coffee b/test/src/frame.coffee deleted file mode 100644 index f86a7d7b..00000000 --- a/test/src/frame.coffee +++ /dev/null @@ -1,53 +0,0 @@ -describe "Frame", -> - iframe = null - - getRandomInt = (min = 0, max = 1000) -> - min = Math.ceil min - max = Math.floor max - Math.floor(Math.random() * (max - min)) + min - - html = (size) -> - """ - - - - - - - -
- - - """ - - beforeEach -> - iframe = document.body.appendChild createElement "iframe" - - afterEach -> - iframe.parentNode.removeChild iframe - - describe "getFrameContentSize(iframe)", -> - it "should return iframe content size", (done) -> - size = [getRandomInt(), getRandomInt()] - setFrameSize iframe, [1, 0] - onEvent iframe, "load", -> - expect getFrameContentSize iframe - .to.deep.equal size - done() - contentDocument = iframe.contentWindow.document - contentDocument.open().write html size - contentDocument.close() - - describe "setFrameSize(iframe, size)", -> - it "should set width and height on iframe", -> - setFrameSize iframe, [0, 0] - expect iframe.scrollWidth - .to.equal 0 - expect iframe.scrollHeight - .to.equal 0 - - setFrameSize iframe, [50, 100] - expect iframe.scrollWidth - .to.equal 50 - expect iframe.scrollHeight - .to.equal 100 diff --git a/test/src/jsonp.coffee b/test/src/jsonp.coffee deleted file mode 100644 index f32a0209..00000000 --- a/test/src/jsonp.coffee +++ /dev/null @@ -1,36 +0,0 @@ -describe "JSON-P", -> - describe "jsonp(url, func)", -> - head = document.getElementsByTagName("head")[0] - - before -> - sinon.stub head, "appendChild" - - after -> - head.appendChild.restore() - - it "should setup the script and callback", (done) -> - data = test: "test" - url = "/random/url/" + new Date().getTime() - - jsonp url, (json) -> - expect window._ - .to.be.null - expect json - .to.deep.equal data - done() - - expect window._ - .to.be.a "function" - - expect window._.$ - .to.have.property "tagName" - .to.equal "SCRIPT" - - expect window._.$.src.endsWith url + "?callback=_" - .to.be.true - - expect head.appendChild - .to.have.been.calledOnce - .and.have.been.calledWith window._.$ - - window._ data diff --git a/test/src/polyfill.coffee b/test/src/polyfill.coffee deleted file mode 100644 index ad7e9c8a..00000000 --- a/test/src/polyfill.coffee +++ /dev/null @@ -1,8 +0,0 @@ -if !String.prototype.endsWith - String.prototype.endsWith = (searchString, position) -> - subjectString = this.toString() - if typeof position isnt "number" or !isFinite(position) or Math.floor(position) isnt position or position > subjectString.length - position = subjectString.length - position -= searchString.length - lastIndex = subjectString.lastIndexOf(searchString, position) - return lastIndex isnt -1 and lastIndex is position diff --git a/test/unit/alias.spec.coffee b/test/unit/alias.spec.coffee new file mode 100644 index 00000000..dbb9675b --- /dev/null +++ b/test/unit/alias.spec.coffee @@ -0,0 +1,35 @@ +import { + document + encodeURIComponent + decodeURIComponent + Math + createElement + createTextNode +} from "@/alias" + +describe "Alias", -> + it "should export an alias for window.document", -> + expect document + .to.equal window.document + + it "should export an alias for window.encodeURIComponent", -> + expect encodeURIComponent + .to.equal window.encodeURIComponent + + it "should export an alias for window.decodeURIComponent", -> + expect decodeURIComponent + .to.equal window.decodeURIComponent + + it "should export an alias for window.Math", -> + expect Math + .to.equal window.Math + + it "should create an alias for document.createElement()", -> + element = createElement 'div' + expect element.nodeType + .to.equal element.ELEMENT_NODE + + it "should create an alias for document.createTextNode()", -> + text = createTextNode 'hello world' + expect text.nodeType + .to.equal text.TEXT_NODE diff --git a/test/unit/config.spec.coffee b/test/unit/config.spec.coffee new file mode 100644 index 00000000..4a6b35bf --- /dev/null +++ b/test/unit/config.spec.coffee @@ -0,0 +1,18 @@ +import { + baseURL + setBaseURL + currentScriptURL +} from "@/config" + +originalBaseURL = "" + baseURL +setBaseURL currentScriptURL + +describe "Config", -> + it "should export base url", -> + expect originalBaseURL + .to.match ///^https?://buttons.github.io/$/// + + describe "setBaseURL(url)", -> + it "should set relative base url when document.currentScript is safe to use", -> + expect originalBaseURL + .to.not.equal baseURL diff --git a/test/src/defer.coffee b/test/unit/defer.spec.coffee similarity index 76% rename from test/src/defer.coffee rename to test/unit/defer.spec.coffee index 98b80563..7c00c0b4 100644 --- a/test/src/defer.coffee +++ b/test/unit/defer.spec.coffee @@ -1,3 +1,7 @@ +import { + defer +} from "@/defer" + describe "Defer", -> describe "defer(func)", -> it "should call the function", (done) -> diff --git a/test/src/event.coffee b/test/unit/event.spec.coffee similarity index 85% rename from test/src/event.coffee rename to test/unit/event.spec.coffee index 05fd2394..9d4fa262 100644 --- a/test/src/event.coffee +++ b/test/unit/event.spec.coffee @@ -1,8 +1,14 @@ +import { + onEvent + onceEvent + onceScriptLoad +} from "@/event.coffee" + describe "Event", -> input = null beforeEach -> - input = document.body.appendChild createElement "input" + input = document.body.appendChild document.createElement "input" afterEach -> input.parentNode.removeChild input @@ -20,7 +26,6 @@ describe "Event", -> expect spy .to.have.been.calledTwice - describe "onceEvent(target, eventName, func)", -> it "should call the function on event only once", -> spy = sinon.spy() @@ -44,13 +49,13 @@ describe "ScriptEvent", -> script = null beforeEach -> - script = createElement "script" + script = document.createElement "script" afterEach -> script.parentNode.removeChild script it "should call the function on script load only once", (done) -> - script.src = "../buttons.js" + script.src = "/base/buttons.js" onceScriptLoad script, done head.appendChild script diff --git a/test/unit/frame.spec.coffee b/test/unit/frame.spec.coffee new file mode 100644 index 00000000..c1126d5c --- /dev/null +++ b/test/unit/frame.spec.coffee @@ -0,0 +1,103 @@ +import { + onEvent +} from "@/event" +import { + getFrameContentSize + setFrameSize +} from "@/frame" + +describe "Frame", -> + iframe = null + + getRandomInt = (min = 0, max = 1000) -> + min = Math.ceil min + max = Math.floor max + Math.floor(Math.random() * (max - min)) + min + + html = (size) -> + """ + + + + + + + +
+ + + """ + + beforeEach -> + iframe = document.body.appendChild document.createElement "iframe" + + afterEach -> + iframe.parentNode.removeChild iframe + + describe "getFrameContentSize(iframe)", -> + it "should return iframe content size", (done) -> + size = [getRandomInt(), getRandomInt()] + setFrameSize iframe, [1, 0] + onEvent iframe, "load", -> + expect getFrameContentSize iframe + .to.deep.equal size + done() + contentDocument = iframe.contentWindow.document + contentDocument.open().write html size + contentDocument.close() + + it "should return iframe content size without Element.getBoundingClientRect()", (done) -> + size = [getRandomInt(), getRandomInt()] + setFrameSize iframe, [1, 0] + onEvent iframe, "load", -> + contentDocument.body.getBoundingClientRect = null + expect getFrameContentSize iframe + .to.deep.equal size + done() + contentDocument = iframe.contentWindow.document + contentDocument.open().write html size + contentDocument.close() + + it "should return iframe content size with Element.getBoundingClientRect()", (done) -> + size = [getRandomInt(), getRandomInt()] + setFrameSize iframe, [1, 0] + onEvent iframe, "load", -> + contentDocument.body.getBoundingClientRect = sinon.stub().returns + width: size[0] + height: size[1] + expect getFrameContentSize iframe + .to.deep.equal size + done() + contentDocument = iframe.contentWindow.document + contentDocument.open().write html size + contentDocument.close() + + it "should return iframe content size with Element.getBoundingClientRect() that lacks of width and height properties", (done) -> + size = [getRandomInt(), getRandomInt()] + setFrameSize iframe, [1, 0] + onEvent iframe, "load", -> + contentDocument.body.getBoundingClientRect = sinon.stub().returns + top: 0 + right: size[0] + bottom: size[1] + left: 0 + expect getFrameContentSize iframe + .to.deep.equal size + done() + contentDocument = iframe.contentWindow.document + contentDocument.open().write html size + contentDocument.close() + + describe "setFrameSize(iframe, size)", -> + it "should set width and height on iframe", -> + setFrameSize iframe, [0, 0] + expect iframe.scrollWidth + .to.equal 0 + expect iframe.scrollHeight + .to.equal 0 + + setFrameSize iframe, [50, 100] + expect iframe.scrollWidth + .to.equal 50 + expect iframe.scrollHeight + .to.equal 100 diff --git a/test/unit/jsonp.spec.coffee b/test/unit/jsonp.spec.coffee new file mode 100644 index 00000000..c9ee2d4d --- /dev/null +++ b/test/unit/jsonp.spec.coffee @@ -0,0 +1,63 @@ +import { + jsonp +} from "@/jsonp" + +describe "JSON-P", -> + describe "jsonp(url, func)", -> + head = document.getElementsByTagName("head")[0] + + beforeEach -> + sinon.stub head, "appendChild" + + afterEach -> + head.appendChild.restore() + + it "should set up the script and callback function", -> + jsonp "hello", -> + + expect window._ + .to.be.a "function" + + expect window._.$ + .to.have.property "tagName" + .to.equal "SCRIPT" + + expect head.appendChild + .to.have.been.calledOnce + .and.have.been.calledWith window._.$ + + it "should add callback query to request url", -> + url = "/random/url/" + new Date().getTime() + + jsonp url + + expect window._.$.src.endsWith url + "?callback=_" + .to.be.true + + it "should append callback query to request url with existing query", -> + url = "/random/url?query=" + new Date().getTime() + + jsonp url + + expect window._.$.src.endsWith url + "&callback=_" + .to.be.true + + it "should clean up and run callback when request is fulfilled", (done) -> + data = test: "test" + + jsonp "world", (json) -> + expect window._ + .to.be.null + expect json + .to.deep.equal data + done() + + window._ data + + it "should clean up when request is failed", -> + jsonp "fail" + + window._.$.dispatchEvent new CustomEvent "error" + + expect window._ + .to.be.null diff --git a/test/src/config.coffee b/test/unit/options.spec.coffee similarity index 78% rename from test/src/config.coffee rename to test/unit/options.spec.coffee index fe8d5b52..fe02b4bc 100644 --- a/test/src/config.coffee +++ b/test/unit/options.spec.coffee @@ -1,12 +1,16 @@ -describe "Config", -> +import { + parseOptions +} from "@/options" + +describe "Options", -> a = null beforeEach -> - a = createElement "a" + a = document.createElement "a" - describe "parseConfig(anchor)", -> + describe "parseOptions(anchor)", -> it "should parse the anchor without attribute", -> - expect parseConfig a + expect parseOptions a .to.deep.equal "href": "" "data-text": "" @@ -17,68 +21,68 @@ describe "Config", -> it "should parse the attribute href", -> a.href = "https://buttons.github.io/" - expect parseConfig a + expect parseOptions a .to.have.property "href" .and.equal a.href it "should parse the attribute data-text", -> text = "test" a.setAttribute "data-text", text - expect parseConfig a + expect parseOptions a .to.have.property "data-text" .and.equal text it "should parse the text content", -> text = "something" - a.appendChild createTextNode text - expect parseConfig a + a.appendChild document.createTextNode text + expect parseOptions a .to.have.property "data-text" .and.equal text it "should ignore the text content when the attribute data-text is given", -> text = "something" a.setAttribute "data-text", text - a.appendChild createTextNode "something else" - expect parseConfig a + a.appendChild document.createTextNode "something else" + expect parseOptions a .to.have.property "data-text" .and.equal text it "should parse the attribute data-icon", -> icon = "octicon" a.setAttribute "data-icon", icon - expect parseConfig a + expect parseOptions a .to.have.property "data-icon" .and.equal icon it "should parse the attribute data-size", -> size = "large" a.setAttribute "data-size", size - expect parseConfig a + expect parseOptions a .to.have.property "data-size" .and.equal size it "should parse the attribute data-style for backward compatibility", -> a.setAttribute "data-style", "mega" - expect parseConfig a + expect parseOptions a .to.have.property "data-size" .and.equal "large" it "should parse the attribute data-show-count", -> a.setAttribute "data-show-count", "true" - expect parseConfig a + expect parseOptions a .to.have.property "data-show-count" .and.equal "true" it "should parse the attribute data-count-api for backward compatibility", -> api = "/repos/:user/:repo#item" a.setAttribute "data-count-api", api - expect parseConfig a + expect parseOptions a .to.have.property "data-show-count" .and.equal "true" it "should parse the attribute aria-label", -> label = "GitHub" a.setAttribute "aria-label", label - expect parseConfig a + expect parseOptions a .to.have.property "aria-label" .and.equal label diff --git a/test/src/pixel.coffee b/test/unit/pixel.spec.coffee similarity index 79% rename from test/src/pixel.coffee rename to test/unit/pixel.spec.coffee index b158be36..9ec5f5e1 100644 --- a/test/src/pixel.coffee +++ b/test/unit/pixel.spec.coffee @@ -1,3 +1,7 @@ +import { + ceilPixel +} from "@/pixel" + describe "Pixel", -> describe "ceilPixel(px)", -> devicePixelRatio = window.devicePixelRatio @@ -5,6 +9,18 @@ describe "Pixel", -> afterEach -> window.devicePixelRatio = devicePixelRatio + it "should assume the devicePixelRatio is 1 if not available", -> + window.devicePixelRatio = null + + expect ceilPixel 1 + .to.equal 1 + + expect ceilPixel 1.5 + .to.equal 2 + + expect ceilPixel 1.25 + .to.equal 2 + it "should ceil the pixel when devicePixelRatio is 1", -> window.devicePixelRatio = 1 @@ -32,7 +48,6 @@ describe "Pixel", -> expect ceilPixel 1.75 .to.equal 2 - it "should round the pixel to 1/3 then ceil the pixel to 1/2 when devicePixelRatio is 3", -> window.devicePixelRatio = 3 @@ -74,3 +89,7 @@ describe "Pixel", -> expect ceilPixel 2 .to.equal 2 + + it "should return 0 for NaN", -> + expect ceilPixel NaN + .to.equal 0 diff --git a/test/src/querystring.coffee b/test/unit/querystring.spec.coffee similarity index 93% rename from test/src/querystring.coffee rename to test/unit/querystring.spec.coffee index c8c65e9a..971be1ed 100644 --- a/test/src/querystring.coffee +++ b/test/unit/querystring.spec.coffee @@ -1,3 +1,8 @@ +import { + stringifyQueryString + parseQueryString +} from "@/querystring" + describe "QueryString", -> describe "stringifyQueryString(obj)", -> diff --git a/test/src/render.coffee b/test/unit/render.spec.coffee similarity index 82% rename from test/src/render.coffee rename to test/unit/render.spec.coffee index 331fa28a..179c0be7 100644 --- a/test/src/render.coffee +++ b/test/unit/render.spec.coffee @@ -1,3 +1,15 @@ +import { + iconBaseClass + iconClass +} from "@/config" +import { + renderButton + renderCount + renderFrameContent + render + renderAll +} from "@/render" + describe "Render", -> describe "renderButton(config)", -> beforeEach -> @@ -68,7 +80,9 @@ describe "Render", -> it "should append the button with the default icon", -> renderButton {} button = document.body.appendChild.args[0][0] - expect " #{button.firstChild.className} ".indexOf " #{ICON_CLASS_DEFAULT} " + expect " #{button.firstChild.className} ".indexOf " #{iconBaseClass} " + .to.be.at.least 0 + expect " #{button.firstChild.className} ".indexOf " #{iconClass} " .to.be.at.least 0 it "should append the button with given icon", -> @@ -95,20 +109,14 @@ describe "Render", -> describe "rednerCount(button)", -> button = null head = document.getElementsByTagName("head")[0] - REAL_GITHUB_API_BASEURL = GITHUB_API_BASEURL - real_jsonp = jsonp beforeEach -> - GITHUB_API_BASEURL = "api.github.com" - button = document.body.appendChild createElement "a" + button = document.body.appendChild document.createElement "a" sinon.stub document.body, "insertBefore" - jsonp = sinon.spy jsonp afterEach -> - GITHUB_API_BASEURL = REAL_GITHUB_API_BASEURL button.parentNode.removeChild button document.body.insertBefore.restore() - jsonp = real_jsonp testRenderCount = (url, func) -> sinon.stub head, "appendChild" @@ -120,6 +128,7 @@ describe "Render", -> window._.apply null, args func() script = head.appendChild.args[0][0] + script.src = script.src.replace /^https?:\/\//, "/base/test/fixtures/" head.appendChild.restore() head.appendChild script button.href = url @@ -127,8 +136,6 @@ describe "Render", -> it "should append the count when a known button type is given", (done) -> testRenderCount "https://github.com/ntkme", -> - expect jsonp - .to.have.been.calledOnce expect document.body.insertBefore .to.have.been.calledOnce count = document.body.insertBefore.args[0][0] @@ -140,8 +147,6 @@ describe "Render", -> it "should append the count for follow button", (done) -> testRenderCount "https://github.com/ntkme", -> count = document.body.insertBefore.args[0][0] - expect jsonp.args[0][0] - .to.equal GITHUB_API_BASEURL + "/users/ntkme" expect count.href .to.equal "https://github.com/ntkme/followers" expect count.lastChild.innerHTML @@ -153,8 +158,6 @@ describe "Render", -> it "should append the count for watch button", (done) -> testRenderCount "https://github.com/ntkme/github-buttons/subscription", -> count = document.body.insertBefore.args[0][0] - expect jsonp.args[0][0] - .to.equal GITHUB_API_BASEURL + "/repos/ntkme/github-buttons" expect count.href .to.equal "https://github.com/ntkme/github-buttons/watchers" expect count.lastChild.innerHTML @@ -166,8 +169,6 @@ describe "Render", -> it "should append the count for star button", (done) -> testRenderCount "https://github.com/ntkme/github-buttons", -> count = document.body.insertBefore.args[0][0] - expect jsonp.args[0][0] - .to.equal GITHUB_API_BASEURL + "/repos/ntkme/github-buttons" expect count.href .to.equal "https://github.com/ntkme/github-buttons/stargazers" expect count.lastChild.innerHTML @@ -179,8 +180,6 @@ describe "Render", -> it "should append the count for fork button", (done) -> testRenderCount "https://github.com/ntkme/github-buttons/fork", -> count = document.body.insertBefore.args[0][0] - expect jsonp.args[0][0] - .to.equal GITHUB_API_BASEURL + "/repos/ntkme/github-buttons" expect count.href .to.equal "https://github.com/ntkme/github-buttons/network" expect count.lastChild.innerHTML @@ -192,8 +191,6 @@ describe "Render", -> it "should append the count for issue button", (done) -> testRenderCount "https://github.com/ntkme/github-buttons/issues", -> count = document.body.insertBefore.args[0][0] - expect jsonp.args[0][0] - .to.equal GITHUB_API_BASEURL + "/repos/ntkme/github-buttons" expect count.href .to.equal "https://github.com/ntkme/github-buttons/issues" expect count.lastChild.innerHTML @@ -205,8 +202,6 @@ describe "Render", -> it "should append the count for issue button when it links to new issue", (done) -> testRenderCount "https://github.com/ntkme/github-buttons/issues/new", -> count = document.body.insertBefore.args[0][0] - expect jsonp.args[0][0] - .to.equal GITHUB_API_BASEURL + "/repos/ntkme/github-buttons" expect count.href .to.equal "https://github.com/ntkme/github-buttons/issues" expect count.lastChild.innerHTML @@ -258,12 +253,12 @@ describe "Render", -> done() it "should not append the count for unknown button type", -> + button.href = "https://twitter.com/" + renderCount button button.href = "https://github.com/" renderCount button button.href = "https://github.com/ntkme/github-buttons/test" renderCount button - expect jsonp - .to.have.not.been.called expect document.body.insertBefore .to.have.not.been.called @@ -280,45 +275,22 @@ describe "Render", -> describe "renderFrameContent(config)", -> className = document.body.className - _renderButton = renderButton - _renderCount = renderCount - - before -> - sinon.stub document.body, "appendChild" - - after -> - document.body.className = className - document.body.appendChild.restore() - - beforeEach -> - renderButton = sinon.stub().returns createElement "a" - renderCount = sinon.stub() afterEach -> - renderButton = _renderButton - renderCount = _renderCount + document.body.className = className - it "should do nothing when config is missing", -> + it "should do nothing when no option given", -> renderFrameContent() - expect document.body.appendChild - .to.have.not.been.called it "should set document.body.className when data-size is large", -> - config = "data-size": "large" - renderFrameContent config + renderFrameContent "data-size": "large" expect document.body.className .to.equal "large" - it "should call renderButton(config)", -> - renderFrameContent {} - expect renderButton - .to.have.been.calledOnce - expect renderCount - .to.have.not.been.called + it "should call renderButton()", -> + renderFrameContent "href": "https://google.com/" - it "should call renderCount(config) when data-show-count is true", -> - renderFrameContent "data-show-count": true - expect renderButton - .to.have.been.calledOnce - expect renderCount - .to.have.been.calledOnce + it "should call renderCount() when data-show-count is true", -> + renderFrameContent + "href": "https://google.com/" + "data-show-count": true From d2d3cb2aca24d44da42c7159f9e5ed34712d9ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 5 Aug 2017 00:04:35 -0700 Subject: [PATCH 0006/1193] Use Shields.io badges --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5468f5fe..7007030d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ github-buttons ============== -[![Circle CI](https://circleci.com/gh/ntkme/github-buttons.svg?style=svg)](https://circleci.com/gh/ntkme/github-buttons) +[![CircleCI](https://img.shields.io/circleci/project/github/ntkme/github-buttons.svg)](https://circleci.com/gh/ntkme/github-buttons) +[![Codecov](https://img.shields.io/codecov/c/github/ntkme/github-buttons.svg)](https://codecov.io/gh/ntkme/github-buttons) + To get started, checkout **[buttons.github.io](https://buttons.github.io)**! From d9c666a305be92fb8b1f734d460fed0fd482f1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 5 Aug 2017 01:36:55 -0700 Subject: [PATCH 0007/1193] Improve coding style consistency --- src/render.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/render.coffee b/src/render.coffee index 036d9922..dd384b74 100644 --- a/src/render.coffee +++ b/src/render.coffee @@ -169,4 +169,10 @@ renderAll = -> render anchor for anchor in anchors return -export { renderButton, renderCount, renderFrameContent, render, renderAll } +export { + renderButton + renderCount + renderFrameContent + render + renderAll +} From 38feda37b4ea9516231e034a143abe8b6fbe9d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 5 Aug 2017 11:27:23 -0700 Subject: [PATCH 0008/1193] Update istanbuljs config --- karma.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index 4f802444..6738f5fc 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -28,7 +28,7 @@ module.exports = function(config) { } }, { test: /src\/.+\.coffee$/, - exclude: /(node_modules|test\/.+\.coffee$|src\/(app|buttons)\.coffee$)/, + exclude: /node_modules/, loader: 'istanbul-instrumenter-loader', enforce: 'post', options: { From 24ab589ef21c7612120d2a4259e2273248af4425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 5 Aug 2017 20:51:32 -0700 Subject: [PATCH 0009/1193] Add ES module build --- dist/buttons.esm.js | 395 ++++++++++++++++++++++++++++ package.json | 1 + rollup.config.js | 8 +- src/lib.coffee | 3 + src/{buttons.coffee => main.coffee} | 0 5 files changed, 405 insertions(+), 2 deletions(-) create mode 100644 dist/buttons.esm.js create mode 100644 src/lib.coffee rename src/{buttons.coffee => main.coffee} (100%) diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js new file mode 100644 index 00000000..9a7159fa --- /dev/null +++ b/dist/buttons.esm.js @@ -0,0 +1,395 @@ +var document = window.document; + +var encodeURIComponent = window.encodeURIComponent; + + + +var Math = window.Math; + +var createElement = function(tag) { + return document.createElement(tag); +}; + +var createTextNode = function(text) { + return document.createTextNode(text); +}; + +var baseURL; +var buttonClass; +var currentScript; +var currentScriptURL; +var iconBaseClass; +var iconClass; +var setBaseURL; +var uuid; + +buttonClass = "github-button"; + +iconBaseClass = "octicon"; + +iconClass = iconBaseClass + "-mark-github"; + +uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; + + +/* istanbul ignore next */ + +baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; + +setBaseURL = function(url) { + baseURL = url; +}; + +currentScript = "currentScript"; + + +/* istanbul ignore next */ + +currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; + +var parseOptions = function(anchor) { + var attribute, deprecate, i, len, options, ref; + options = { + "href": anchor.href, + "aria-label": anchor.getAttribute("aria-label") + }; + ref = ["icon", "text", "size", "show-count"]; + for (i = 0, len = ref.length; i < len; i++) { + attribute = ref[i]; + attribute = "data-" + attribute; + options[attribute] = anchor.getAttribute(attribute); + } + if (options["data-text"] == null) { + options["data-text"] = anchor.textContent || anchor.innerText; + } + deprecate = function(oldAttribute, newAttribute, newValue) { + if (anchor.getAttribute(oldAttribute)) { + options[newAttribute] = newValue; + window.console && window.console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); + } + }; + deprecate("data-count-api", "data-show-count", "true"); + deprecate("data-style", "data-size", "large"); + return options; +}; + +var onEvent; +var onceEvent; +var onceScriptLoad; + +onEvent = function(target, eventName, func) { + + /* istanbul ignore else: IE lt 9 */ + if (target.addEventListener) { + target.addEventListener("" + eventName, func); + } else { + target.attachEvent("on" + eventName, func); + } +}; + +onceEvent = function(target, eventName, func) { + var callback; + callback = function(event) { + + /* istanbul ignore else: IE lt 9 */ + if (target.removeEventListener) { + target.removeEventListener("" + eventName, callback); + } else { + target.detachEvent("on" + eventName, callback); + } + return func(event); + }; + onEvent(target, eventName, callback); +}; + +onceScriptLoad = function(script, func) { + var callback, token; + token = 0; + callback = function() { + if (!token && (token = 1)) { + func(); + } + }; + onEvent(script, "load", callback); + onEvent(script, "error", callback); + + /* istanbul ignore next: IE lt 9 */ + onEvent(script, "readystatechange", function() { + if (!/i/.test(script.readyState)) { + callback(); + } + }); +}; + +var defer; + +/* istanbul ignore next */ + +defer = function(func) { + var callback, token; + if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { + window.setTimeout(func); + } else { + if (document.addEventListener) { + token = 0; + callback = function() { + if (!token && (token = 1)) { + func(); + } + }; + onceEvent(document, "DOMContentLoaded", callback); + onceEvent(window, "load", callback); + } else { + callback = function() { + if (/m/.test(document.readyState)) { + document.detachEvent("onreadystatechange", callback); + func(); + } + }; + document.attachEvent("onreadystatechange", callback); + } + } +}; + +var jsonp; + +jsonp = function(url, func) { + var head, script; + script = createElement("script"); + script.async = true; + script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; + window._ = function(json) { + window._ = null; + func(json); + }; + window._.$ = script; + onEvent(script, "error", function() { + window._ = null; + }); + if (script.readyState) { + + /* istanbul ignore next: IE lt 9 */ + onEvent(script, "readystatechange", function() { + if (script.readyState === "loaded" && script.children && script.readyState === "loading") { + window._ = null; + } + }); + } + head = document.getElementsByTagName("head")[0]; + + /* istanbul ignore if: Presto based Opera */ + if ("[object Opera]" === {}.toString.call(window.opera)) { + defer(function() { + head.appendChild(script); + }); + } else { + head.appendChild(script); + } +}; + +var stringifyQueryString = function(obj) { + var name, params, value; + params = []; + for (name in obj) { + value = obj[name]; + if (value != null) { + params.push((encodeURIComponent(name)) + "=" + (encodeURIComponent(value))); + } + } + return params.join("&"); +}; + +var ceilPixel = function(px) { + var devicePixelRatio; + devicePixelRatio = window.devicePixelRatio || 1; + return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; +}; + +var getFrameContentSize; +var setFrameSize; + +getFrameContentSize = function(iframe) { + var body, boundingClientRect, contentDocument, height, html, width; + contentDocument = iframe.contentWindow.document; + html = contentDocument.documentElement; + body = contentDocument.body; + width = html.scrollWidth; + height = html.scrollHeight; + if (body.getBoundingClientRect) { + body.style.display = "inline-block"; + boundingClientRect = body.getBoundingClientRect(); + width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); + height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); + body.style.display = ""; + } + return [width, height]; +}; + +setFrameSize = function(iframe, size) { + iframe.style.width = size[0] + "px"; + iframe.style.height = size[1] + "px"; +}; + +var render; +var renderAll; +var renderButton; +var renderCount; +var renderFrameContent; + +renderButton = function(options) { + var a, ariaLabel, i, span; + a = createElement("a"); + a.href = options.href; + if (!/\.github\.com$/.test("." + a.hostname)) { + a.href = "#"; + a.target = "_self"; + } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { + a.target = "_top"; + } + a.className = "btn"; + if (ariaLabel = options["aria-label"]) { + a.setAttribute("aria-label", ariaLabel); + } + i = a.appendChild(createElement("i")); + i.className = iconBaseClass + " " + (options["data-icon"] || iconClass); + i.setAttribute("aria-hidden", "true"); + a.appendChild(createTextNode(" ")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(options["data-text"] || "")); + return document.body.appendChild(a); +}; + +renderCount = function(button) { + var api, href, match, property; + if (button.hostname !== "github.com") { + return; + } + match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); + if (!(match && !match[6])) { + return; + } + if (match[2]) { + href = "/" + match[1] + "/" + match[2]; + api = "/repos" + href; + if (match[3]) { + property = "subscribers_count"; + href += "/watchers"; + } else if (match[4]) { + property = "forks_count"; + href += "/network"; + } else if (match[5]) { + property = "open_issues_count"; + href += "/issues"; + } else { + property = "stargazers_count"; + href += "/stargazers"; + } + } else { + api = "/users/" + match[1]; + property = "followers"; + href = "/" + match[1] + "/" + property; + } + jsonp("https://api.github.com/" + api, function(json) { + var a, data, span; + if (json.meta.status === 200) { + data = json.data[property]; + a = createElement("a"); + a.href = "https://github.com/" + href; + a.className = "social-count"; + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.appendChild(createElement("b")); + a.appendChild(createElement("i")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); + button.parentNode.insertBefore(a, button.nextSibling); + } + }); +}; + +renderFrameContent = function(options) { + var button; + if (!options) { + return; + } + if (/^large$/i.test(options["data-size"])) { + document.body.className = "large"; + } + button = renderButton(options); + if (/^(true|1)$/i.test(options["data-show-count"])) { + renderCount(button); + } +}; + + +/* istanbul ignore next */ + +render = function(targetNode, options) { + var contentDocument, hash, iframe, name, onload, ref, value; + if (targetNode == null) { + return renderAll(); + } + if (options == null) { + options = parseOptions(targetNode); + } + hash = "#" + stringifyQueryString(options); + iframe = createElement("iframe"); + ref = { + allowtransparency: true, + scrolling: "no", + frameBorder: 0 + }; + for (name in ref) { + value = ref[name]; + iframe.setAttribute(name, value); + } + setFrameSize(iframe, [1, 0]); + iframe.style.border = "none"; + iframe.src = "javascript:0"; + document.body.appendChild(iframe); + onload = function() { + var size; + size = getFrameContentSize(iframe); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + setFrameSize(iframe, size); + }); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); + }; + onceEvent(iframe, "load", function() { + var callback; + if (callback = iframe.contentWindow._) { + onceScriptLoad(callback.$, onload); + } else { + onload(); + } + }); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); +}; + + +/* istanbul ignore next */ + +renderAll = function() { + var anchor, anchors, j, k, len, len1, ref; + anchors = []; + if (document.querySelectorAll) { + anchors = document.querySelectorAll("a." + buttonClass); + } else { + ref = document.getElementsByTagName("a"); + for (j = 0, len = ref.length; j < len; j++) { + anchor = ref[j]; + if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { + anchors.push(anchor); + } + } + } + for (k = 0, len1 = anchors.length; k < len1; k++) { + anchor = anchors[k]; + render(anchor); + } +}; + +export { render }; diff --git a/package.json b/package.json index 8def6dfd..943cc62c 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "description": "GitHub Buttons", "main": "dist/buttons.js", + "module": "dist/buttons.esm.js", "typings": "dist/buttons.d.ts", "scripts": { "build": "npm run build:octicons && npm run build:css && npm run build:js", diff --git a/rollup.config.js b/rollup.config.js index f2edd30e..9951bde0 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -4,11 +4,15 @@ import uglify from 'rollup-plugin-uglify' export default [ { - entry: 'src/buttons.coffee', + entry: 'src/main.coffee', dest: 'dist/buttons.js' }, { - entry: 'src/buttons.coffee', + entry: 'src/main.coffee', dest: 'dist/buttons.min.js' + }, { + entry: 'src/lib.coffee', + format: 'es', + dest: 'dist/buttons.esm.js' }, { entry: 'src/app.coffee', dest: 'assets/js/app.js' diff --git a/src/lib.coffee b/src/lib.coffee new file mode 100644 index 00000000..eac41d3c --- /dev/null +++ b/src/lib.coffee @@ -0,0 +1,3 @@ +export { + render +} from "./render" diff --git a/src/buttons.coffee b/src/main.coffee similarity index 100% rename from src/buttons.coffee rename to src/main.coffee From a527e0c2bfac959519cd51afdc02a6a01d0952a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Mon, 7 Aug 2017 18:47:34 -0700 Subject: [PATCH 0010/1193] Update octicons --- .circleci/config.yml | 1 - .gitmodules | 3 - README.md | 2 +- assets/css/buttons.css | 2 +- assets/css/octicons/lt-ie8.css | 172 --------------------------- assets/css/octicons/sizes.css | 204 --------------------------------- assets/js/app.js | 36 +++--- assets/js/app.min.js | 2 +- assets/scss/buttons.scss | 32 +++--- build/octicons/lt-ie8.coffee | 28 ----- build/octicons/sizes.coffee | 51 --------- buttons.html | 7 -- components/octicons | 1 - dist/buttons.esm.js | 36 +++--- dist/buttons.js | 36 +++--- dist/buttons.min.js | 2 +- package.json | 4 +- rollup.config.js | 36 ++++++ src/config.coffee | 2 - src/octicons.coffee | 11 ++ src/render.coffee | 9 +- test/unit/render.spec.coffee | 10 +- 22 files changed, 138 insertions(+), 549 deletions(-) delete mode 100644 .gitmodules delete mode 100644 assets/css/octicons/lt-ie8.css delete mode 100644 assets/css/octicons/sizes.css delete mode 100644 build/octicons/lt-ie8.coffee delete mode 100644 build/octicons/sizes.coffee delete mode 160000 components/octicons create mode 100644 src/octicons.coffee diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a4c5c30..f0c331dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,6 @@ jobs: - image: circleci/node:latest-browsers steps: - checkout - - run: git submodule sync && git submodule update --init - restore_cache: key: dependency-cache-{{ checksum "package.json" }} - run: npm install diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index b5500eae..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "components/octicons"] - path = components/octicons - url = https://github.com/primer/octicons.git diff --git a/README.md b/README.md index 7007030d..f05637d7 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Development ### Clone ``` sh -git clone --recursive https://github.com/ntkme/github-buttons.git +git clone https://github.com/ntkme/github-buttons.git ``` ``` sh diff --git a/assets/css/buttons.css b/assets/css/buttons.css index f9832291..db84070d 100644 --- a/assets/css/buttons.css +++ b/assets/css/buttons.css @@ -1 +1 @@ -html{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{margin:0;font-size:0;white-space:nowrap}a{color:#24292e;text-decoration:none;outline:0}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:middle;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.btn i{font-size:14px;line-height:inherit}.btn span{vertical-align:1px}.social-count{margin-left:5px;font-size:10px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .btn i{font-size:16px}.large .btn span{vertical-align:2px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}.octicon{display:inline-block;_overflow:hidden}.octicon-alert,.octicon-beaker,.octicon-book,.octicon-broadcast,.octicon-bug,.octicon-checklist,.octicon-cloud-download,.octicon-cloud-upload,.octicon-comment-discussion,.octicon-comment,.octicon-credit-card,.octicon-dashboard,.octicon-desktop-download,.octicon-device-camera-video,.octicon-device-camera,.octicon-device-desktop,.octicon-eye,.octicon-graph,.octicon-home,.octicon-issue-closed,.octicon-keyboard,.octicon-link,.octicon-mark-github,.octicon-markdown,.octicon-megaphone,.octicon-mirror,.octicon-mortar-board,.octicon-mute,.octicon-no-newline,.octicon-octoface,.octicon-organization,.octicon-package,.octicon-pin,.octicon-radio-tower,.octicon-repo-clone,.octicon-repo-pull,.octicon-rocket,.octicon-ruby,.octicon-search,.octicon-settings,.octicon-sign-out,.octicon-smiley,.octicon-squirrel,.octicon-tasklist,.octicon-thumbsdown,.octicon-thumbsup,.octicon-tools,.octicon-unmute,.octicon-unverified,.octicon-verified{width:1em}.octicon-arrow-down,.octicon-arrow-left,.octicon-arrow-right,.octicon-arrow-up,.octicon-bold,.octicon-bookmark,.octicon-chevron-down,.octicon-chevron-up,.octicon-device-mobile,.octicon-git-branch,.octicon-horizontal-rule,.octicon-repo-forked,.octicon-rss,.octicon-zap{width:0.625em}.octicon-arrow-small-down,.octicon-arrow-small-left,.octicon-arrow-small-right,.octicon-arrow-small-up,.octicon-italic,.octicon-triangle-left,.octicon-triangle-right{width:0.375em}.octicon-bell,.octicon-briefcase,.octicon-browser,.octicon-calendar,.octicon-circle-slash,.octicon-circuit-board,.octicon-clippy,.octicon-clock,.octicon-code,.octicon-diff-added,.octicon-diff-ignored,.octicon-diff-modified,.octicon-diff-removed,.octicon-diff-renamed,.octicon-file-directory,.octicon-file-submodule,.octicon-file-symlink-directory,.octicon-fold,.octicon-gear,.octicon-gift,.octicon-gist-secret,.octicon-git-commit,.octicon-git-compare,.octicon-globe,.octicon-history,.octicon-hubot,.octicon-inbox,.octicon-info,.octicon-issue-opened,.octicon-issue-reopened,.octicon-jersey,.octicon-key,.octicon-law,.octicon-mail-read,.octicon-mail,.octicon-mention,.octicon-milestone,.octicon-pencil,.octicon-plug,.octicon-pulse,.octicon-question,.octicon-quote,.octicon-reply,.octicon-shield,.octicon-sign-in,.octicon-star,.octicon-stop,.octicon-tag,.octicon-telescope,.octicon-terminal,.octicon-unfold,.octicon-versions{width:0.875em}.octicon-check,.octicon-database,.octicon-ellipses,.octicon-ellipsis,.octicon-file-binary,.octicon-file-code,.octicon-file-media,.octicon-file-pdf,.octicon-file-symlink-file,.octicon-file-text,.octicon-file-zip,.octicon-file,.octicon-flame,.octicon-gist,.octicon-git-merge,.octicon-git-pull-request,.octicon-heart,.octicon-light-bulb,.octicon-link-external,.octicon-list-ordered,.octicon-list-unordered,.octicon-location,.octicon-lock,.octicon-mail-reply,.octicon-paintcan,.octicon-person,.octicon-plus,.octicon-repo-force-push,.octicon-repo-push,.octicon-repo,.octicon-server,.octicon-sync,.octicon-three-bars,.octicon-trashcan,.octicon-triangle-down,.octicon-triangle-up,.octicon-watch,.octicon-x{width:0.75em}.octicon-chevron-left,.octicon-chevron-right,.octicon-dash,.octicon-grabber,.octicon-primitive-dot,.octicon-primitive-square{width:0.5em}.octicon-diff{width:0.8125em}.octicon-logo-gist{width:1.5625em}.octicon-logo-github{width:2.8125em}.octicon-plus-small{width:0.4375em}.octicon-text-size{width:1.125em} +html{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{margin:0;font-size:0;white-space:nowrap}a{color:#24292e;text-decoration:none;outline:0}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:middle;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.btn span{vertical-align:1px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .btn span{vertical-align:0}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px} diff --git a/assets/css/octicons/lt-ie8.css b/assets/css/octicons/lt-ie8.css deleted file mode 100644 index a5c2c531..00000000 --- a/assets/css/octicons/lt-ie8.css +++ /dev/null @@ -1,172 +0,0 @@ -.octicon-alert { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-arrow-down { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-arrow-left { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-arrow-right { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-arrow-small-down { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-arrow-small-left { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-arrow-small-right { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-arrow-small-up { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-arrow-up { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-beaker { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-bell { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-bold { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-book { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-bookmark { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-briefcase { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-broadcast { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-browser { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-bug { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-calendar { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-check { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-checklist { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-chevron-down { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-chevron-left { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-chevron-right { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-chevron-up { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-circle-slash { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-circuit-board { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-clippy { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-clock { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-cloud-download { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-cloud-upload { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-code { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-comment-discussion { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-comment { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-credit-card { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-dash { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-dashboard { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-database { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-desktop-download { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-device-camera-video { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-device-camera { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-device-desktop { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-device-mobile { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-diff-added { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-diff-ignored { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-diff-modified { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-diff-removed { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-diff-renamed { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-diff { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-ellipses { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-ellipsis { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-eye { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-binary { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-code { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-directory { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-media { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-pdf { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-submodule { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-symlink-directory { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-symlink-file { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-text { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file-zip { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-file { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-flame { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-fold { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-gear { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-gift { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-gist-secret { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-gist { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-git-branch { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-git-commit { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-git-compare { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-git-merge { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-git-pull-request { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-globe { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-grabber { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-graph { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-heart { zoom: expression( this.innerHTML = '♥' ); } /* ♥ */ -.octicon-history { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-home { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-horizontal-rule { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-hubot { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-inbox { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-info { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-issue-closed { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-issue-opened { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-issue-reopened { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-italic { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-jersey { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-key { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-keyboard { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-law { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-light-bulb { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-link-external { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-link { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-list-ordered { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-list-unordered { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-location { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-lock { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-logo-gist { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-logo-github { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-mail-read { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-mail-reply { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-mail { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-mark-github { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-markdown { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-megaphone { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-mention { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-milestone { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-mirror { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-mortar-board { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-mute { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-no-newline { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-octoface { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-organization { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-package { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-paintcan { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-pencil { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-person { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-pin { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-plug { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-plus-small { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-plus { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-primitive-dot { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-primitive-square { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-pulse { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-question { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-quote { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-radio-tower { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-reply { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-repo-clone { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-repo-force-push { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-repo-forked { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-repo-pull { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-repo-push { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-repo { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-rocket { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-rss { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-ruby { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-search { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-server { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-settings { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-shield { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-sign-in { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-sign-out { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-smiley { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-squirrel { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-star { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-stop { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-sync { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-tag { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-tasklist { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-telescope { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-terminal { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-text-size { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-three-bars { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-thumbsdown { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-thumbsup { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-tools { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-trashcan { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-triangle-down { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-triangle-left { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-triangle-right { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-triangle-up { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-unfold { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-unmute { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-unverified { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-verified { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-versions { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-watch { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-x { zoom: expression( this.innerHTML = '' ); } /*  */ -.octicon-zap { zoom: expression( this.innerHTML = '⚡' ); } /* ⚡ */ \ No newline at end of file diff --git a/assets/css/octicons/sizes.css b/assets/css/octicons/sizes.css deleted file mode 100644 index 1b7ec8be..00000000 --- a/assets/css/octicons/sizes.css +++ /dev/null @@ -1,204 +0,0 @@ -.octicon-alert, -.octicon-beaker, -.octicon-book, -.octicon-broadcast, -.octicon-bug, -.octicon-checklist, -.octicon-cloud-download, -.octicon-cloud-upload, -.octicon-comment-discussion, -.octicon-comment, -.octicon-credit-card, -.octicon-dashboard, -.octicon-desktop-download, -.octicon-device-camera-video, -.octicon-device-camera, -.octicon-device-desktop, -.octicon-eye, -.octicon-graph, -.octicon-home, -.octicon-issue-closed, -.octicon-keyboard, -.octicon-link, -.octicon-mark-github, -.octicon-markdown, -.octicon-megaphone, -.octicon-mirror, -.octicon-mortar-board, -.octicon-mute, -.octicon-no-newline, -.octicon-octoface, -.octicon-organization, -.octicon-package, -.octicon-pin, -.octicon-radio-tower, -.octicon-repo-clone, -.octicon-repo-pull, -.octicon-rocket, -.octicon-ruby, -.octicon-search, -.octicon-settings, -.octicon-sign-out, -.octicon-smiley, -.octicon-squirrel, -.octicon-tasklist, -.octicon-thumbsdown, -.octicon-thumbsup, -.octicon-tools, -.octicon-unmute, -.octicon-unverified, -.octicon-verified { - width: 1em; -} - -.octicon-arrow-down, -.octicon-arrow-left, -.octicon-arrow-right, -.octicon-arrow-up, -.octicon-bold, -.octicon-bookmark, -.octicon-chevron-down, -.octicon-chevron-up, -.octicon-device-mobile, -.octicon-git-branch, -.octicon-horizontal-rule, -.octicon-repo-forked, -.octicon-rss, -.octicon-zap { - width: 0.625em; -} - -.octicon-arrow-small-down, -.octicon-arrow-small-left, -.octicon-arrow-small-right, -.octicon-arrow-small-up, -.octicon-italic, -.octicon-triangle-left, -.octicon-triangle-right { - width: 0.375em; -} - -.octicon-bell, -.octicon-briefcase, -.octicon-browser, -.octicon-calendar, -.octicon-circle-slash, -.octicon-circuit-board, -.octicon-clippy, -.octicon-clock, -.octicon-code, -.octicon-diff-added, -.octicon-diff-ignored, -.octicon-diff-modified, -.octicon-diff-removed, -.octicon-diff-renamed, -.octicon-file-directory, -.octicon-file-submodule, -.octicon-file-symlink-directory, -.octicon-fold, -.octicon-gear, -.octicon-gift, -.octicon-gist-secret, -.octicon-git-commit, -.octicon-git-compare, -.octicon-globe, -.octicon-history, -.octicon-hubot, -.octicon-inbox, -.octicon-info, -.octicon-issue-opened, -.octicon-issue-reopened, -.octicon-jersey, -.octicon-key, -.octicon-law, -.octicon-mail-read, -.octicon-mail, -.octicon-mention, -.octicon-milestone, -.octicon-pencil, -.octicon-plug, -.octicon-pulse, -.octicon-question, -.octicon-quote, -.octicon-reply, -.octicon-shield, -.octicon-sign-in, -.octicon-star, -.octicon-stop, -.octicon-tag, -.octicon-telescope, -.octicon-terminal, -.octicon-unfold, -.octicon-versions { - width: 0.875em; -} - -.octicon-check, -.octicon-database, -.octicon-ellipses, -.octicon-ellipsis, -.octicon-file-binary, -.octicon-file-code, -.octicon-file-media, -.octicon-file-pdf, -.octicon-file-symlink-file, -.octicon-file-text, -.octicon-file-zip, -.octicon-file, -.octicon-flame, -.octicon-gist, -.octicon-git-merge, -.octicon-git-pull-request, -.octicon-heart, -.octicon-light-bulb, -.octicon-link-external, -.octicon-list-ordered, -.octicon-list-unordered, -.octicon-location, -.octicon-lock, -.octicon-mail-reply, -.octicon-paintcan, -.octicon-person, -.octicon-plus, -.octicon-repo-force-push, -.octicon-repo-push, -.octicon-repo, -.octicon-server, -.octicon-sync, -.octicon-three-bars, -.octicon-trashcan, -.octicon-triangle-down, -.octicon-triangle-up, -.octicon-watch, -.octicon-x { - width: 0.75em; -} - -.octicon-chevron-left, -.octicon-chevron-right, -.octicon-dash, -.octicon-grabber, -.octicon-primitive-dot, -.octicon-primitive-square { - width: 0.5em; -} - -.octicon-diff { - width: 0.8125em; -} - -.octicon-logo-gist { - width: 1.5625em; -} - -.octicon-logo-github { - width: 2.8125em; -} - -.octicon-plus-small { - width: 0.4375em; -} - -.octicon-text-size { - width: 1.125em; -} \ No newline at end of file diff --git a/assets/js/app.js b/assets/js/app.js index 0880cd2f..92fe67b5 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -142,17 +142,11 @@ var baseURL; var buttonClass; var currentScript; var currentScriptURL; -var iconBaseClass; -var iconClass; var setBaseURL; var uuid; buttonClass = "github-button"; -iconBaseClass = "octicon"; - -iconClass = iconBaseClass + "-mark-github"; - uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; @@ -233,6 +227,20 @@ jsonp = function(url, func) { } }; +var data = {"alert":{"keywords":["warning","triangle","exclamation","point"],"path":"","height":"16","width":"16"},"arrow-down":{"keywords":["point","direction"],"path":"","height":"16","width":"10"},"arrow-left":{"keywords":["point","direction"],"path":"","height":"16","width":"10"},"arrow-right":{"keywords":["point","direction"],"path":"","height":"16","width":"10"},"arrow-small-down":{"keywords":["point","direction"],"path":"","height":"16","width":"6"},"arrow-small-left":{"keywords":["point","direction","little","tiny"],"path":"","height":"16","width":"6"},"arrow-small-right":{"keywords":["point","direction","little","tiny"],"path":"","height":"16","width":"6"},"arrow-small-up":{"keywords":["point","direction","little","tiny"],"path":"","height":"16","width":"6"},"arrow-up":{"keywords":["point","direction"],"path":"","height":"16","width":"10"},"beaker":{"keywords":["experiment","labs","experimental","feature","test","science","education","study","development","testing"],"path":"","height":"16","width":"16"},"bell":{"keywords":["notification"],"path":"","height":"16","width":"14"},"bold":{"keywords":["bold"],"path":"","height":"16","width":"10"},"book":{"keywords":["book","journal","wiki","readme"],"path":"","height":"16","width":"16"},"bookmark":{"keywords":["tabbard"],"path":"","height":"16","width":"10"},"briefcase":{"keywords":["suitcase","business"],"path":"","height":"16","width":"14"},"broadcast":{"keywords":["rss","radio","signal"],"path":"","height":"16","width":"16"},"browser":{"keywords":["window","web"],"path":"","height":"16","width":"14"},"bug":{"keywords":["insect"],"path":"","height":"16","width":"16"},"calendar":{"keywords":["time","day","month","year"],"path":"","height":"16","width":"14"},"check":{"keywords":["mark","yes","confirm","accept","ok","success"],"path":"","height":"16","width":"12"},"checklist":{"keywords":["todo"],"path":"","height":"16","width":"16"},"chevron-down":{"keywords":["triangle","arrow"],"path":"","height":"16","width":"10"},"chevron-left":{"keywords":["triangle","arrow"],"path":"","height":"16","width":"8"},"chevron-right":{"keywords":["triangle","arrow"],"path":"","height":"16","width":"8"},"chevron-up":{"keywords":["triangle","arrow"],"path":"","height":"16","width":"10"},"circle-slash":{"keywords":["no","deny","fail","failure","error","bad"],"path":"","height":"16","width":"14"},"circuit-board":{"keywords":["developer","hardware","electricity"],"path":"","height":"16","width":"14"},"clippy":{"keywords":["copy","paste","save","capture"],"path":"","height":"16","width":"14"},"clock":{"keywords":["time","hour","minute","second"],"path":"","height":"16","width":"14"},"cloud-download":{"keywords":["save","install","get"],"path":"","height":"16","width":"16"},"cloud-upload":{"keywords":["put","export"],"path":"","height":"16","width":"16"},"code":{"keywords":["brackets"],"path":"","height":"16","width":"14"},"comment":{"keywords":["speak","bubble"],"path":"","height":"16","width":"16"},"comment-discussion":{"keywords":["converse","talk"],"path":"","height":"16","width":"16"},"credit-card":{"keywords":["money","billing","payments","transactions"],"path":"","height":"16","width":"16"},"dash":{"keywords":["hyphen","range"],"path":"","height":"16","width":"8"},"dashboard":{"keywords":["speed","dial"],"path":"","height":"16","width":"16"},"database":{"keywords":["disks","data"],"path":"","height":"16","width":"12"},"desktop-download":{"keywords":["clone","download"],"path":"","height":"16","width":"16"},"device-camera":{"keywords":["photo","picture","image","snapshot"],"path":"","height":"16","width":"16"},"device-camera-video":{"keywords":["watch","view","media","stream"],"path":"","height":"16","width":"16"},"device-desktop":{"keywords":["computer","monitor"],"path":"","height":"16","width":"16"},"device-mobile":{"keywords":["phone","iphone","cellphone"],"path":"","height":"16","width":"10"},"diff":{"keywords":["difference","changes","compare"],"path":"","height":"16","width":"13"},"diff-added":{"keywords":["new","addition"],"path":"","height":"16","width":"14"},"diff-ignored":{"keywords":["slash"],"path":"","height":"16","width":"14"},"diff-modified":{"keywords":["dot","changed","updated"],"path":"","height":"16","width":"14"},"diff-removed":{"keywords":["deleted","subtracted","dash"],"path":"","height":"16","width":"14"},"diff-renamed":{"keywords":["moved","arrow"],"path":"","height":"16","width":"14"},"ellipses":{"keywords":["dot","more"],"path":"","height":"16","width":"12"},"ellipsis":{"keywords":["read","more","hidden","expand"],"path":"","height":"16","width":"12"},"eye":{"keywords":["look","watch","see"],"path":"","height":"16","width":"16"},"file":{"keywords":["file"],"path":"","height":"16","width":"12"},"file-binary":{"keywords":["image","video","word","powerpoint","excel"],"path":"","height":"16","width":"12"},"file-code":{"keywords":["text","javascript","html","css","php","ruby","coffeescript","sass","scss"],"path":"","height":"16","width":"12"},"file-directory":{"keywords":["folder"],"path":"","height":"16","width":"14"},"file-media":{"keywords":["image","video","audio"],"path":"","height":"16","width":"12"},"file-pdf":{"keywords":["adobe"],"path":"","height":"16","width":"12"},"file-submodule":{"keywords":["folder"],"path":"","height":"16","width":"14"},"file-symlink-directory":{"keywords":["folder","subfolder","link","alias"],"path":"","height":"16","width":"14"},"file-symlink-file":{"keywords":["link","alias"],"path":"","height":"16","width":"12"},"file-text":{"keywords":["document"],"path":"","height":"16","width":"12"},"file-zip":{"keywords":["compress","archive"],"path":"","height":"16","width":"12"},"flame":{"keywords":["fire","hot","burn","trending"],"path":"","height":"16","width":"12"},"fold":{"keywords":["unfold","hide","collapse"],"path":"","height":"16","width":"14"},"gear":{"keywords":["settings"],"path":"","height":"16","width":"14"},"gift":{"keywords":["package","present","skill","craft","freebie"],"path":"","height":"16","width":"14"},"gist":{"keywords":["gist","github"],"path":"","height":"16","width":"12"},"gist-secret":{"keywords":["gist","secret","private"],"path":"","height":"16","width":"14"},"git-branch":{"keywords":["branch","git"],"path":"","height":"16","width":"10"},"git-commit":{"keywords":["save"],"path":"","height":"16","width":"14"},"git-compare":{"keywords":["difference","changes"],"path":"","height":"16","width":"14"},"git-merge":{"keywords":["join"],"path":"","height":"16","width":"12"},"git-pull-request":{"keywords":["review"],"path":"","height":"16","width":"12"},"globe":{"keywords":["world"],"path":"","height":"16","width":"14"},"grabber":{"keywords":["mover","drap","drop"],"path":"","height":"16","width":"8"},"graph":{"keywords":["trend","stats","statistics"],"path":"","height":"16","width":"16"},"heart":{"keywords":["love"],"path":"","height":"16","width":"12"},"history":{"keywords":["time","past","revert","back"],"path":"","height":"16","width":"14"},"home":{"keywords":["welcome","index","house","building"],"path":"","height":"16","width":"16"},"horizontal-rule":{"keywords":["hr"],"path":"","height":"16","width":"10"},"hubot":{"keywords":["robot"],"path":"","height":"16","width":"14"},"inbox":{"keywords":["mail","todo","new","messages"],"path":"","height":"16","width":"14"},"info":{"keywords":["help"],"path":"","height":"16","width":"14"},"issue-closed":{"keywords":["done","complete"],"path":"","height":"16","width":"16"},"issue-opened":{"keywords":["new"],"path":"","height":"16","width":"14"},"issue-reopened":{"keywords":["regression"],"path":"","height":"16","width":"14"},"italic":{"keywords":["font","italic","style"],"path":"","height":"16","width":"6"},"jersey":{"keywords":["team","game","basketball"],"path":"","height":"16","width":"14"},"key":{"keywords":["key","lock","secure","safe"],"path":"","height":"16","width":"14"},"keyboard":{"keywords":["type","keys","write","shortcuts"],"path":"","height":"16","width":"16"},"law":{"keywords":["legal","bill"],"path":"","height":"16","width":"14"},"light-bulb":{"keywords":["idea"],"path":"","height":"16","width":"12"},"link":{"keywords":["connect","hyperlink"],"path":"","height":"16","width":"16"},"link-external":{"keywords":["out","see","more","go","to"],"path":"","height":"16","width":"12"},"list-ordered":{"keywords":["numbers","tasks","todo","items"],"path":"","height":"16","width":"12"},"list-unordered":{"keywords":["bullet","point","tasks","todo","items"],"path":"","height":"16","width":"12"},"location":{"keywords":["here","marker"],"path":"","height":"16","width":"12"},"lock":{"keywords":["secure","safe","protected"],"path":"","height":"16","width":"12"},"logo-gist":{"keywords":["logo","gist"],"path":"","height":"16","width":"25"},"logo-github":{"keywords":["brand"],"path":"","height":"16","width":"45"},"mail":{"keywords":["email","unread"],"path":"","height":"16","width":"14"},"mail-read":{"keywords":["email","open"],"path":"","height":"16","width":"14"},"mail-reply":{"keywords":["email"],"path":"","height":"16","width":"12"},"mark-github":{"keywords":["octocat"],"path":"","height":"16","width":"16"},"markdown":{"keywords":["markup","style"],"path":"","height":"16","width":"16"},"megaphone":{"keywords":["bullhorn","loud","shout","broadcast"],"path":"","height":"16","width":"16"},"mention":{"keywords":["at","ping"],"path":"","height":"16","width":"14"},"milestone":{"keywords":["marker"],"path":"","height":"16","width":"14"},"mirror":{"keywords":["reflect"],"path":"","height":"16","width":"16"},"mortar-board":{"keywords":["education","learn","teach"],"path":"","height":"16","width":"16"},"mute":{"keywords":["quiet","sound","audio","turn","off"],"path":"","height":"16","width":"16"},"no-newline":{"keywords":["return"],"path":"","height":"16","width":"16"},"note":{"keywords":["card","paper","ticket"],"path":"","height":"16","width":"14"},"octoface":{"keywords":["octocat"],"path":"","height":"16","width":"16"},"organization":{"keywords":["people","group","team"],"path":"","height":"16","width":"16"},"package":{"keywords":["box","ship"],"path":"","height":"16","width":"16"},"paintcan":{"keywords":["style","theme","art","color"],"path":"","height":"16","width":"12"},"pencil":{"keywords":["edit","change","update","write"],"path":"","height":"16","width":"14"},"person":{"keywords":["people","man","woman","human"],"path":"","height":"16","width":"12"},"pin":{"keywords":["people","save","star","bookmark"],"path":"","height":"16","width":"16"},"plug":{"keywords":["hook","webhook"],"path":"","height":"16","width":"14"},"plus":{"keywords":["add","new","more"],"path":"","height":"16","width":"12"},"plus-small":{"keywords":["add","new","more","small"],"path":"","height":"16","width":"7"},"primitive-dot":{"keywords":["circle"],"path":"","height":"16","width":"8"},"primitive-square":{"keywords":["box"],"path":"","height":"16","width":"8"},"project":{"keywords":["board","kanban","columns","scrum"],"path":"","height":"16","width":"15"},"pulse":{"keywords":["graph","trend","line"],"path":"","height":"16","width":"14"},"question":{"keywords":["help","explain"],"path":"","height":"16","width":"14"},"quote":{"keywords":["quotation"],"path":"","height":"16","width":"14"},"radio-tower":{"keywords":["broadcast"],"path":"","height":"16","width":"16"},"reply":{"keywords":["reply all","back"],"path":"","height":"16","width":"14"},"repo":{"keywords":["book","journal"],"path":"","height":"16","width":"12"},"repo-clone":{"keywords":["book","journal"],"path":"","height":"16","width":"16"},"repo-force-push":{"keywords":["book","journal","put"],"path":"","height":"16","width":"12"},"repo-forked":{"keywords":["book","journal","copy"],"path":"","height":"16","width":"10"},"repo-pull":{"keywords":["book","journal","get"],"path":"","height":"16","width":"16"},"repo-push":{"keywords":["book","journal","put"],"path":"","height":"16","width":"12"},"rocket":{"keywords":["staff","stafftools","blast","off","space"],"path":"","height":"16","width":"16"},"rss":{"keywords":["broadcast","feed"],"path":"","height":"16","width":"10"},"ruby":{"keywords":["code"],"path":"","height":"16","width":"16"},"screen-full":{"keywords":["fullscreen","expand"],"path":"","height":"16","width":"14"},"screen-normal":{"keywords":["fullscreen","expand","exit"],"path":"","height":"16","width":"14"},"search":{"keywords":["magnifying","glass"],"path":"","height":"16","width":"16"},"server":{"keywords":["computers","racks","ops"],"path":"","height":"16","width":"12"},"settings":{"keywords":["sliders","filters"],"path":"","height":"16","width":"16"},"shield":{"keywords":["protect","shield","lock"],"path":"","height":"16","width":"14"},"sign-in":{"keywords":["door","arrow","direction","enter"],"path":"","height":"16","width":"14"},"sign-out":{"keywords":["door","arrow","direction","leave"],"path":"","height":"16","width":"16"},"smiley":{"keywords":["emoji","smile","mood","emotion"],"path":"","height":"16","width":"16"},"squirrel":{"keywords":["ship","shipit"],"path":"","height":"16","width":"16"},"star":{"keywords":["save","remember","like"],"path":"","height":"16","width":"14"},"stop":{"keywords":["block","spam"],"path":"","height":"16","width":"14"},"sync":{"keywords":["cycle","refresh","loop"],"path":"","height":"16","width":"12"},"tag":{"keywords":["release"],"path":"","height":"16","width":"14"},"tasklist":{"keywords":["todo"],"path":"","height":"16","width":"16"},"telescope":{"keywords":["science","space","look","view","explore"],"path":"","height":"16","width":"14"},"terminal":{"keywords":["code","ops","shell"],"path":"","height":"16","width":"14"},"text-size":{"keywords":["font","size","text"],"path":"","height":"16","width":"18"},"three-bars":{"keywords":["hamburger"],"path":"","height":"16","width":"12"},"thumbsdown":{"keywords":["thumb","thumbsdown","rejected"],"path":"","height":"16","width":"16"},"thumbsup":{"keywords":["thumb","thumbsup","prop","ship"],"path":"","height":"16","width":"16"},"tools":{"keywords":["screwdriver","wrench","settings"],"path":"","height":"16","width":"16"},"trashcan":{"keywords":["garbage","rubbish","recycle","delete"],"path":"","height":"16","width":"12"},"triangle-down":{"keywords":["arrow","point","direction"],"path":"","height":"16","width":"12"},"triangle-left":{"keywords":["arrow","point","direction"],"path":"","height":"16","width":"6"},"triangle-right":{"keywords":["arrow","point","direction"],"path":"","height":"16","width":"6"},"triangle-up":{"keywords":["arrow","point","direction"],"path":"","height":"16","width":"12"},"unfold":{"keywords":["expand","open","reveal"],"path":"","height":"16","width":"14"},"unmute":{"keywords":["loud","volume","audio","sound","play"],"path":"","height":"16","width":"16"},"unverified":{"keywords":["insecure","untrusted"],"path":"","height":"16","width":"16"},"verified":{"keywords":["trusted","secure","trustworthy"],"path":"","height":"16","width":"16"},"versions":{"keywords":["history"],"path":"","height":"16","width":"14"},"watch":{"keywords":["wait","hourglass"],"path":"","height":"16","width":"12"},"x":{"keywords":["remove","close","delete"],"path":"","height":"16","width":"12"},"zap":{"keywords":["electricity","lightning","props","like","star","save"],"path":"","height":"16","width":"10"}}; + +var octicon; + +octicon = function(icon, height) { + var width; + icon = ("" + icon).toLowerCase().replace(/^octicon-/, ""); + if (!data[icon]) { + icon = "mark-github"; + } + width = height * data[icon].width / data[icon].height; + return "" + data[icon].path + ""; +}; + var render; var renderAll; var renderButton; @@ -240,7 +248,7 @@ var renderCount; var renderFrameContent; renderButton = function(options) { - var a, ariaLabel, i, span; + var a, ariaLabel, span; a = createElement("a"); a.href = options.href; if (!/\.github\.com$/.test("." + a.hostname)) { @@ -253,9 +261,7 @@ renderButton = function(options) { if (ariaLabel = options["aria-label"]) { a.setAttribute("aria-label", ariaLabel); } - i = a.appendChild(createElement("i")); - i.className = iconBaseClass + " " + (options["data-icon"] || iconClass); - i.setAttribute("aria-hidden", "true"); + a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); a.appendChild(createTextNode(" ")); span = a.appendChild(createElement("span")); span.appendChild(createTextNode(options["data-text"] || "")); @@ -376,21 +382,21 @@ render = function(targetNode, options) { /* istanbul ignore next */ renderAll = function() { - var anchor, anchors, j, k, len, len1, ref; + var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { anchors = document.querySelectorAll("a." + buttonClass); } else { ref = document.getElementsByTagName("a"); - for (j = 0, len = ref.length; j < len; j++) { - anchor = ref[j]; + for (i = 0, len = ref.length; i < len; i++) { + anchor = ref[i]; if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { anchors.push(anchor); } } } - for (k = 0, len1 = anchors.length; k < len1; k++) { - anchor = anchors[k]; + for (j = 0, len1 = anchors.length; j < len1; j++) { + anchor = anchors[j]; render(anchor); } }; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 7ef989f0..697a887c 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var t,e,n,o=window.document,r=window.encodeURIComponent,s=window.Math,i=function(t){return o.createElement(t)},a=function(t){return o.createTextNode(t)},u=function(t){var e,n,o;n=[];for(e in t)null!=(o=t[e])&&n.push(r(e)+"="+r(o));return n.join("&")};t=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},e=function(e,n,o){var r;t(e,n,r=function(t){return e.removeEventListener?e.removeEventListener(""+n,r):e.detachEvent("on"+n,r),o(t)})},n=function(e,n){var o,r;r=0,t(e,"load",o=function(){!r&&(r=1)&&n()}),t(e,"error",o),t(e,"readystatechange",function(){/i/.test(e.readyState)||o()})};var c;c=function(t){var n,r;/m/.test(o.readyState)||!/g/.test(o.readyState)&&!o.documentElement.doScroll?window.setTimeout(t):o.addEventListener?(r=0,e(o,"DOMContentLoaded",n=function(){!r&&(r=1)&&t()}),e(window,"load",n)):(n=function(){/m/.test(o.readyState)&&(o.detachEvent("onreadystatechange",n),t())},o.attachEvent("onreadystatechange",n))};var l,d,h=function(t){var e;return((e=window.devicePixelRatio||1)>1?s.ceil(s.round(t*e)/e*2)/2:s.ceil(t))||0};l=function(t){var e,n,o,r,i,a;return o=t.contentWindow.document,i=o.documentElement,e=o.body,a=i.scrollWidth,r=i.scrollHeight,e.getBoundingClientRect&&(e.style.display="inline-block",n=e.getBoundingClientRect(),a=s.max(a,h(n.width||n.right-n.left)),r=s.max(r,h(n.height||n.bottom-n.top)),e.style.display=""),[a,r]},d=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"};var p,f,w,b;b="faa75404-3b97-5585-b449-4bc51338fbd1",p=(/^http:/.test(o.location)?"http":"https")+"://buttons.github.io/",w=function(t){p=t},f=!{}.hasOwnProperty.call(o,"currentScript")&&o.currentScript&&delete o.currentScript&&o.currentScript?o.currentScript.src:void 0;var g,m=function(t){var e,n,o,r,s,i;for(s={href:t.href,"aria-label":t.getAttribute("aria-label")},o=0,r=(i=["icon","text","size","show-count"]).length;o'+b+'"); - contentDocument.close(); -}; - - -/* istanbul ignore next */ - -renderAll = function() { - var anchor, anchors, i, j, len, len1, ref; - anchors = []; - if (document.querySelectorAll) { - anchors = document.querySelectorAll("a." + buttonClass); - } else { - ref = document.getElementsByTagName("a"); - for (i = 0, len = ref.length; i < len; i++) { - anchor = ref[i]; - if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { - anchors.push(anchor); - } - } - } - for (j = 0, len1 = anchors.length; j < len1; j++) { - anchor = anchors[j]; - render(anchor); - } -}; - -export { render }; diff --git a/package.json b/package.json index dcd644e8..c7304813 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "url": "https://ntk.me/" }, "main": "dist/buttons.js", - "module": "dist/buttons.esm.js", "typings": "dist/buttons.d.ts", "scripts": { "build": "npm run build:css && npm run build:js", diff --git a/rollup.config.js b/rollup.config.js index d6bfce94..862c547e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -9,10 +9,6 @@ export default [ }, { entry: 'src/main.coffee', dest: 'dist/buttons.min.js' - }, { - entry: 'src/lib.coffee', - format: 'es', - dest: 'dist/buttons.esm.js' }, { entry: 'src/app.coffee', dest: 'assets/js/app.js' diff --git a/src/lib.coffee b/src/lib.coffee deleted file mode 100644 index eac41d3c..00000000 --- a/src/lib.coffee +++ /dev/null @@ -1,3 +0,0 @@ -export { - render -} from "./render" From ac4db2e1e9da93501a7bd1ec92dc921bbd076b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Tue, 8 Aug 2017 18:16:01 -0700 Subject: [PATCH 0017/1193] Reorganize source to provide smaller app.js build --- assets/js/app.js | 192 +++---------------- assets/js/app.min.js | 2 +- dist/buttons.js | 238 ++++++++++++------------ dist/buttons.min.js | 2 +- src/app.coffee | 12 +- src/button.coffee | 36 ++++ src/config.coffee | 2 - src/frame-content.coffee | 20 ++ src/{frame.coffee => frame-size.coffee} | 0 src/main.coffee | 6 +- src/render-all.coffee | 25 +++ src/render.coffee | 112 +---------- src/social-count.coffee | 63 +++++++ test/unit/frame.spec.coffee | 4 +- test/unit/render.spec.coffee | 24 ++- 15 files changed, 325 insertions(+), 413 deletions(-) create mode 100644 src/button.coffee create mode 100644 src/frame-content.coffee rename src/{frame.coffee => frame-size.coffee} (100%) create mode 100644 src/render-all.coffee create mode 100644 src/social-count.coffee diff --git a/assets/js/app.js b/assets/js/app.js index 8b3ac9d5..f4631e21 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -13,10 +13,33 @@ var createElement = function(tag) { return document.createElement(tag); }; -var createTextNode = function(text) { - return document.createTextNode(text); +var baseURL; +var buttonClass; +var currentScript; +var currentScriptURL; +var setBaseURL; +var uuid; + +buttonClass = "github-button"; + +uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; + + +/* istanbul ignore next */ + +baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; + +setBaseURL = function(url) { + baseURL = url; }; +currentScript = "currentScript"; + + +/* istanbul ignore next */ + +currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; + var stringifyQueryString = function(obj) { var name, params, value; params = []; @@ -138,33 +161,6 @@ setFrameSize = function(iframe, size) { iframe.style.height = size[1] + "px"; }; -var baseURL; -var buttonClass; -var currentScript; -var currentScriptURL; -var setBaseURL; -var uuid; - -buttonClass = "github-button"; - -uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; - - -/* istanbul ignore next */ - -baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; - -setBaseURL = function(url) { - baseURL = url; -}; - -currentScript = "currentScript"; - - -/* istanbul ignore next */ - -currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; - var parseOptions = function(anchor) { var attribute, deprecate, i, len, options, ref; options = { @@ -191,144 +187,7 @@ var parseOptions = function(anchor) { return options; }; -var jsonp; - -jsonp = function(url, func) { - var head, script; - script = createElement("script"); - script.async = true; - script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; - window._ = function(json) { - window._ = null; - func(json); - }; - window._.$ = script; - onEvent(script, "error", function() { - window._ = null; - }); - if (script.readyState) { - - /* istanbul ignore next: IE lt 9 */ - onEvent(script, "readystatechange", function() { - if (script.readyState === "loaded" && script.children && script.readyState === "loading") { - window._ = null; - } - }); - } - head = document.getElementsByTagName("head")[0]; - - /* istanbul ignore if: Presto based Opera */ - if ("[object Opera]" === {}.toString.call(window.opera)) { - defer(function() { - head.appendChild(script); - }); - } else { - head.appendChild(script); - } -}; - -var data = {"alert":{"path":"","height":"16","width":"16"},"arrow-down":{"path":"","height":"16","width":"10"},"arrow-left":{"path":"","height":"16","width":"10"},"arrow-right":{"path":"","height":"16","width":"10"},"arrow-small-down":{"path":"","height":"16","width":"6"},"arrow-small-left":{"path":"","height":"16","width":"6"},"arrow-small-right":{"path":"","height":"16","width":"6"},"arrow-small-up":{"path":"","height":"16","width":"6"},"arrow-up":{"path":"","height":"16","width":"10"},"beaker":{"path":"","height":"16","width":"16"},"bell":{"path":"","height":"16","width":"14"},"bold":{"path":"","height":"16","width":"10"},"book":{"path":"","height":"16","width":"16"},"bookmark":{"path":"","height":"16","width":"10"},"briefcase":{"path":"","height":"16","width":"14"},"broadcast":{"path":"","height":"16","width":"16"},"browser":{"path":"","height":"16","width":"14"},"bug":{"path":"","height":"16","width":"16"},"calendar":{"path":"","height":"16","width":"14"},"check":{"path":"","height":"16","width":"12"},"checklist":{"path":"","height":"16","width":"16"},"chevron-down":{"path":"","height":"16","width":"10"},"chevron-left":{"path":"","height":"16","width":"8"},"chevron-right":{"path":"","height":"16","width":"8"},"chevron-up":{"path":"","height":"16","width":"10"},"circle-slash":{"path":"","height":"16","width":"14"},"circuit-board":{"path":"","height":"16","width":"14"},"clippy":{"path":"","height":"16","width":"14"},"clock":{"path":"","height":"16","width":"14"},"cloud-download":{"path":"","height":"16","width":"16"},"cloud-upload":{"path":"","height":"16","width":"16"},"code":{"path":"","height":"16","width":"14"},"comment":{"path":"","height":"16","width":"16"},"comment-discussion":{"path":"","height":"16","width":"16"},"credit-card":{"path":"","height":"16","width":"16"},"dash":{"path":"","height":"16","width":"8"},"dashboard":{"path":"","height":"16","width":"16"},"database":{"path":"","height":"16","width":"12"},"desktop-download":{"path":"","height":"16","width":"16"},"device-camera":{"path":"","height":"16","width":"16"},"device-camera-video":{"path":"","height":"16","width":"16"},"device-desktop":{"path":"","height":"16","width":"16"},"device-mobile":{"path":"","height":"16","width":"10"},"diff":{"path":"","height":"16","width":"13"},"diff-added":{"path":"","height":"16","width":"14"},"diff-ignored":{"path":"","height":"16","width":"14"},"diff-modified":{"path":"","height":"16","width":"14"},"diff-removed":{"path":"","height":"16","width":"14"},"diff-renamed":{"path":"","height":"16","width":"14"},"ellipses":{"path":"","height":"16","width":"12"},"ellipsis":{"path":"","height":"16","width":"12"},"eye":{"path":"","height":"16","width":"16"},"file":{"path":"","height":"16","width":"12"},"file-binary":{"path":"","height":"16","width":"12"},"file-code":{"path":"","height":"16","width":"12"},"file-directory":{"path":"","height":"16","width":"14"},"file-media":{"path":"","height":"16","width":"12"},"file-pdf":{"path":"","height":"16","width":"12"},"file-submodule":{"path":"","height":"16","width":"14"},"file-symlink-directory":{"path":"","height":"16","width":"14"},"file-symlink-file":{"path":"","height":"16","width":"12"},"file-text":{"path":"","height":"16","width":"12"},"file-zip":{"path":"","height":"16","width":"12"},"flame":{"path":"","height":"16","width":"12"},"fold":{"path":"","height":"16","width":"14"},"gear":{"path":"","height":"16","width":"14"},"gift":{"path":"","height":"16","width":"14"},"gist":{"path":"","height":"16","width":"12"},"gist-secret":{"path":"","height":"16","width":"14"},"git-branch":{"path":"","height":"16","width":"10"},"git-commit":{"path":"","height":"16","width":"14"},"git-compare":{"path":"","height":"16","width":"14"},"git-merge":{"path":"","height":"16","width":"12"},"git-pull-request":{"path":"","height":"16","width":"12"},"globe":{"path":"","height":"16","width":"14"},"grabber":{"path":"","height":"16","width":"8"},"graph":{"path":"","height":"16","width":"16"},"heart":{"path":"","height":"16","width":"12"},"history":{"path":"","height":"16","width":"14"},"home":{"path":"","height":"16","width":"16"},"horizontal-rule":{"path":"","height":"16","width":"10"},"hubot":{"path":"","height":"16","width":"14"},"inbox":{"path":"","height":"16","width":"14"},"info":{"path":"","height":"16","width":"14"},"issue-closed":{"path":"","height":"16","width":"16"},"issue-opened":{"path":"","height":"16","width":"14"},"issue-reopened":{"path":"","height":"16","width":"14"},"italic":{"path":"","height":"16","width":"6"},"jersey":{"path":"","height":"16","width":"14"},"key":{"path":"","height":"16","width":"14"},"keyboard":{"path":"","height":"16","width":"16"},"law":{"path":"","height":"16","width":"14"},"light-bulb":{"path":"","height":"16","width":"12"},"link":{"path":"","height":"16","width":"16"},"link-external":{"path":"","height":"16","width":"12"},"list-ordered":{"path":"","height":"16","width":"12"},"list-unordered":{"path":"","height":"16","width":"12"},"location":{"path":"","height":"16","width":"12"},"lock":{"path":"","height":"16","width":"12"},"logo-gist":{"path":"","height":"16","width":"25"},"logo-github":{"path":"","height":"16","width":"45"},"mail":{"path":"","height":"16","width":"14"},"mail-read":{"path":"","height":"16","width":"14"},"mail-reply":{"path":"","height":"16","width":"12"},"mark-github":{"path":"","height":"16","width":"16"},"markdown":{"path":"","height":"16","width":"16"},"megaphone":{"path":"","height":"16","width":"16"},"mention":{"path":"","height":"16","width":"14"},"milestone":{"path":"","height":"16","width":"14"},"mirror":{"path":"","height":"16","width":"16"},"mortar-board":{"path":"","height":"16","width":"16"},"mute":{"path":"","height":"16","width":"16"},"no-newline":{"path":"","height":"16","width":"16"},"note":{"path":"","height":"16","width":"14"},"octoface":{"path":"","height":"16","width":"16"},"organization":{"path":"","height":"16","width":"16"},"package":{"path":"","height":"16","width":"16"},"paintcan":{"path":"","height":"16","width":"12"},"pencil":{"path":"","height":"16","width":"14"},"person":{"path":"","height":"16","width":"12"},"pin":{"path":"","height":"16","width":"16"},"plug":{"path":"","height":"16","width":"14"},"plus":{"path":"","height":"16","width":"12"},"plus-small":{"path":"","height":"16","width":"7"},"primitive-dot":{"path":"","height":"16","width":"8"},"primitive-square":{"path":"","height":"16","width":"8"},"project":{"path":"","height":"16","width":"15"},"pulse":{"path":"","height":"16","width":"14"},"question":{"path":"","height":"16","width":"14"},"quote":{"path":"","height":"16","width":"14"},"radio-tower":{"path":"","height":"16","width":"16"},"reply":{"path":"","height":"16","width":"14"},"repo":{"path":"","height":"16","width":"12"},"repo-clone":{"path":"","height":"16","width":"16"},"repo-force-push":{"path":"","height":"16","width":"12"},"repo-forked":{"path":"","height":"16","width":"10"},"repo-pull":{"path":"","height":"16","width":"16"},"repo-push":{"path":"","height":"16","width":"12"},"rocket":{"path":"","height":"16","width":"16"},"rss":{"path":"","height":"16","width":"10"},"ruby":{"path":"","height":"16","width":"16"},"screen-full":{"path":"","height":"16","width":"14"},"screen-normal":{"path":"","height":"16","width":"14"},"search":{"path":"","height":"16","width":"16"},"server":{"path":"","height":"16","width":"12"},"settings":{"path":"","height":"16","width":"16"},"shield":{"path":"","height":"16","width":"14"},"sign-in":{"path":"","height":"16","width":"14"},"sign-out":{"path":"","height":"16","width":"16"},"smiley":{"path":"","height":"16","width":"16"},"squirrel":{"path":"","height":"16","width":"16"},"star":{"path":"","height":"16","width":"14"},"stop":{"path":"","height":"16","width":"14"},"sync":{"path":"","height":"16","width":"12"},"tag":{"path":"","height":"16","width":"14"},"tasklist":{"path":"","height":"16","width":"16"},"telescope":{"path":"","height":"16","width":"14"},"terminal":{"path":"","height":"16","width":"14"},"text-size":{"path":"","height":"16","width":"18"},"three-bars":{"path":"","height":"16","width":"12"},"thumbsdown":{"path":"","height":"16","width":"16"},"thumbsup":{"path":"","height":"16","width":"16"},"tools":{"path":"","height":"16","width":"16"},"trashcan":{"path":"","height":"16","width":"12"},"triangle-down":{"path":"","height":"16","width":"12"},"triangle-left":{"path":"","height":"16","width":"6"},"triangle-right":{"path":"","height":"16","width":"6"},"triangle-up":{"path":"","height":"16","width":"12"},"unfold":{"path":"","height":"16","width":"14"},"unmute":{"path":"","height":"16","width":"16"},"unverified":{"path":"","height":"16","width":"16"},"verified":{"path":"","height":"16","width":"16"},"versions":{"path":"","height":"16","width":"14"},"watch":{"path":"","height":"16","width":"12"},"x":{"path":"","height":"16","width":"12"},"zap":{"path":"","height":"16","width":"10"}}; - -var octicon; - -octicon = function(icon, height) { - var width; - icon = ("" + icon).toLowerCase().replace(/^octicon-/, ""); - if (!data[icon]) { - icon = "mark-github"; - } - width = height * data[icon].width / data[icon].height; - return "" + data[icon].path + ""; -}; - var render; -var renderAll; -var renderButton; -var renderCount; -var renderFrameContent; - -renderButton = function(options) { - var a, ariaLabel, span; - a = createElement("a"); - a.href = options.href; - if (!/\.github\.com$/.test("." + a.hostname)) { - a.href = "#"; - a.target = "_self"; - } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { - a.target = "_top"; - } - a.className = "btn"; - if (ariaLabel = options["aria-label"]) { - a.setAttribute("aria-label", ariaLabel); - } - a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); - a.appendChild(createTextNode(" ")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(options["data-text"] || "")); - return document.body.appendChild(a); -}; - -renderCount = function(button) { - var api, href, match, property; - if (button.hostname !== "github.com") { - return; - } - match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); - if (!(match && !match[6])) { - return; - } - if (match[2]) { - href = "/" + match[1] + "/" + match[2]; - api = "/repos" + href; - if (match[3]) { - property = "subscribers_count"; - href += "/watchers"; - } else if (match[4]) { - property = "forks_count"; - href += "/network"; - } else if (match[5]) { - property = "open_issues_count"; - href += "/issues"; - } else { - property = "stargazers_count"; - href += "/stargazers"; - } - } else { - api = "/users/" + match[1]; - property = "followers"; - href = "/" + match[1] + "/" + property; - } - jsonp("https://api.github.com/" + api, function(json) { - var a, data, span; - if (json.meta.status === 200) { - data = json.data[property]; - a = createElement("a"); - a.href = "https://github.com/" + href; - a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); - a.appendChild(createElement("b")); - a.appendChild(createElement("i")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); - button.parentNode.insertBefore(a, button.nextSibling); - } - }); -}; - -renderFrameContent = function(options) { - var button; - if (!options) { - return; - } - if (/^large$/i.test(options["data-size"])) { - document.body.className = "large"; - } - button = renderButton(options); - if (/^(true|1)$/i.test(options["data-show-count"])) { - renderCount(button); - } -}; - /* istanbul ignore next */ @@ -378,6 +237,7 @@ render = function(targetNode, options) { contentDocument.close(); }; +var renderAll; /* istanbul ignore next */ diff --git a/assets/js/app.min.js b/assets/js/app.min.js index dc16a3e9..b0eab32e 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var h,t,e,c=window.document,l=window.encodeURIComponent,i=window.Math,d=function(h){return c.createElement(h)},v=function(h){return c.createTextNode(h)},a=function(h){var t,e,c;e=[];for(t in h)null!=(c=h[t])&&e.push(l(t)+"="+l(c));return e.join("&")};h=function(h,t,e){h.addEventListener?h.addEventListener(""+t,e):h.attachEvent("on"+t,e)},t=function(t,e,c){var l;h(t,e,l=function(h){return t.removeEventListener?t.removeEventListener(""+e,l):t.detachEvent("on"+e,l),c(h)})},e=function(t,e){var c,l;l=0,h(t,"load",c=function(){!l&&(l=1)&&e()}),h(t,"error",c),h(t,"readystatechange",function(){/i/.test(t.readyState)||c()})};var o;o=function(h){var e,l;/m/.test(c.readyState)||!/g/.test(c.readyState)&&!c.documentElement.doScroll?window.setTimeout(h):c.addEventListener?(l=0,t(c,"DOMContentLoaded",e=function(){!l&&(l=1)&&h()}),t(window,"load",e)):(e=function(){/m/.test(c.readyState)&&(c.detachEvent("onreadystatechange",e),h())},c.attachEvent("onreadystatechange",e))};var n,r,z=function(h){var t;return((t=window.devicePixelRatio||1)>1?i.ceil(i.round(h*t)/t*2)/2:i.ceil(h))||0};n=function(h){var t,e,c,l,d,v;return c=h.contentWindow.document,d=c.documentElement,t=c.body,v=d.scrollWidth,l=d.scrollHeight,t.getBoundingClientRect&&(t.style.display="inline-block",e=t.getBoundingClientRect(),v=i.max(v,z(e.width||e.right-e.left)),l=i.max(l,z(e.height||e.bottom-e.top)),t.style.display=""),[v,l]},r=function(h,t){h.style.width=t[0]+"px",h.style.height=t[1]+"px"};var p,s,H,u;u="faa75404-3b97-5585-b449-4bc51338fbd1",p=(/^http:/.test(c.location)?"http":"https")+"://buttons.github.io/",H=function(h){p=h},s=!{}.hasOwnProperty.call(c,"currentScript")&&c.currentScript&&delete c.currentScript&&c.currentScript?c.currentScript.src:void 0;var V,m=function(h){var t,e,c,l,i,d;for(i={href:h.href,"aria-label":h.getAttribute("aria-label")},c=0,l=(d=["icon","text","size","show-count"]).length;c',height:"16",width:"16"},"arrow-down":{path:'',height:"16",width:"10"},"arrow-left":{path:'',height:"16",width:"10"},"arrow-right":{path:'',height:"16",width:"10"},"arrow-small-down":{path:'',height:"16",width:"6"},"arrow-small-left":{path:'',height:"16",width:"6"},"arrow-small-right":{path:'',height:"16",width:"6"},"arrow-small-up":{path:'',height:"16",width:"6"},"arrow-up":{path:'',height:"16",width:"10"},beaker:{path:'',height:"16",width:"16"},bell:{path:'',height:"16",width:"14"},bold:{path:'',height:"16",width:"10"},book:{path:'',height:"16",width:"16"},bookmark:{path:'',height:"16",width:"10"},briefcase:{path:'',height:"16",width:"14"},broadcast:{path:'',height:"16",width:"16"},browser:{path:'',height:"16",width:"14"},bug:{path:'',height:"16",width:"16"},calendar:{path:'',height:"16",width:"14"},check:{path:'',height:"16",width:"12"},checklist:{path:'',height:"16",width:"16"},"chevron-down":{path:'',height:"16",width:"10"},"chevron-left":{path:'',height:"16",width:"8"},"chevron-right":{path:'',height:"16",width:"8"},"chevron-up":{path:'',height:"16",width:"10"},"circle-slash":{path:'',height:"16",width:"14"},"circuit-board":{path:'',height:"16",width:"14"},clippy:{path:'',height:"16",width:"14"},clock:{path:'',height:"16",width:"14"},"cloud-download":{path:'',height:"16",width:"16"},"cloud-upload":{path:'',height:"16",width:"16"},code:{path:'',height:"16",width:"14"},comment:{path:'',height:"16",width:"16"},"comment-discussion":{path:'',height:"16",width:"16"},"credit-card":{path:'',height:"16",width:"16"},dash:{path:'',height:"16",width:"8"},dashboard:{path:'',height:"16",width:"16"},database:{path:'',height:"16",width:"12"},"desktop-download":{path:'',height:"16",width:"16"},"device-camera":{path:'',height:"16",width:"16"},"device-camera-video":{path:'',height:"16",width:"16"},"device-desktop":{path:'',height:"16",width:"16"},"device-mobile":{path:'',height:"16",width:"10"},diff:{path:'',height:"16",width:"13"},"diff-added":{path:'',height:"16",width:"14"},"diff-ignored":{path:'',height:"16",width:"14"},"diff-modified":{path:'',height:"16",width:"14"},"diff-removed":{path:'',height:"16",width:"14"},"diff-renamed":{path:'',height:"16",width:"14"},ellipses:{path:'',height:"16",width:"12"},ellipsis:{path:'',height:"16",width:"12"},eye:{path:'',height:"16",width:"16"},file:{path:'',height:"16",width:"12"},"file-binary":{path:'',height:"16",width:"12"},"file-code":{path:'',height:"16",width:"12"},"file-directory":{path:'',height:"16",width:"14"},"file-media":{path:'',height:"16",width:"12"},"file-pdf":{path:'',height:"16",width:"12"},"file-submodule":{path:'',height:"16",width:"14"},"file-symlink-directory":{path:'',height:"16",width:"14"},"file-symlink-file":{path:'',height:"16",width:"12"},"file-text":{path:'',height:"16",width:"12"},"file-zip":{path:'',height:"16",width:"12"},flame:{path:'',height:"16",width:"12"},fold:{path:'',height:"16",width:"14"},gear:{path:'',height:"16",width:"14"},gift:{path:'',height:"16",width:"14"},gist:{path:'',height:"16",width:"12"},"gist-secret":{path:'',height:"16",width:"14"},"git-branch":{path:'',height:"16",width:"10"},"git-commit":{path:'',height:"16",width:"14"},"git-compare":{path:'',height:"16",width:"14"},"git-merge":{path:'',height:"16",width:"12"},"git-pull-request":{path:'',height:"16",width:"12"},globe:{path:'',height:"16",width:"14"},grabber:{path:'',height:"16",width:"8"},graph:{path:'',height:"16",width:"16"},heart:{path:'',height:"16",width:"12"},history:{path:'',height:"16",width:"14"},home:{path:'',height:"16",width:"16"},"horizontal-rule":{path:'',height:"16",width:"10"},hubot:{path:'',height:"16",width:"14"},inbox:{path:'',height:"16",width:"14"},info:{path:'',height:"16",width:"14"},"issue-closed":{path:'',height:"16",width:"16"},"issue-opened":{path:'',height:"16",width:"14"},"issue-reopened":{path:'',height:"16",width:"14"},italic:{path:'',height:"16",width:"6"},jersey:{path:'',height:"16",width:"14"},key:{path:'',height:"16",width:"14"},keyboard:{path:'',height:"16",width:"16"},law:{path:'',height:"16",width:"14"},"light-bulb":{path:'',height:"16",width:"12"},link:{path:'',height:"16",width:"16"},"link-external":{path:'',height:"16",width:"12"},"list-ordered":{path:'',height:"16",width:"12"},"list-unordered":{path:'',height:"16",width:"12"},location:{path:'',height:"16",width:"12"},lock:{path:'',height:"16",width:"12"},"logo-gist":{path:'',height:"16",width:"25"},"logo-github":{path:'',height:"16",width:"45"},mail:{path:'',height:"16",width:"14"},"mail-read":{path:'',height:"16",width:"14"},"mail-reply":{path:'',height:"16",width:"12"},"mark-github":{path:'',height:"16",width:"16"},markdown:{path:'',height:"16",width:"16"},megaphone:{path:'',height:"16",width:"16"},mention:{path:'',height:"16",width:"14"},milestone:{path:'',height:"16",width:"14"},mirror:{path:'',height:"16",width:"16"},"mortar-board":{path:'',height:"16",width:"16"},mute:{path:'',height:"16",width:"16"},"no-newline":{path:'',height:"16",width:"16"},note:{path:'',height:"16",width:"14"},octoface:{path:'',height:"16",width:"16"},organization:{path:'',height:"16",width:"16"},package:{path:'',height:"16",width:"16"},paintcan:{path:'',height:"16",width:"12"},pencil:{path:'',height:"16",width:"14"},person:{path:'',height:"16",width:"12"},pin:{path:'',height:"16",width:"16"},plug:{path:'',height:"16",width:"14"},plus:{path:'',height:"16",width:"12"},"plus-small":{path:'',height:"16",width:"7"},"primitive-dot":{path:'',height:"16",width:"8"},"primitive-square":{path:'',height:"16",width:"8"},project:{path:'',height:"16",width:"15"},pulse:{path:'',height:"16",width:"14"},question:{path:'',height:"16",width:"14"},quote:{path:'',height:"16",width:"14"},"radio-tower":{path:'',height:"16",width:"16"},reply:{path:'',height:"16",width:"14"},repo:{path:'',height:"16",width:"12"},"repo-clone":{path:'',height:"16",width:"16"},"repo-force-push":{path:'',height:"16",width:"12"},"repo-forked":{path:'',height:"16",width:"10"},"repo-pull":{path:'',height:"16",width:"16"},"repo-push":{path:'',height:"16",width:"12"},rocket:{path:'',height:"16",width:"16"},rss:{path:'',height:"16",width:"10"},ruby:{path:'',height:"16",width:"16"},"screen-full":{path:'',height:"16",width:"14"},"screen-normal":{path:'',height:"16",width:"14"},search:{path:'',height:"16",width:"16"},server:{path:'',height:"16",width:"12"},settings:{path:'',height:"16",width:"16"},shield:{path:'',height:"16",width:"14"},"sign-in":{path:'',height:"16",width:"14"},"sign-out":{path:'',height:"16",width:"16"},smiley:{path:'',height:"16",width:"16"},squirrel:{path:'',height:"16",width:"16"},star:{path:'',height:"16",width:"14"},stop:{path:'',height:"16",width:"14"},sync:{path:'',height:"16",width:"12"},tag:{path:'',height:"16",width:"14"},tasklist:{path:'',height:"16",width:"16"},telescope:{path:'',height:"16",width:"14"},terminal:{path:'',height:"16",width:"14"},"text-size":{path:'',height:"16",width:"18"},"three-bars":{path:'',height:"16",width:"12"},thumbsdown:{path:'',height:"16",width:"16"},thumbsup:{path:'',height:"16",width:"16"},tools:{path:'',height:"16",width:"16"},trashcan:{path:'',height:"16",width:"12"},"triangle-down":{path:'',height:"16",width:"12"},"triangle-left":{path:'',height:"16",width:"6"},"triangle-right":{path:'',height:"16",width:"6"},"triangle-up":{path:'',height:"16",width:"12"},unfold:{path:'',height:"16",width:"14"},unmute:{path:'',height:"16",width:"16"},unverified:{path:'',height:"16",width:"16"},verified:{path:'',height:"16",width:"16"},versions:{path:'',height:"16",width:"14"},watch:{path:'',height:"16",width:"12"},x:{path:'',height:"16",width:"12"},zap:{path:'',height:"16",width:"10"}};f=function(h,t){return h=(""+h).toLowerCase().replace(/^octicon-/,""),M[h]||(h="mark-github"),'"};var g,w,L,C;L=function(h){var t,e;return t=d("a"),t.href=h.href,/\.github\.com$/.test("."+t.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(t.href)&&(t.target="_top"):(t.href="#",t.target="_self"),t.className="btn",(e=h["aria-label"])&&t.setAttribute("aria-label",e),t.innerHTML=f(h["data-icon"],/^large$/i.test(h["data-size"])?16:14),t.appendChild(v(" ")),t.appendChild(d("span")).appendChild(v(h["data-text"]||"")),c.body.appendChild(t)},C=function(h){var t,e,c,l;"github.com"===h.hostname&&(c=h.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!c[6]&&(c[2]?(t="/repos"+(e="/"+c[1]+"/"+c[2]),c[3]?(l="subscribers_count",e+="/watchers"):c[4]?(l="forks_count",e+="/network"):c[5]?(l="open_issues_count",e+="/issues"):(l="stargazers_count",e+="/stargazers")):(t="/users/"+c[1],l="followers",e="/"+c[1]+"/"+l),V("https://api.github.com/"+t,function(t){var c,i;200===t.meta.status&&(i=t.data[l],(c=d("a")).href="https://github.com/"+e,c.className="social-count",c.setAttribute("aria-label",i+" "+l.replace(/_count$/,"").replace("_"," ")+" on GitHub"),c.appendChild(d("b")),c.appendChild(d("i")),c.appendChild(d("span")).appendChild(v((""+i).replace(/\B(?=(\d{3})+(?!\d))/g,","))),h.parentNode.insertBefore(c,h.nextSibling))}))},g=function(h,l){var i,v,o,z,s,H,V;if(null==h)return w();null==l&&(l=m(h)),v="#"+a(l),o=d("iframe"),H={allowtransparency:!0,scrolling:"no",frameBorder:0};for(z in H)V=H[z],o.setAttribute(z,V);r(o,[1,0]),o.style.border="none",o.src="/service/javascript:0",c.body.appendChild(o),s=function(){var e;e=n(o),o.parentNode.removeChild(o),t(o,"load",function(){r(o,e)}),o.src=p+"buttons.html"+v,h.parentNode.replaceChild(o,h)},t(o,"load",function(){var h;(h=o.contentWindow._)?e(h.$,s):s()}),(i=o.contentWindow.document).open().write(''+u+'"); + contentDocument.close(); +}; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js new file mode 100644 index 00000000..3c58fc83 --- /dev/null +++ b/dist/buttons.esm.js @@ -0,0 +1,231 @@ +var document = window.document; + +var encodeURIComponent = window.encodeURIComponent; + + + +var Math = window.Math; + +var createElement = function(tag) { + return document.createElement(tag); +}; + +var baseURL; +var buttonClass; +var currentScript; +var currentScriptURL; +var setBaseURL; +var uuid; + +buttonClass = "github-button"; + +uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; + + +/* istanbul ignore next */ + +baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; + +setBaseURL = function(url) { + baseURL = url; +}; + +currentScript = "currentScript"; + + +/* istanbul ignore next */ + +currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; + +var parseOptions = function(anchor) { + var attribute, deprecate, i, len, options, ref; + options = { + "href": anchor.href, + "aria-label": anchor.getAttribute("aria-label") + }; + ref = ["icon", "text", "size", "show-count"]; + for (i = 0, len = ref.length; i < len; i++) { + attribute = ref[i]; + attribute = "data-" + attribute; + options[attribute] = anchor.getAttribute(attribute); + } + if (options["data-text"] == null) { + options["data-text"] = anchor.textContent || anchor.innerText; + } + deprecate = function(oldAttribute, newAttribute, newValue) { + if (anchor.getAttribute(oldAttribute)) { + options[newAttribute] = newValue; + window.console && window.console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); + } + }; + deprecate("data-count-api", "data-show-count", "true"); + deprecate("data-style", "data-size", "large"); + return options; +}; + +var stringifyQueryString = function(obj) { + var name, params, value; + params = []; + for (name in obj) { + value = obj[name]; + if (value != null) { + params.push((encodeURIComponent(name)) + "=" + (encodeURIComponent(value))); + } + } + return params.join("&"); +}; + +var onEvent; +var onceEvent; +var onceScriptLoad; + +onEvent = function(target, eventName, func) { + + /* istanbul ignore else: IE lt 9 */ + if (target.addEventListener) { + target.addEventListener("" + eventName, func); + } else { + target.attachEvent("on" + eventName, func); + } +}; + +onceEvent = function(target, eventName, func) { + var callback; + callback = function(event) { + + /* istanbul ignore else: IE lt 9 */ + if (target.removeEventListener) { + target.removeEventListener("" + eventName, callback); + } else { + target.detachEvent("on" + eventName, callback); + } + return func(event); + }; + onEvent(target, eventName, callback); +}; + +onceScriptLoad = function(script, func) { + var callback, token; + token = 0; + callback = function() { + if (!token && (token = 1)) { + func(); + } + }; + onEvent(script, "load", callback); + onEvent(script, "error", callback); + + /* istanbul ignore next: IE lt 9 */ + onEvent(script, "readystatechange", function() { + if (!/i/.test(script.readyState)) { + callback(); + } + }); +}; + +var ceilPixel = function(px) { + var devicePixelRatio; + devicePixelRatio = window.devicePixelRatio || 1; + return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; +}; + +var getFrameContentSize; +var setFrameSize; + +getFrameContentSize = function(iframe) { + var body, boundingClientRect, contentDocument, height, html, width; + contentDocument = iframe.contentWindow.document; + html = contentDocument.documentElement; + body = contentDocument.body; + width = html.scrollWidth; + height = html.scrollHeight; + if (body.getBoundingClientRect) { + body.style.display = "inline-block"; + boundingClientRect = body.getBoundingClientRect(); + width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); + height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); + body.style.display = ""; + } + return [width, height]; +}; + +setFrameSize = function(iframe, size) { + iframe.style.width = size[0] + "px"; + iframe.style.height = size[1] + "px"; +}; + +var renderAll; + +/* istanbul ignore next */ + +renderAll = function() { + var anchor, anchors, i, j, len, len1, ref; + anchors = []; + if (document.querySelectorAll) { + anchors = document.querySelectorAll("a." + buttonClass); + } else { + ref = document.getElementsByTagName("a"); + for (i = 0, len = ref.length; i < len; i++) { + anchor = ref[i]; + if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { + anchors.push(anchor); + } + } + } + for (j = 0, len1 = anchors.length; j < len1; j++) { + anchor = anchors[j]; + render(anchor); + } +}; + +var render; + +/* istanbul ignore next */ + +render = function(targetNode, options) { + var contentDocument, hash, iframe, name, onload, ref, value; + if (targetNode == null) { + return renderAll(); + } + if (options == null) { + options = parseOptions(targetNode); + } + hash = "#" + stringifyQueryString(options); + iframe = createElement("iframe"); + ref = { + allowtransparency: true, + scrolling: "no", + frameBorder: 0 + }; + for (name in ref) { + value = ref[name]; + iframe.setAttribute(name, value); + } + setFrameSize(iframe, [1, 0]); + iframe.style.border = "none"; + iframe.src = "javascript:0"; + document.body.appendChild(iframe); + onload = function() { + var size; + size = getFrameContentSize(iframe); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + setFrameSize(iframe, size); + }); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); + }; + onceEvent(iframe, "load", function() { + var callback; + if (callback = iframe.contentWindow._) { + onceScriptLoad(callback.$, onload); + } else { + onload(); + } + }); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); +}; + +export { render }; diff --git a/package.json b/package.json index c7304813..87af385e 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "email": "i@ntk.me", "url": "https://ntk.me/" }, - "main": "dist/buttons.js", + "main": "dist/buttons.common.js", + "module": "dist/buttons.esm.js", "typings": "dist/buttons.d.ts", "scripts": { "build": "npm run build:css && npm run build:js", diff --git a/rollup.config.js b/rollup.config.js index 862c547e..4706a6e6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -9,6 +9,14 @@ export default [ }, { entry: 'src/main.coffee', dest: 'dist/buttons.min.js' + }, { + entry: 'src/render.coffee', + format: 'es', + dest: 'dist/buttons.esm.js' + }, { + entry: 'src/render.coffee', + format: 'cjs', + dest: 'dist/buttons.common.js' }, { entry: 'src/app.coffee', dest: 'assets/js/app.js' From 8f3d1fe83d48cd4b269c47bb5f24677bf6a4bc5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 10 Aug 2017 06:37:50 -0700 Subject: [PATCH 0019/1193] Optimize code --- assets/js/app.js | 5 +++-- assets/js/app.min.js | 2 +- dist/buttons.common.js | 9 --------- dist/buttons.esm.js | 9 --------- dist/buttons.js | 5 +++-- dist/buttons.min.js | 2 +- src/app.coffee | 4 +++- src/config.coffee | 9 --------- src/current-script.coffee | 15 +++++++++++++++ src/main.coffee | 4 +++- test/unit/config.spec.coffee | 3 +-- test/unit/current-script.spec.coffee | 12 ++++++++++++ test/unit/jsonp.spec.coffee | 8 ++++---- 13 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 src/current-script.coffee create mode 100644 test/unit/current-script.spec.coffee diff --git a/assets/js/app.js b/assets/js/app.js index f4631e21..113d76bf 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -15,8 +15,6 @@ var createElement = function(tag) { var baseURL; var buttonClass; -var currentScript; -var currentScriptURL; var setBaseURL; var uuid; @@ -33,6 +31,9 @@ setBaseURL = function(url) { baseURL = url; }; +var currentScript; +var currentScriptURL; + currentScript = "currentScript"; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index b0eab32e..3006291a 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var t,e,n,o,s=window.document,r=window.encodeURIComponent,i=window.Math,u=function(t){return s.createElement(t)};o="faa75404-3b97-5585-b449-4bc51338fbd1",t=(/^http:/.test(s.location)?"http":"https")+"://buttons.github.io/",n=function(e){t=e},e=!{}.hasOwnProperty.call(s,"currentScript")&&s.currentScript&&delete s.currentScript&&s.currentScript?s.currentScript.src:void 0;var a,c,l,h=function(t){var e,n,o;n=[];for(e in t)null!=(o=t[e])&&n.push(r(e)+"="+r(o));return n.join("&")};a=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},c=function(t,e,n){var o;a(t,e,o=function(s){return t.removeEventListener?t.removeEventListener(""+e,o):t.detachEvent("on"+e,o),n(s)})},l=function(t,e){var n,o;o=0,a(t,"load",n=function(){!o&&(o=1)&&e()}),a(t,"error",n),a(t,"readystatechange",function(){/i/.test(t.readyState)||n()})};var d;d=function(t){var e,n;/m/.test(s.readyState)||!/g/.test(s.readyState)&&!s.documentElement.doScroll?window.setTimeout(t):s.addEventListener?(n=0,c(s,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),c(window,"load",e)):(e=function(){/m/.test(s.readyState)&&(s.detachEvent("onreadystatechange",e),t())},s.attachEvent("onreadystatechange",e))};var p,f,w=function(t){var e;return((e=window.devicePixelRatio||1)>1?i.ceil(i.round(t*e)/e*2)/2:i.ceil(t))||0};p=function(t){var e,n,o,s,r,u;return o=t.contentWindow.document,r=o.documentElement,e=o.body,u=r.scrollWidth,s=r.scrollHeight,e.getBoundingClientRect&&(e.style.display="inline-block",n=e.getBoundingClientRect(),u=i.max(u,w(n.width||n.right-n.left)),s=i.max(s,w(n.height||n.bottom-n.top)),e.style.display=""),[u,s]},f=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"};var m,g=function(t){var e,n,o,s,r,i;for(r={href:t.href,"aria-label":t.getAttribute("aria-label")},o=0,s=(i=["icon","text","size","show-count"]).length;o'+o+' @@ -14,18 +14,21 @@
-
@@ -121,11 +124,11 @@

Choose a button

Button options

-
+
- +
/
- +
From 2d9f236553b67868f2eb27fa5608d2839ac9e8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 14 Oct 2017 01:22:08 -0700 Subject: [PATCH 0028/1193] Update dependencies --- dist/buttons.common.js | 5 ----- dist/buttons.esm.js | 5 ----- dist/buttons.js | 2 +- dist/buttons.min.js | 2 +- package.json | 30 +++++++++++++++--------------- 5 files changed, 17 insertions(+), 27 deletions(-) diff --git a/dist/buttons.common.js b/dist/buttons.common.js index 841f2718..69c2cbfc 100644 --- a/dist/buttons.common.js +++ b/dist/buttons.common.js @@ -16,7 +16,6 @@ var createElement = function(tag) { var baseURL; var buttonClass; -var setBaseURL; var uuid; buttonClass = "github-button"; @@ -28,10 +27,6 @@ uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; -setBaseURL = function(url) { - baseURL = url; -}; - var parseOptions = function(anchor) { var attribute, deprecate, i, len, options, ref; options = { diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index d3a82920..631ae50d 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -12,7 +12,6 @@ var createElement = function(tag) { var baseURL; var buttonClass; -var setBaseURL; var uuid; buttonClass = "github-button"; @@ -24,10 +23,6 @@ uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; -setBaseURL = function(url) { - baseURL = url; -}; - var parseOptions = function(anchor) { var attribute, deprecate, i, len, options, ref; options = { diff --git a/dist/buttons.js b/dist/buttons.js index 45efcad1..834c192d 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -152,7 +152,7 @@ defer = function(func) { } }; -var data = {"alert":{"path":"","height":"16","width":"16"},"arrow-down":{"path":"","height":"16","width":"10"},"arrow-left":{"path":"","height":"16","width":"10"},"arrow-right":{"path":"","height":"16","width":"10"},"arrow-small-down":{"path":"","height":"16","width":"6"},"arrow-small-left":{"path":"","height":"16","width":"6"},"arrow-small-right":{"path":"","height":"16","width":"6"},"arrow-small-up":{"path":"","height":"16","width":"6"},"arrow-up":{"path":"","height":"16","width":"10"},"beaker":{"path":"","height":"16","width":"16"},"bell":{"path":"","height":"16","width":"14"},"bold":{"path":"","height":"16","width":"10"},"book":{"path":"","height":"16","width":"16"},"bookmark":{"path":"","height":"16","width":"10"},"briefcase":{"path":"","height":"16","width":"14"},"broadcast":{"path":"","height":"16","width":"16"},"browser":{"path":"","height":"16","width":"14"},"bug":{"path":"","height":"16","width":"16"},"calendar":{"path":"","height":"16","width":"14"},"check":{"path":"","height":"16","width":"12"},"checklist":{"path":"","height":"16","width":"16"},"chevron-down":{"path":"","height":"16","width":"10"},"chevron-left":{"path":"","height":"16","width":"8"},"chevron-right":{"path":"","height":"16","width":"8"},"chevron-up":{"path":"","height":"16","width":"10"},"circle-slash":{"path":"","height":"16","width":"14"},"circuit-board":{"path":"","height":"16","width":"14"},"clippy":{"path":"","height":"16","width":"14"},"clock":{"path":"","height":"16","width":"14"},"cloud-download":{"path":"","height":"16","width":"16"},"cloud-upload":{"path":"","height":"16","width":"16"},"code":{"path":"","height":"16","width":"14"},"comment":{"path":"","height":"16","width":"16"},"comment-discussion":{"path":"","height":"16","width":"16"},"credit-card":{"path":"","height":"16","width":"16"},"dash":{"path":"","height":"16","width":"8"},"dashboard":{"path":"","height":"16","width":"16"},"database":{"path":"","height":"16","width":"12"},"desktop-download":{"path":"","height":"16","width":"16"},"device-camera":{"path":"","height":"16","width":"16"},"device-camera-video":{"path":"","height":"16","width":"16"},"device-desktop":{"path":"","height":"16","width":"16"},"device-mobile":{"path":"","height":"16","width":"10"},"diff":{"path":"","height":"16","width":"13"},"diff-added":{"path":"","height":"16","width":"14"},"diff-ignored":{"path":"","height":"16","width":"14"},"diff-modified":{"path":"","height":"16","width":"14"},"diff-removed":{"path":"","height":"16","width":"14"},"diff-renamed":{"path":"","height":"16","width":"14"},"ellipsis":{"path":"","height":"16","width":"12"},"eye":{"path":"","height":"16","width":"16"},"file":{"path":"","height":"16","width":"12"},"file-binary":{"path":"","height":"16","width":"12"},"file-code":{"path":"","height":"16","width":"12"},"file-directory":{"path":"","height":"16","width":"14"},"file-media":{"path":"","height":"16","width":"12"},"file-pdf":{"path":"","height":"16","width":"12"},"file-submodule":{"path":"","height":"16","width":"14"},"file-symlink-directory":{"path":"","height":"16","width":"14"},"file-symlink-file":{"path":"","height":"16","width":"12"},"file-text":{"path":"","height":"16","width":"12"},"file-zip":{"path":"","height":"16","width":"12"},"flame":{"path":"","height":"16","width":"12"},"fold":{"path":"","height":"16","width":"14"},"gear":{"path":"","height":"16","width":"14"},"gift":{"path":"","height":"16","width":"14"},"gist":{"path":"","height":"16","width":"12"},"gist-secret":{"path":"","height":"16","width":"14"},"git-branch":{"path":"","height":"16","width":"10"},"git-commit":{"path":"","height":"16","width":"14"},"git-compare":{"path":"","height":"16","width":"14"},"git-merge":{"path":"","height":"16","width":"12"},"git-pull-request":{"path":"","height":"16","width":"12"},"globe":{"path":"","height":"16","width":"14"},"grabber":{"path":"","height":"16","width":"8"},"graph":{"path":"","height":"16","width":"16"},"heart":{"path":"","height":"16","width":"12"},"history":{"path":"","height":"16","width":"14"},"home":{"path":"","height":"16","width":"16"},"horizontal-rule":{"path":"","height":"16","width":"10"},"hubot":{"path":"","height":"16","width":"14"},"inbox":{"path":"","height":"16","width":"14"},"info":{"path":"","height":"16","width":"14"},"issue-closed":{"path":"","height":"16","width":"16"},"issue-opened":{"path":"","height":"16","width":"14"},"issue-reopened":{"path":"","height":"16","width":"14"},"italic":{"path":"","height":"16","width":"6"},"jersey":{"path":"","height":"16","width":"14"},"kebab-horizontal":{"path":"","height":"16","width":"13"},"kebab-vertical":{"path":"","height":"16","width":"3"},"key":{"path":"","height":"16","width":"14"},"keyboard":{"path":"","height":"16","width":"16"},"law":{"path":"","height":"16","width":"14"},"light-bulb":{"path":"","height":"16","width":"12"},"link":{"path":"","height":"16","width":"16"},"link-external":{"path":"","height":"16","width":"12"},"list-ordered":{"path":"","height":"16","width":"12"},"list-unordered":{"path":"","height":"16","width":"12"},"location":{"path":"","height":"16","width":"12"},"lock":{"path":"","height":"16","width":"12"},"logo-gist":{"path":"","height":"16","width":"25"},"logo-github":{"path":"","height":"16","width":"45"},"mail":{"path":"","height":"16","width":"14"},"mail-read":{"path":"","height":"16","width":"14"},"mail-reply":{"path":"","height":"16","width":"12"},"mark-github":{"path":"","height":"16","width":"16"},"markdown":{"path":"","height":"16","width":"16"},"megaphone":{"path":"","height":"16","width":"16"},"mention":{"path":"","height":"16","width":"14"},"milestone":{"path":"","height":"16","width":"14"},"mirror":{"path":"","height":"16","width":"16"},"mortar-board":{"path":"","height":"16","width":"16"},"mute":{"path":"","height":"16","width":"16"},"no-newline":{"path":"","height":"16","width":"16"},"note":{"path":"","height":"16","width":"14"},"octoface":{"path":"","height":"16","width":"16"},"organization":{"path":"","height":"16","width":"16"},"package":{"path":"","height":"16","width":"16"},"paintcan":{"path":"","height":"16","width":"12"},"pencil":{"path":"","height":"16","width":"14"},"person":{"path":"","height":"16","width":"12"},"pin":{"path":"","height":"16","width":"16"},"plug":{"path":"","height":"16","width":"14"},"plus":{"path":"","height":"16","width":"12"},"plus-small":{"path":"","height":"16","width":"7"},"primitive-dot":{"path":"","height":"16","width":"8"},"primitive-square":{"path":"","height":"16","width":"8"},"project":{"path":"","height":"16","width":"15"},"pulse":{"path":"","height":"16","width":"14"},"question":{"path":"","height":"16","width":"14"},"quote":{"path":"","height":"16","width":"14"},"radio-tower":{"path":"","height":"16","width":"16"},"reply":{"path":"","height":"16","width":"14"},"repo":{"path":"","height":"16","width":"12"},"repo-clone":{"path":"","height":"16","width":"16"},"repo-force-push":{"path":"","height":"16","width":"12"},"repo-forked":{"path":"","height":"16","width":"10"},"repo-pull":{"path":"","height":"16","width":"16"},"repo-push":{"path":"","height":"16","width":"12"},"rocket":{"path":"","height":"16","width":"16"},"rss":{"path":"","height":"16","width":"10"},"ruby":{"path":"","height":"16","width":"16"},"screen-full":{"path":"","height":"16","width":"14"},"screen-normal":{"path":"","height":"16","width":"14"},"search":{"path":"","height":"16","width":"16"},"server":{"path":"","height":"16","width":"12"},"settings":{"path":"","height":"16","width":"16"},"shield":{"path":"","height":"16","width":"14"},"sign-in":{"path":"","height":"16","width":"14"},"sign-out":{"path":"","height":"16","width":"16"},"smiley":{"path":"","height":"16","width":"16"},"squirrel":{"path":"","height":"16","width":"16"},"star":{"path":"","height":"16","width":"14"},"stop":{"path":"","height":"16","width":"14"},"sync":{"path":"","height":"16","width":"12"},"tag":{"path":"","height":"16","width":"14"},"tasklist":{"path":"","height":"16","width":"16"},"telescope":{"path":"","height":"16","width":"14"},"terminal":{"path":"","height":"16","width":"14"},"text-size":{"path":"","height":"16","width":"18"},"three-bars":{"path":"","height":"16","width":"12"},"thumbsdown":{"path":"","height":"16","width":"16"},"thumbsup":{"path":"","height":"16","width":"16"},"tools":{"path":"","height":"16","width":"16"},"trashcan":{"path":"","height":"16","width":"12"},"triangle-down":{"path":"","height":"16","width":"12"},"triangle-left":{"path":"","height":"16","width":"6"},"triangle-right":{"path":"","height":"16","width":"6"},"triangle-up":{"path":"","height":"16","width":"12"},"unfold":{"path":"","height":"16","width":"14"},"unmute":{"path":"","height":"16","width":"16"},"unverified":{"path":"","height":"16","width":"16"},"verified":{"path":"","height":"16","width":"16"},"versions":{"path":"","height":"16","width":"14"},"watch":{"path":"","height":"16","width":"12"},"x":{"path":"","height":"16","width":"12"},"zap":{"path":"","height":"16","width":"10"}}; +var data = {"alert":{"path":"","height":"16","width":"16"},"arrow-down":{"path":"","height":"16","width":"10"},"arrow-left":{"path":"","height":"16","width":"10"},"arrow-right":{"path":"","height":"16","width":"10"},"arrow-small-down":{"path":"","height":"16","width":"6"},"arrow-small-left":{"path":"","height":"16","width":"6"},"arrow-small-right":{"path":"","height":"16","width":"6"},"arrow-small-up":{"path":"","height":"16","width":"6"},"arrow-up":{"path":"","height":"16","width":"10"},"beaker":{"path":"","height":"16","width":"16"},"bell":{"path":"","height":"16","width":"14"},"bold":{"path":"","height":"16","width":"10"},"book":{"path":"","height":"16","width":"16"},"bookmark":{"path":"","height":"16","width":"10"},"briefcase":{"path":"","height":"16","width":"14"},"broadcast":{"path":"","height":"16","width":"16"},"browser":{"path":"","height":"16","width":"14"},"bug":{"path":"","height":"16","width":"16"},"calendar":{"path":"","height":"16","width":"14"},"check":{"path":"","height":"16","width":"12"},"checklist":{"path":"","height":"16","width":"16"},"chevron-down":{"path":"","height":"16","width":"10"},"chevron-left":{"path":"","height":"16","width":"8"},"chevron-right":{"path":"","height":"16","width":"8"},"chevron-up":{"path":"","height":"16","width":"10"},"circle-slash":{"path":"","height":"16","width":"14"},"circuit-board":{"path":"","height":"16","width":"14"},"clippy":{"path":"","height":"16","width":"14"},"clock":{"path":"","height":"16","width":"14"},"cloud-download":{"path":"","height":"16","width":"16"},"cloud-upload":{"path":"","height":"16","width":"16"},"code":{"path":"","height":"16","width":"14"},"comment":{"path":"","height":"16","width":"16"},"comment-discussion":{"path":"","height":"16","width":"16"},"credit-card":{"path":"","height":"16","width":"16"},"dash":{"path":"","height":"16","width":"8"},"dashboard":{"path":"","height":"16","width":"16"},"database":{"path":"","height":"16","width":"12"},"desktop-download":{"path":"","height":"16","width":"16"},"device-camera":{"path":"","height":"16","width":"16"},"device-camera-video":{"path":"","height":"16","width":"16"},"device-desktop":{"path":"","height":"16","width":"16"},"device-mobile":{"path":"","height":"16","width":"10"},"diff":{"path":"","height":"16","width":"13"},"diff-added":{"path":"","height":"16","width":"14"},"diff-ignored":{"path":"","height":"16","width":"14"},"diff-modified":{"path":"","height":"16","width":"14"},"diff-removed":{"path":"","height":"16","width":"14"},"diff-renamed":{"path":"","height":"16","width":"14"},"ellipsis":{"path":"","height":"16","width":"12"},"eye":{"path":"","height":"16","width":"16"},"file":{"path":"","height":"16","width":"12"},"file-binary":{"path":"","height":"16","width":"12"},"file-code":{"path":"","height":"16","width":"12"},"file-directory":{"path":"","height":"16","width":"14"},"file-media":{"path":"","height":"16","width":"12"},"file-pdf":{"path":"","height":"16","width":"12"},"file-submodule":{"path":"","height":"16","width":"14"},"file-symlink-directory":{"path":"","height":"16","width":"14"},"file-symlink-file":{"path":"","height":"16","width":"12"},"file-zip":{"path":"","height":"16","width":"12"},"flame":{"path":"","height":"16","width":"12"},"fold":{"path":"","height":"16","width":"14"},"gear":{"path":"","height":"16","width":"14"},"gift":{"path":"","height":"16","width":"14"},"gist":{"path":"","height":"16","width":"12"},"gist-secret":{"path":"","height":"16","width":"14"},"git-branch":{"path":"","height":"16","width":"10"},"git-commit":{"path":"","height":"16","width":"14"},"git-compare":{"path":"","height":"16","width":"14"},"git-merge":{"path":"","height":"16","width":"12"},"git-pull-request":{"path":"","height":"16","width":"12"},"globe":{"path":"","height":"16","width":"14"},"grabber":{"path":"","height":"16","width":"8"},"graph":{"path":"","height":"16","width":"16"},"heart":{"path":"","height":"16","width":"12"},"history":{"path":"","height":"16","width":"14"},"home":{"path":"","height":"16","width":"16"},"horizontal-rule":{"path":"","height":"16","width":"10"},"hubot":{"path":"","height":"16","width":"14"},"inbox":{"path":"","height":"16","width":"14"},"info":{"path":"","height":"16","width":"14"},"issue-closed":{"path":"","height":"16","width":"16"},"issue-opened":{"path":"","height":"16","width":"14"},"issue-reopened":{"path":"","height":"16","width":"14"},"italic":{"path":"","height":"16","width":"6"},"jersey":{"path":"","height":"16","width":"14"},"kebab-horizontal":{"path":"","height":"16","width":"13"},"kebab-vertical":{"path":"","height":"16","width":"3"},"key":{"path":"","height":"16","width":"14"},"keyboard":{"path":"","height":"16","width":"16"},"law":{"path":"","height":"16","width":"14"},"light-bulb":{"path":"","height":"16","width":"12"},"link":{"path":"","height":"16","width":"16"},"link-external":{"path":"","height":"16","width":"12"},"list-ordered":{"path":"","height":"16","width":"12"},"list-unordered":{"path":"","height":"16","width":"12"},"location":{"path":"","height":"16","width":"12"},"lock":{"path":"","height":"16","width":"12"},"logo-gist":{"path":"","height":"16","width":"25"},"logo-github":{"path":"","height":"16","width":"45"},"mail":{"path":"","height":"16","width":"14"},"mail-read":{"path":"","height":"16","width":"14"},"mark-github":{"path":"","height":"16","width":"16"},"markdown":{"path":"","height":"16","width":"16"},"megaphone":{"path":"","height":"16","width":"16"},"mention":{"path":"","height":"16","width":"14"},"milestone":{"path":"","height":"16","width":"14"},"mirror":{"path":"","height":"16","width":"16"},"mortar-board":{"path":"","height":"16","width":"16"},"mute":{"path":"","height":"16","width":"16"},"no-newline":{"path":"","height":"16","width":"16"},"note":{"path":"","height":"16","width":"14"},"octoface":{"path":"","height":"16","width":"16"},"organization":{"path":"","height":"16","width":"16"},"package":{"path":"","height":"16","width":"16"},"paintcan":{"path":"","height":"16","width":"12"},"pencil":{"path":"","height":"16","width":"14"},"person":{"path":"","height":"16","width":"12"},"pin":{"path":"","height":"16","width":"16"},"plug":{"path":"","height":"16","width":"14"},"plus":{"path":"","height":"16","width":"12"},"plus-small":{"path":"","height":"16","width":"7"},"primitive-dot":{"path":"","height":"16","width":"8"},"primitive-square":{"path":"","height":"16","width":"8"},"project":{"path":"","height":"16","width":"15"},"pulse":{"path":"","height":"16","width":"14"},"question":{"path":"","height":"16","width":"14"},"quote":{"path":"","height":"16","width":"14"},"radio-tower":{"path":"","height":"16","width":"16"},"reply":{"path":"","height":"16","width":"14"},"repo":{"path":"","height":"16","width":"12"},"repo-clone":{"path":"","height":"16","width":"16"},"repo-force-push":{"path":"","height":"16","width":"12"},"repo-forked":{"path":"","height":"16","width":"10"},"repo-pull":{"path":"","height":"16","width":"16"},"repo-push":{"path":"","height":"16","width":"12"},"rocket":{"path":"","height":"16","width":"16"},"rss":{"path":"","height":"16","width":"10"},"ruby":{"path":"","height":"16","width":"16"},"screen-full":{"path":"","height":"16","width":"14"},"screen-normal":{"path":"","height":"16","width":"14"},"search":{"path":"","height":"16","width":"16"},"server":{"path":"","height":"16","width":"12"},"settings":{"path":"","height":"16","width":"16"},"shield":{"path":"","height":"16","width":"14"},"sign-in":{"path":"","height":"16","width":"14"},"sign-out":{"path":"","height":"16","width":"16"},"smiley":{"path":"","height":"16","width":"16"},"squirrel":{"path":"","height":"16","width":"16"},"star":{"path":"","height":"16","width":"14"},"stop":{"path":"","height":"16","width":"14"},"sync":{"path":"","height":"16","width":"12"},"tag":{"path":"","height":"16","width":"14"},"tasklist":{"path":"","height":"16","width":"16"},"telescope":{"path":"","height":"16","width":"14"},"terminal":{"path":"","height":"16","width":"14"},"text-size":{"path":"","height":"16","width":"18"},"three-bars":{"path":"","height":"16","width":"12"},"thumbsdown":{"path":"","height":"16","width":"16"},"thumbsup":{"path":"","height":"16","width":"16"},"tools":{"path":"","height":"16","width":"16"},"trashcan":{"path":"","height":"16","width":"12"},"triangle-down":{"path":"","height":"16","width":"12"},"triangle-left":{"path":"","height":"16","width":"6"},"triangle-right":{"path":"","height":"16","width":"6"},"triangle-up":{"path":"","height":"16","width":"12"},"unfold":{"path":"","height":"16","width":"14"},"unmute":{"path":"","height":"16","width":"16"},"unverified":{"path":"","height":"16","width":"16"},"verified":{"path":"","height":"16","width":"16"},"versions":{"path":"","height":"16","width":"14"},"watch":{"path":"","height":"16","width":"12"},"x":{"path":"","height":"16","width":"12"},"zap":{"path":"","height":"16","width":"10"}}; var octicon; diff --git a/dist/buttons.min.js b/dist/buttons.min.js index 2a0eb143..a5ffe33d 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var h,e,t,l=window.document,c=window.encodeURIComponent,d=window.decodeURIComponent,v=window.Math,i=function(h){return l.createElement(h)},a=function(h){return l.createTextNode(h)};t="faa75404-3b97-5585-b449-4bc51338fbd1",h=(/^http:/.test(l.location)?"http":"https")+"://buttons.github.io/",e=function(e){h=e};var z;z=!{}.hasOwnProperty.call(l,"currentScript")&&l.currentScript&&delete l.currentScript&&l.currentScript?l.currentScript.src:void 0;var H,r,n,o=function(h){var e,t,l;t=[];for(e in h)null!=(l=h[e])&&t.push(c(e)+"="+c(l));return t.join("&")};H=function(h,e,t){h.addEventListener?h.addEventListener(""+e,t):h.attachEvent("on"+e,t)},r=function(h,e,t){var l;H(h,e,l=function(c){return h.removeEventListener?h.removeEventListener(""+e,l):h.detachEvent("on"+e,l),t(c)})},n=function(h,e){var t,l;l=0,H(h,"load",t=function(){!l&&(l=1)&&e()}),H(h,"error",t),H(h,"readystatechange",function(){/i/.test(h.readyState)||t()})};var p;p=function(h){var e,t;/m/.test(l.readyState)||!/g/.test(l.readyState)&&!l.documentElement.doScroll?window.setTimeout(h):l.addEventListener?(t=0,r(l,"DOMContentLoaded",e=function(){!t&&(t=1)&&h()}),r(window,"load",e)):(e=function(){/m/.test(l.readyState)&&(l.detachEvent("onreadystatechange",e),h())},l.attachEvent("onreadystatechange",e))};var V,m={alert:{path:'',height:"16",width:"16"},"arrow-down":{path:'',height:"16",width:"10"},"arrow-left":{path:'',height:"16",width:"10"},"arrow-right":{path:'',height:"16",width:"10"},"arrow-small-down":{path:'',height:"16",width:"6"},"arrow-small-left":{path:'',height:"16",width:"6"},"arrow-small-right":{path:'',height:"16",width:"6"},"arrow-small-up":{path:'',height:"16",width:"6"},"arrow-up":{path:'',height:"16",width:"10"},beaker:{path:'',height:"16",width:"16"},bell:{path:'',height:"16",width:"14"},bold:{path:'',height:"16",width:"10"},book:{path:'',height:"16",width:"16"},bookmark:{path:'',height:"16",width:"10"},briefcase:{path:'',height:"16",width:"14"},broadcast:{path:'',height:"16",width:"16"},browser:{path:'',height:"16",width:"14"},bug:{path:'',height:"16",width:"16"},calendar:{path:'',height:"16",width:"14"},check:{path:'',height:"16",width:"12"},checklist:{path:'',height:"16",width:"16"},"chevron-down":{path:'',height:"16",width:"10"},"chevron-left":{path:'',height:"16",width:"8"},"chevron-right":{path:'',height:"16",width:"8"},"chevron-up":{path:'',height:"16",width:"10"},"circle-slash":{path:'',height:"16",width:"14"},"circuit-board":{path:'',height:"16",width:"14"},clippy:{path:'',height:"16",width:"14"},clock:{path:'',height:"16",width:"14"},"cloud-download":{path:'',height:"16",width:"16"},"cloud-upload":{path:'',height:"16",width:"16"},code:{path:'',height:"16",width:"14"},comment:{path:'',height:"16",width:"16"},"comment-discussion":{path:'',height:"16",width:"16"},"credit-card":{path:'',height:"16",width:"16"},dash:{path:'',height:"16",width:"8"},dashboard:{path:'',height:"16",width:"16"},database:{path:'',height:"16",width:"12"},"desktop-download":{path:'',height:"16",width:"16"},"device-camera":{path:'',height:"16",width:"16"},"device-camera-video":{path:'',height:"16",width:"16"},"device-desktop":{path:'',height:"16",width:"16"},"device-mobile":{path:'',height:"16",width:"10"},diff:{path:'',height:"16",width:"13"},"diff-added":{path:'',height:"16",width:"14"},"diff-ignored":{path:'',height:"16",width:"14"},"diff-modified":{path:'',height:"16",width:"14"},"diff-removed":{path:'',height:"16",width:"14"},"diff-renamed":{path:'',height:"16",width:"14"},ellipsis:{path:'',height:"16",width:"12"},eye:{path:'',height:"16",width:"16"},file:{path:'',height:"16",width:"12"},"file-binary":{path:'',height:"16",width:"12"},"file-code":{path:'',height:"16",width:"12"},"file-directory":{path:'',height:"16",width:"14"},"file-media":{path:'',height:"16",width:"12"},"file-pdf":{path:'',height:"16",width:"12"},"file-submodule":{path:'',height:"16",width:"14"},"file-symlink-directory":{path:'',height:"16",width:"14"},"file-symlink-file":{path:'',height:"16",width:"12"},"file-text":{path:'',height:"16",width:"12"},"file-zip":{path:'',height:"16",width:"12"},flame:{path:'',height:"16",width:"12"},fold:{path:'',height:"16",width:"14"},gear:{path:'',height:"16",width:"14"},gift:{path:'',height:"16",width:"14"},gist:{path:'',height:"16",width:"12"},"gist-secret":{path:'',height:"16",width:"14"},"git-branch":{path:'',height:"16",width:"10"},"git-commit":{path:'',height:"16",width:"14"},"git-compare":{path:'',height:"16",width:"14"},"git-merge":{path:'',height:"16",width:"12"},"git-pull-request":{path:'',height:"16",width:"12"},globe:{path:'',height:"16",width:"14"},grabber:{path:'',height:"16",width:"8"},graph:{path:'',height:"16",width:"16"},heart:{path:'',height:"16",width:"12"},history:{path:'',height:"16",width:"14"},home:{path:'',height:"16",width:"16"},"horizontal-rule":{path:'',height:"16",width:"10"},hubot:{path:'',height:"16",width:"14"},inbox:{path:'',height:"16",width:"14"},info:{path:'',height:"16",width:"14"},"issue-closed":{path:'',height:"16",width:"16"},"issue-opened":{path:'',height:"16",width:"14"},"issue-reopened":{path:'',height:"16",width:"14"},italic:{path:'',height:"16",width:"6"},jersey:{path:'',height:"16",width:"14"},"kebab-horizontal":{path:'',height:"16",width:"13"},"kebab-vertical":{path:'',height:"16",width:"3"},key:{path:'',height:"16",width:"14"},keyboard:{path:'',height:"16",width:"16"},law:{path:'',height:"16",width:"14"},"light-bulb":{path:'',height:"16",width:"12"},link:{path:'',height:"16",width:"16"},"link-external":{path:'',height:"16",width:"12"},"list-ordered":{path:'',height:"16",width:"12"},"list-unordered":{path:'',height:"16",width:"12"},location:{path:'',height:"16",width:"12"},lock:{path:'',height:"16",width:"12"},"logo-gist":{path:'',height:"16",width:"25"},"logo-github":{path:'',height:"16",width:"45"},mail:{path:'',height:"16",width:"14"},"mail-read":{path:'',height:"16",width:"14"},"mail-reply":{path:'',height:"16",width:"12"},"mark-github":{path:'',height:"16",width:"16"},markdown:{path:'',height:"16",width:"16"},megaphone:{path:'',height:"16",width:"16"},mention:{path:'',height:"16",width:"14"},milestone:{path:'',height:"16",width:"14"},mirror:{path:'',height:"16",width:"16"},"mortar-board":{path:'',height:"16",width:"16"},mute:{path:'',height:"16",width:"16"},"no-newline":{path:'',height:"16",width:"16"},note:{path:'',height:"16",width:"14"},octoface:{path:'',height:"16",width:"16"},organization:{path:'',height:"16",width:"16"},package:{path:'',height:"16",width:"16"},paintcan:{path:'',height:"16",width:"12"},pencil:{path:'',height:"16",width:"14"},person:{path:'',height:"16",width:"12"},pin:{path:'',height:"16",width:"16"},plug:{path:'',height:"16",width:"14"},plus:{path:'',height:"16",width:"12"},"plus-small":{path:'',height:"16",width:"7"},"primitive-dot":{path:'',height:"16",width:"8"},"primitive-square":{path:'',height:"16",width:"8"},project:{path:'',height:"16",width:"15"},pulse:{path:'',height:"16",width:"14"},question:{path:'',height:"16",width:"14"},quote:{path:'',height:"16",width:"14"},"radio-tower":{path:'',height:"16",width:"16"},reply:{path:'',height:"16",width:"14"},repo:{path:'',height:"16",width:"12"},"repo-clone":{path:'',height:"16",width:"16"},"repo-force-push":{path:'',height:"16",width:"12"},"repo-forked":{path:'',height:"16",width:"10"},"repo-pull":{path:'',height:"16",width:"16"},"repo-push":{path:'',height:"16",width:"12"},rocket:{path:'',height:"16",width:"16"},rss:{path:'',height:"16",width:"10"},ruby:{path:'',height:"16",width:"16"},"screen-full":{path:'',height:"16",width:"14"},"screen-normal":{path:'',height:"16",width:"14"},search:{path:'',height:"16",width:"16"},server:{path:'',height:"16",width:"12"},settings:{path:'',height:"16",width:"16"},shield:{path:'',height:"16",width:"14"},"sign-in":{path:'',height:"16",width:"14"},"sign-out":{path:'',height:"16",width:"16"},smiley:{path:'',height:"16",width:"16"},squirrel:{path:'',height:"16",width:"16"},star:{path:'',height:"16",width:"14"},stop:{path:'',height:"16",width:"14"},sync:{path:'',height:"16",width:"12"},tag:{path:'',height:"16",width:"14"},tasklist:{path:'',height:"16",width:"16"},telescope:{path:'',height:"16",width:"14"},terminal:{path:'',height:"16",width:"14"},"text-size":{path:'',height:"16",width:"18"},"three-bars":{path:'',height:"16",width:"12"},thumbsdown:{path:'',height:"16",width:"16"},thumbsup:{path:'',height:"16",width:"16"},tools:{path:'',height:"16",width:"16"},trashcan:{path:'',height:"16",width:"12"},"triangle-down":{path:'',height:"16",width:"12"},"triangle-left":{path:'',height:"16",width:"6"},"triangle-right":{path:'',height:"16",width:"6"},"triangle-up":{path:'',height:"16",width:"12"},unfold:{path:'',height:"16",width:"14"},unmute:{path:'',height:"16",width:"16"},unverified:{path:'',height:"16",width:"16"},verified:{path:'',height:"16",width:"16"},versions:{path:'',height:"16",width:"14"},watch:{path:'',height:"16",width:"12"},x:{path:'',height:"16",width:"12"},zap:{path:'',height:"16",width:"10"}};V=function(h,e){return h=(""+h).toLowerCase().replace(/^octicon-/,""),m[h]||(h="mark-github"),'"};var M;M=function(h){var e,t;return e=i("a"),e.href=h.href,/\.github\.com$/.test("."+e.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(e.href)&&(e.target="_top"):(e.href="#",e.target="_self"),e.className="btn",(t=h["aria-label"])&&e.setAttribute("aria-label",t),e.innerHTML=V(h["data-icon"],/^large$/i.test(h["data-size"])?16:14),e.appendChild(a(" ")),e.appendChild(i("span")).appendChild(a(h["data-text"]||"")),l.body.appendChild(e)};var u;u=function(h,e){var t,c;(c=i("script")).async=!0,c.src=h+(/\?/.test(h)?"&":"?")+"callback=_",window._=function(h){window._=null,e(h)},window._.$=c,H(c,"error",function(){window._=null}),c.readyState&&H(c,"readystatechange",function(){"loaded"===c.readyState&&c.children&&"loading"===c.readyState&&(window._=null)}),t=l.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?p(function(){t.appendChild(c)}):t.appendChild(c)};var s;s=function(h){var e,t,l,c;"github.com"===h.hostname&&(l=h.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!l[6]&&(l[2]?(e="/repos"+(t="/"+l[1]+"/"+l[2]),l[3]?(c="subscribers_count",t+="/watchers"):l[4]?(c="forks_count",t+="/network"):l[5]?(c="open_issues_count",t+="/issues"):(c="stargazers_count",t+="/stargazers")):(e="/users/"+l[1],c="followers",t="/"+l[1]+"/"+c),u("https://api.github.com/"+e,function(e){var l,d;200===e.meta.status&&(d=e.data[c],(l=i("a")).href="https://github.com/"+t,l.className="social-count",l.setAttribute("aria-label",d+" "+c.replace(/_count$/,"").replace("_"," ")+" on GitHub"),l.appendChild(i("b")),l.appendChild(i("i")),l.appendChild(i("span")).appendChild(a((""+d).replace(/\B(?=(\d{3})+(?!\d))/g,","))),h.parentNode.insertBefore(l,h.nextSibling))}))};var f;f=function(h){var e;h&&(/^large$/i.test(h["data-size"])&&(l.body.className="large"),e=M(h),/^(true|1)$/i.test(h["data-show-count"])&&s(e))};var g,w,L=function(h){var e,t,l,c,d,v;for(d={href:h.href,"aria-label":h.getAttribute("aria-label")},l=0,c=(v=["icon","text","size","show-count"]).length;l1?v.ceil(v.round(h*e)/e*2)/2:v.ceil(h))||0};g=function(h){var e,t,l,c,d,i,a;return l=h.contentWindow.document,i=l.documentElement,e=l.body,a=i.scrollWidth,d=i.scrollHeight,e.getBoundingClientRect&&(c=e.style.display,e.style.display="inline-block",t=e.getBoundingClientRect(),a=v.max(a,C(t.width||t.right-t.left)),d=v.max(d,C(t.height||t.bottom-t.top)),e.style.display=c),[a,d]},w=function(h,e){h.style.width=e[0]+"px",h.style.height=e[1]+"px"};var b;b=function(){var h,e,t,c,d,v,i;if(e=[],l.querySelectorAll)e=l.querySelectorAll("a.github-button");else for(t=0,d=(i=l.getElementsByTagName("a")).length;t'+t+'', - focus: null, options: { type: null, user: '', @@ -342,13 +335,15 @@ defer(function() { }, watch: { 'options.type': function() { - if (document.activeElement !== this.$refs.user && document.activeElement !== this.$refs.repo) { - if (this.options.type === 'follow' || !this.successes.user || (this.successes.user && this.successes.repo)) { - this.focus = this.$refs.user; - } else { - this.focus = this.$refs.repo; + this.$nextTick(function() { + if (document.activeElement !== this.$refs.user && document.activeElement !== this.$refs.repo) { + if (this.options.type === 'follow' || !this.successes.user || (this.successes.user && this.successes.repo)) { + this.$refs.user.focus(); + } else { + this.$refs.repo.focus(); + } } - } + }); } }, computed: { @@ -488,6 +483,21 @@ defer(function() { })() }; } + }, + methods: { + paste: function() { + var ref, repo, user; + ref = this.options.user.split(/\/+/), user = ref[0], repo = ref[1]; + this.options.user = user; + if (repo != null) { + this.options.repo = repo; + } + if (this.options.user === '') { + this.$refs.user.focus(); + } else { + this.$refs.repo.focus(); + } + } } }); }); diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 6dc8726c..20bd8aad 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var t,e,n,o=window.document,s=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),i=function(t){return o.createElement(t)};n="faa75404-3b97-5585-b449-4bc51338fbd1",t=(/^http:/.test(o.location)?"http":"https")+"://buttons.github.io/",e=function(e){t=e};var u;u=!{}.hasOwnProperty.call(o,"currentScript")&&o.currentScript&&delete o.currentScript&&o.currentScript?o.currentScript.src:void 0;var a,c,l=function(t){var e,n,o;n=[];for(e in t)null!=(o=t[e])&&n.push(s(e)+"="+s(o));return n.join("&")};a=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},c=function(t,e,n){var o;a(t,e,o=function(s){return t.removeEventListener?t.removeEventListener(""+e,o):t.detachEvent("on"+e,o),n(s)})};var h;h=function(t){var e,n;/m/.test(o.readyState)||!/g/.test(o.readyState)&&!o.documentElement.doScroll?setTimeout(t):o.addEventListener?(n=0,c(o,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),c(window,"load",e)):(e=function(){/m/.test(o.readyState)&&(o.detachEvent("onreadystatechange",e),t())},o.attachEvent("onreadystatechange",e))};var d,p,f=function(t){var e;return((e=window.devicePixelRatio||1)>1?r.ceil(r.round(t*e)/e*2)/2:r.ceil(t))||0};d=function(t){var e,n,o,s,i,u,a;return o=t.contentWindow.document,u=o.documentElement,e=o.body,a=u.scrollWidth,i=u.scrollHeight,e.getBoundingClientRect&&(s=e.style.display,e.style.display="inline-block",n=e.getBoundingClientRect(),a=r.max(a,f(n.width||n.right-n.left)),i=r.max(i,f(n.height||n.bottom-n.top)),e.style.display=s),[a,i]},p=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"};var w,m=function(t){var e,n,o,s,r,i;for(r={href:t.href,"aria-label":t.getAttribute("aria-label")},o=0,s=(i=["icon","text","size","show-count"]).length;o'+n+'' - focus: null options: type: null user: '' @@ -100,12 +94,14 @@ defer -> standardIcon: false watch: 'options.type': -> - if document.activeElement isnt @$refs.user and document.activeElement isnt @$refs.repo - if @options.type is 'follow' or not @successes.user or - (@successes.user and @successes.repo) - @focus = @$refs.user - else - @focus = @$refs.repo + @$nextTick -> + if document.activeElement isnt @$refs.user and document.activeElement isnt @$refs.repo + if @options.type is 'follow' or not @successes.user or + (@successes.user and @successes.repo) + @$refs.user.focus() + else + @$refs.repo.focus() + return return computed: code: -> @@ -201,4 +197,14 @@ defer -> return (options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase()) + ' ' + options.user + '/' + options.repo + ' on GitHub' else return 'GitHub' + methods: + paste: -> + [user, repo] = @options.user.split /\/+/ + @options.user = user + @options.repo = repo if repo? + if @options.user is '' + @$refs.user.focus() + else + @$refs.repo.focus() + return return From 4e3ef3070c9f69e3736925ad8bd14dd92b89c816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 17 Dec 2017 01:41:49 -0800 Subject: [PATCH 0036/1193] Improve paste handling --- assets/js/app.js | 25 +++++++++++++------------ assets/js/app.min.js | 2 +- index.html | 2 +- src/app.coffee | 18 ++++++++++-------- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 50713fef..448d1f5a 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -485,18 +485,19 @@ defer(function() { } }, methods: { - paste: function() { - var ref, repo, user; - ref = this.options.user.split(/\/+/), user = ref[0], repo = ref[1]; - this.options.user = user; - if (repo != null) { - this.options.repo = repo; - } - if (this.options.user === '') { - this.$refs.user.focus(); - } else { - this.$refs.repo.focus(); - } + onPaste: function() { + this.$nextTick(function() { + var ref, repo, user; + ref = this.options.user.replace(/^\s+/g, '').replace(/\/+/, '/').replace(/^\//, '').split('/'), user = ref[0], repo = ref[1]; + this.options.user = user; + if (repo != null) { + this.options.repo = repo; + if (this.options.user !== '') { + this.$refs.repo.focus(); + this.$refs.repo.selectionStart = this.$refs.repo.selectionEnd = this.options.repo.length; + } + } + }); } } }); diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 20bd8aad..c5d98e6a 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var t,e,n,o=window.document,s=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),i=function(t){return o.createElement(t)};n="faa75404-3b97-5585-b449-4bc51338fbd1",t=(/^http:/.test(o.location)?"http":"https")+"://buttons.github.io/",e=function(e){t=e};var u;u=!{}.hasOwnProperty.call(o,"currentScript")&&o.currentScript&&delete o.currentScript&&o.currentScript?o.currentScript.src:void 0;var a,c,l=function(t){var e,n,o;n=[];for(e in t)null!=(o=t[e])&&n.push(s(e)+"="+s(o));return n.join("&")};a=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},c=function(t,e,n){var o;a(t,e,o=function(s){return t.removeEventListener?t.removeEventListener(""+e,o):t.detachEvent("on"+e,o),n(s)})};var h;h=function(t){var e,n;/m/.test(o.readyState)||!/g/.test(o.readyState)&&!o.documentElement.doScroll?setTimeout(t):o.addEventListener?(n=0,c(o,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),c(window,"load",e)):(e=function(){/m/.test(o.readyState)&&(o.detachEvent("onreadystatechange",e),t())},o.attachEvent("onreadystatechange",e))};var d,p,f=function(t){var e;return((e=window.devicePixelRatio||1)>1?r.ceil(r.round(t*e)/e*2)/2:r.ceil(t))||0};d=function(t){var e,n,o,s,i,u,a;return o=t.contentWindow.document,u=o.documentElement,e=o.body,a=u.scrollWidth,i=u.scrollHeight,e.getBoundingClientRect&&(s=e.style.display,e.style.display="inline-block",n=e.getBoundingClientRect(),a=r.max(a,f(n.width||n.right-n.left)),i=r.max(i,f(n.height||n.bottom-n.top)),e.style.display=s),[a,i]},p=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"};var m,w=function(t){var e,n,o,s,r,i;for(r={href:t.href,"aria-label":t.getAttribute("aria-label")},o=0,s=(i=["icon","text","size","show-count"]).length;o'+n+' @@ -127,7 +127,9 @@

Button options

-
/
+
+ / +
From 91c250c8f393de0a855a7bdffa1f67f8ad3d159f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Mon, 5 Mar 2018 19:46:31 -0800 Subject: [PATCH 0052/1193] Document `title` option --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6de34d81..10a64952 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ The easiest way to get started is to use the **[github:button generator](https:/ `. | | `data-icon` | Octicon for the button. `octicon-mark-github`.
Available icons can be found at [Octicons](https://octicons.github.com). | | `data-size` | _None_ by default or `large`. | | `data-show-count` | `false` by default or `true`. The dynamic count is generated based on detected button type. | From e82ea87b05bc1c8703b670b74be358388749c79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Tue, 3 Apr 2018 22:05:47 -0700 Subject: [PATCH 0053/1193] Update dependencies --- assets/js/app.js | 885 +++++----- dist/buttons.common.js | 15 +- dist/buttons.esm.js | 16 +- dist/buttons.js | 762 ++++---- dist/buttons.min.js | 2 +- karma.conf.js | 1 + package-lock.json | 3758 ++++++++++++++++++++++++++++++---------- package.json | 24 +- 8 files changed, 3683 insertions(+), 1780 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 0d5182c4..64ac02be 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -1,509 +1,506 @@ (function () { -'use strict'; + 'use strict'; -var document = window.document; + var document = window.document; -var encodeURIComponent = window.encodeURIComponent; + var encodeURIComponent = window.encodeURIComponent; -var decodeURIComponent = window.decodeURIComponent; + var decodeURIComponent = window.decodeURIComponent; -var Math = window.Math; + var Math = window.Math; -var createElement = function(tag) { - return document.createElement(tag); -}; + var createElement = function(tag) { + return document.createElement(tag); + }; -var baseURL; -var buttonClass; -var setBaseURL; -var uuid; + var baseURL, buttonClass, setBaseURL, uuid; -buttonClass = "github-button"; + buttonClass = "github-button"; -uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; + uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; -/* istanbul ignore next */ + /* istanbul ignore next */ -baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; + baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; -setBaseURL = function(url) { - baseURL = url; -}; + setBaseURL = function(url) { + baseURL = url; + }; -var currentScript; -var currentScriptURL; + var currentScript, currentScriptURL; -currentScript = "currentScript"; + currentScript = "currentScript"; -/* istanbul ignore next */ + /* istanbul ignore next */ -currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; + currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; -var stringifyQueryString = function(obj) { - var name, params, value; - params = []; - for (name in obj) { - value = obj[name]; - if (value != null) { - params.push((encodeURIComponent(name)) + "=" + (encodeURIComponent(value))); + var stringifyQueryString = function(obj) { + var name, params, value; + params = []; + for (name in obj) { + value = obj[name]; + if (value != null) { + params.push((encodeURIComponent(name)) + "=" + (encodeURIComponent(value))); + } } - } - return params.join("&"); -}; - -var onEvent; -var onceEvent; - -onEvent = function(target, eventName, func) { + return params.join("&"); + }; - /* istanbul ignore else: IE lt 9 */ - if (target.addEventListener) { - target.addEventListener("" + eventName, func); - } else { - target.attachEvent("on" + eventName, func); - } -}; + var onEvent, onceEvent; -onceEvent = function(target, eventName, func) { - var callback; - callback = function(event) { + onEvent = function(target, eventName, func) { /* istanbul ignore else: IE lt 9 */ - if (target.removeEventListener) { - target.removeEventListener("" + eventName, callback); + if (target.addEventListener) { + target.addEventListener("" + eventName, func); } else { - target.detachEvent("on" + eventName, callback); + target.attachEvent("on" + eventName, func); } - return func(event); }; - onEvent(target, eventName, callback); -}; - -var defer; - -/* istanbul ignore next */ - -defer = function(func) { - var callback, onceToken; - if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { - setTimeout(func); - } else { - if (document.addEventListener) { - onceToken = 0; - callback = function() { - if (!onceToken && (onceToken = 1)) { - func(); - } - }; - onceEvent(document, "DOMContentLoaded", callback); - onceEvent(window, "load", callback); + + onceEvent = function(target, eventName, func) { + var callback; + callback = function(event) { + + /* istanbul ignore else: IE lt 9 */ + if (target.removeEventListener) { + target.removeEventListener("" + eventName, callback); + } else { + target.detachEvent("on" + eventName, callback); + } + return func(event); + }; + onEvent(target, eventName, callback); + }; + + var defer; + + + /* istanbul ignore next */ + + defer = function(func) { + var callback, onceToken; + if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { + setTimeout(func); } else { - callback = function() { - if (/m/.test(document.readyState)) { - document.detachEvent("onreadystatechange", callback); - func(); - } - }; - document.attachEvent("onreadystatechange", callback); + if (document.addEventListener) { + onceToken = 0; + callback = function() { + if (!onceToken && (onceToken = 1)) { + func(); + } + }; + onceEvent(document, "DOMContentLoaded", callback); + onceEvent(window, "load", callback); + } else { + callback = function() { + if (/m/.test(document.readyState)) { + document.detachEvent("onreadystatechange", callback); + func(); + } + }; + document.attachEvent("onreadystatechange", callback); + } } - } -}; - -var ceilPixel; -var devicePixelRatio; - -/* istanbul ignore next */ - -devicePixelRatio = window.devicePixelRatio || 1; - -ceilPixel = function(px) { - return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; -}; - -var getFrameContentSize; -var setFrameSize; - -getFrameContentSize = function(iframe) { - var body, boundingClientRect, contentDocument, display, height, html, width; - contentDocument = iframe.contentWindow.document; - html = contentDocument.documentElement; - body = contentDocument.body; - width = html.scrollWidth; - height = html.scrollHeight; - if (body.getBoundingClientRect) { - display = body.style.display; - body.style.display = "inline-block"; - boundingClientRect = body.getBoundingClientRect(); - width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); - height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); - body.style.display = display; - } - return [width, height]; -}; - -setFrameSize = function(iframe, size) { - iframe.style.width = size[0] + "px"; - iframe.style.height = size[1] + "px"; -}; - -var parseOptions = function(anchor) { - var attribute, deprecate, i, len, options, ref; - options = { - "href": anchor.href, - "title": anchor.title, - "aria-label": anchor.getAttribute("aria-label") }; - ref = ["icon", "text", "size", "show-count"]; - for (i = 0, len = ref.length; i < len; i++) { - attribute = ref[i]; - attribute = "data-" + attribute; - options[attribute] = anchor.getAttribute(attribute); - } - if (options["data-text"] == null) { - options["data-text"] = anchor.textContent || anchor.innerText; - } - deprecate = function(oldAttribute, newAttribute, newValue) { - if (anchor.getAttribute(oldAttribute)) { - options[newAttribute] = newValue; - window.console && console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); - } + + var ceilPixel, devicePixelRatio; + + + /* istanbul ignore next */ + + devicePixelRatio = window.devicePixelRatio || 1; + + ceilPixel = function(px) { + return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; }; - deprecate("data-count-api", "data-show-count", "true"); - deprecate("data-style", "data-size", "large"); - return options; -}; -var render; + var getFrameContentSize, setFrameSize; + + getFrameContentSize = function(iframe) { + var body, boundingClientRect, contentDocument, display, height, html, width; + contentDocument = iframe.contentWindow.document; + html = contentDocument.documentElement; + body = contentDocument.body; + width = html.scrollWidth; + height = html.scrollHeight; + if (body.getBoundingClientRect) { + display = body.style.display; + body.style.display = "inline-block"; + boundingClientRect = body.getBoundingClientRect(); + width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); + height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); + body.style.display = display; + } + return [width, height]; + }; -/* istanbul ignore next */ + setFrameSize = function(iframe, size) { + iframe.style.width = size[0] + "px"; + iframe.style.height = size[1] + "px"; + }; -render = function(targetNode, options) { - var contentDocument, hash, iframe, name, onload, ref, title, value; - if (targetNode == null) { - return renderAll(); - } - if (options == null) { - options = parseOptions(targetNode); - } - hash = "#" + stringifyQueryString(options); - iframe = createElement("iframe"); - ref = { - allowtransparency: true, - scrolling: "no", - frameBorder: 0 + var parseOptions = function(anchor) { + var attribute, deprecate, i, len, options, ref; + options = { + "href": anchor.href, + "title": anchor.title, + "aria-label": anchor.getAttribute("aria-label") + }; + ref = ["icon", "text", "size", "show-count"]; + for (i = 0, len = ref.length; i < len; i++) { + attribute = ref[i]; + attribute = "data-" + attribute; + options[attribute] = anchor.getAttribute(attribute); + } + if (options["data-text"] == null) { + options["data-text"] = anchor.textContent || anchor.innerText; + } + deprecate = function(oldAttribute, newAttribute, newValue) { + if (anchor.getAttribute(oldAttribute)) { + options[newAttribute] = newValue; + window.console && console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); + } + }; + deprecate("data-count-api", "data-show-count", "true"); + deprecate("data-style", "data-size", "large"); + return options; }; - for (name in ref) { - value = ref[name]; - iframe.setAttribute(name, value); - } - setFrameSize(iframe, [1, 0]); - iframe.style.border = "none"; - iframe.src = "javascript:0"; - if (title = options.title) { - iframe.title = title; - } - document.body.appendChild(iframe); - onload = function() { - var size; - size = getFrameContentSize(iframe); - iframe.parentNode.removeChild(iframe); + + var render; + + + /* istanbul ignore next */ + + render = function(targetNode, options) { + var contentDocument, hash, iframe, name, onload, ref, title, value; + if (targetNode == null) { + return renderAll(); + } + if (options == null) { + options = parseOptions(targetNode); + } + hash = "#" + stringifyQueryString(options); + iframe = createElement("iframe"); + ref = { + allowtransparency: true, + scrolling: "no", + frameBorder: 0 + }; + for (name in ref) { + value = ref[name]; + iframe.setAttribute(name, value); + } + setFrameSize(iframe, [1, 0]); + iframe.style.border = "none"; + iframe.src = "javascript:0"; + if (title = options.title) { + iframe.title = title; + } + document.body.appendChild(iframe); + onload = function() { + var size; + size = getFrameContentSize(iframe); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + setFrameSize(iframe, size); + }); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); + }; onceEvent(iframe, "load", function() { - setFrameSize(iframe, size); + var contentWindow; + contentWindow = iframe.contentWindow; + if (contentWindow.$) { + contentWindow.$ = onload; + } else { + onload(); + } }); - iframe.src = baseURL + "buttons.html" + hash; - targetNode.parentNode.replaceChild(iframe, targetNode); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); }; - onceEvent(iframe, "load", function() { - var contentWindow; - contentWindow = iframe.contentWindow; - if (contentWindow.$) { - contentWindow.$ = onload; + + var renderAll; + + + /* istanbul ignore next */ + + renderAll = function() { + var anchor, anchors, i, j, len, len1, ref; + anchors = []; + if (document.querySelectorAll) { + anchors = document.querySelectorAll("a." + buttonClass); } else { - onload(); - } - }); - contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); - contentDocument.close(); -}; - -var renderAll; - -/* istanbul ignore next */ - -renderAll = function() { - var anchor, anchors, i, j, len, len1, ref; - anchors = []; - if (document.querySelectorAll) { - anchors = document.querySelectorAll("a." + buttonClass); - } else { - ref = document.getElementsByTagName("a"); - for (i = 0, len = ref.length; i < len; i++) { - anchor = ref[i]; - if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { - anchors.push(anchor); + ref = document.getElementsByTagName("a"); + for (i = 0, len = ref.length; i < len; i++) { + anchor = ref[i]; + if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { + anchors.push(anchor); + } } } + for (j = 0, len1 = anchors.length; j < len1; j++) { + anchor = anchors[j]; + render(anchor); + } + }; + + if (currentScriptURL) { + setBaseURL(currentScriptURL.replace(/[^\/]*\/[^\/]*\/[^\/]*([?#].*)?$/, '')); } - for (j = 0, len1 = anchors.length; j < len1; j++) { - anchor = anchors[j]; - render(anchor); - } -}; - -if (currentScriptURL) { - setBaseURL(currentScriptURL.replace(/[^\/]*\/[^\/]*\/[^\/]*([?#].*)?$/, '')); -} - -window.onbeforeunload = function() {}; - -defer(function() { - Vue.component('github-button-preview', { - template: '#github-button-preview-template', - props: ['config'], - data: function() { - return { - timeoutId: null - }; - }, - computed: { - rateLimitWait: function() { - if (this.config['data-show-count']) { - return 300; - } else { - return 0; - } - } - }, - mounted: function() { - var iframe, onload; - iframe = this.$el.firstChild; - onload = function() { - setFrameSize(iframe, getFrameContentSize(iframe)); - }; - onEvent(iframe, 'load', function() { - var contentWindow; - contentWindow = iframe.contentWindow; - if (contentWindow.$) { - contentWindow.$ = onload; - } else { - onload(); + + window.onbeforeunload = function() {}; + + defer(function() { + Vue.component('github-button-preview', { + template: '#github-button-preview-template', + props: ['config'], + data: function() { + return { + timeoutId: null + }; + }, + computed: { + rateLimitWait: function() { + if (this.config['data-show-count']) { + return 300; + } else { + return 0; + } } - }); - this.update(); - }, - updated: function() { - this.update(); - }, - methods: { - update: function() { - var iframe; + }, + mounted: function() { + var iframe, onload; iframe = this.$el.firstChild; - setFrameSize(iframe, [1, 0]); - clearTimeout(this.timeoutId); - this.timeoutId = setTimeout((function(_this) { - return function() { - iframe = _this.$el.removeChild(iframe); - iframe.src = 'buttons.html#' + stringifyQueryString(_this.config); - _this.$el.appendChild(iframe); - }; - })(this), this.rateLimitWait); - } - } - }); - Vue.component('github-button-code', { - template: '#github-button-code-template', - props: ['text'] - }); - new Vue({ - el: '#app', - template: '#app-template', - mounted: function() { - setTimeout(renderAll); - }, - data: function() { - return { - script: '\n', - options: { - type: null, - user: '', - repo: '', - largeButton: false, - showCount: false, - standardIcon: false - } - }; - }, - watch: { - 'options.type': function() { - this.$nextTick(function() { - if (document.activeElement !== this.$refs.user && document.activeElement !== this.$refs.repo) { - if (this.options.type === 'follow' || !this.successes.user || (this.successes.user && this.successes.repo)) { - this.$refs.user.focus(); - } else { - this.$refs.repo.focus(); - } + onload = function() { + setFrameSize(iframe, getFrameContentSize(iframe)); + }; + onEvent(iframe, 'load', function() { + var contentWindow; + contentWindow = iframe.contentWindow; + if (contentWindow.$) { + contentWindow.$ = onload; + } else { + onload(); } }); - } - }, - computed: { - code: function() { - var a, name, ref, value; - a = createElement('a'); - a.className = 'github-button'; - a.href = this.config.href; - a.textContent = this.config['data-text']; - ref = this.config; - for (name in ref) { - value = ref[name]; - if (name !== 'href' && name !== 'data-text' && (value != null)) { - a.setAttribute(name, value); - } - } - return '\n' + a.outerHTML; + this.update(); }, - successes: function() { - return { - user: (function(user) { - return 0 < user.length && user.length < 40 && !/[^A-Za-z0-9-]|^-|-$|--/i.test(user); - })(this.options.user), - repo: (function(repo) { - return 0 < repo.length && repo.length < 101 && !/[^\w-.]|\.git$|^\.\.?$/i.test(repo); - })(this.options.repo) - }; + updated: function() { + this.update(); }, - hasSuccess: function() { - if (this.options.type === 'follow') { - return this.successes.user; - } else { - return this.successes.user && this.successes.repo; + methods: { + update: function() { + var iframe; + iframe = this.$el.firstChild; + setFrameSize(iframe, [1, 0]); + clearTimeout(this.timeoutId); + this.timeoutId = setTimeout((function(_this) { + return function() { + iframe = _this.$el.removeChild(iframe); + iframe.src = 'buttons.html#' + stringifyQueryString(_this.config); + _this.$el.appendChild(iframe); + }; + })(this), this.rateLimitWait); } + } + }); + Vue.component('github-button-code', { + template: '#github-button-code-template', + props: ['text'] + }); + new Vue({ + el: '#app', + template: '#app-template', + mounted: function() { + setTimeout(renderAll); }, - dangers: function() { + data: function() { return { - user: this.options.user !== '' && !this.successes.user, - repo: this.options.type !== 'follow' && this.options.repo !== '' && !this.successes.repo + script: '\n', + options: { + type: null, + user: '', + repo: '', + largeButton: false, + showCount: false, + standardIcon: false + } }; }, - hasDanger: function() { - return this.dangers.user || this.dangers.repo; - }, - config: function() { - var options; - if (this.options.type == null) { - return; - } - options = { - type: this.options.type, - user: this.hasSuccess ? this.options.user : 'ntkme', - repo: this.hasSuccess ? this.options.repo : 'github-buttons', - largeButton: this.options.largeButton, - showCount: this.options.showCount, - standardIcon: this.options.standardIcon - }; - return { - href: (function() { - var base, repo, user; - base = 'https://github.com/'; - user = '/' + options.user; - repo = user + '/' + options.repo; - switch (options.type) { - case 'follow': - return base + user; - case 'watch': - return base + repo + '/subscription'; - case 'star': - return base + repo; - case 'fork': - return base + repo + '/fork'; - case 'issue': - return base + repo + '/issues'; - case 'download': - return base + repo + '/archive/master.zip'; - default: - return base; - } - })(), - 'data-text': (function() { - switch (options.type) { - case 'follow': - return 'Follow @' + options.user; - default: - return options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase(); - } - })(), - 'data-icon': (function() { - if (options.standardIcon) { - return; + watch: { + 'options.type': function() { + this.$nextTick(function() { + if (document.activeElement !== this.$refs.user && document.activeElement !== this.$refs.repo) { + if (this.options.type === 'follow' || !this.successes.user || (this.successes.user && this.successes.repo)) { + this.$refs.user.focus(); + } else { + this.$refs.repo.focus(); + } } - switch (options.type) { - case 'watch': - return 'octicon-eye'; - case 'star': - return 'octicon-star'; - case 'fork': - return 'octicon-repo-forked'; - case 'issue': - return 'octicon-issue-opened'; - case 'download': - return 'octicon-cloud-download'; + }); + } + }, + computed: { + code: function() { + var a, name, ref, value; + a = createElement('a'); + a.className = 'github-button'; + a.href = this.config.href; + a.textContent = this.config['data-text']; + ref = this.config; + for (name in ref) { + value = ref[name]; + if (name !== 'href' && name !== 'data-text' && (value != null)) { + a.setAttribute(name, value); } - })(), - 'data-size': (function() { - if (options.largeButton) { - return 'large'; - } else { + } + return '\n' + a.outerHTML; + }, + successes: function() { + return { + user: (function(user) { + return 0 < user.length && user.length < 40 && !/[^A-Za-z0-9-]|^-|-$|--/i.test(user); + })(this.options.user), + repo: (function(repo) { + return 0 < repo.length && repo.length < 101 && !/[^\w-.]|\.git$|^\.\.?$/i.test(repo); + })(this.options.repo) + }; + }, + hasSuccess: function() { + if (this.options.type === 'follow') { + return this.successes.user; + } else { + return this.successes.user && this.successes.repo; + } + }, + dangers: function() { + return { + user: this.options.user !== '' && !this.successes.user, + repo: this.options.type !== 'follow' && this.options.repo !== '' && !this.successes.repo + }; + }, + hasDanger: function() { + return this.dangers.user || this.dangers.repo; + }, + config: function() { + var options; + if (this.options.type == null) { + return; + } + options = { + type: this.options.type, + user: this.hasSuccess ? this.options.user : 'ntkme', + repo: this.hasSuccess ? this.options.repo : 'github-buttons', + largeButton: this.options.largeButton, + showCount: this.options.showCount, + standardIcon: this.options.standardIcon + }; + return { + href: (function() { + var base, repo, user; + base = 'https://github.com/'; + user = '/' + options.user; + repo = user + '/' + options.repo; + switch (options.type) { + case 'follow': + return base + user; + case 'watch': + return base + repo + '/subscription'; + case 'star': + return base + repo; + case 'fork': + return base + repo + '/fork'; + case 'issue': + return base + repo + '/issues'; + case 'download': + return base + repo + '/archive/master.zip'; + default: + return base; + } + })(), + 'data-text': (function() { + switch (options.type) { + case 'follow': + return 'Follow @' + options.user; + default: + return options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase(); + } + })(), + 'data-icon': (function() { + if (options.standardIcon) { + return; + } + switch (options.type) { + case 'watch': + return 'octicon-eye'; + case 'star': + return 'octicon-star'; + case 'fork': + return 'octicon-repo-forked'; + case 'issue': + return 'octicon-issue-opened'; + case 'download': + return 'octicon-cloud-download'; + } + })(), + 'data-size': (function() { + if (options.largeButton) { + return 'large'; + } else { + return null; + } + })(), + 'data-show-count': (function() { + if (options.showCount) { + switch (options.type) { + case 'download': + return null; + default: + return true; + } + } return null; - } - })(), - 'data-show-count': (function() { - if (options.showCount) { + })(), + 'aria-label': (function() { switch (options.type) { + case 'follow': + return 'Follow @' + options.user + ' on GitHub'; + case 'watch': + case 'star': + case 'fork': + case 'issue': case 'download': - return null; + return (options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase()) + ' ' + options.user + '/' + options.repo + ' on GitHub'; default: - return true; + return 'GitHub'; + } + })() + }; + } + }, + methods: { + onPaste: function() { + this.$nextTick(function() { + var ref, repo, user; + ref = this.options.user.replace(/^\s+/g, '').replace(/\/+/, '/').replace(/^\//, '').split('/'), user = ref[0], repo = ref[1]; + this.options.user = user; + if (repo != null) { + this.options.repo = repo; + if (this.options.user !== '') { + this.$refs.repo.focus(); + this.$refs.repo.selectionStart = this.$refs.repo.selectionEnd = this.options.repo.length; } } - return null; - })(), - 'aria-label': (function() { - switch (options.type) { - case 'follow': - return 'Follow @' + options.user + ' on GitHub'; - case 'watch': - case 'star': - case 'fork': - case 'issue': - case 'download': - return (options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase()) + ' ' + options.user + '/' + options.repo + ' on GitHub'; - default: - return 'GitHub'; - } - })() - }; - } - }, - methods: { - onPaste: function() { - this.$nextTick(function() { - var ref, repo, user; - ref = this.options.user.replace(/^\s+/g, '').replace(/\/+/, '/').replace(/^\//, '').split('/'), user = ref[0], repo = ref[1]; - this.options.user = user; - if (repo != null) { - this.options.repo = repo; - if (this.options.user !== '') { - this.$refs.repo.focus(); - this.$refs.repo.selectionStart = this.$refs.repo.selectionEnd = this.options.repo.length; - } - } - }); + }); + } } - } + }); }); -}); }()); diff --git a/dist/buttons.common.js b/dist/buttons.common.js index 38ff64e2..fedcfb43 100644 --- a/dist/buttons.common.js +++ b/dist/buttons.common.js @@ -14,9 +14,7 @@ var createElement = function(tag) { return document.createElement(tag); }; -var baseURL; -var buttonClass; -var uuid; +var baseURL, buttonClass, uuid; buttonClass = "github-button"; @@ -66,8 +64,7 @@ var stringifyQueryString = function(obj) { return params.join("&"); }; -var onEvent; -var onceEvent; +var onEvent, onceEvent; onEvent = function(target, eventName, func) { @@ -94,8 +91,8 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; -var ceilPixel; -var devicePixelRatio; +var ceilPixel, devicePixelRatio; + /* istanbul ignore next */ @@ -105,8 +102,7 @@ ceilPixel = function(px) { return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; }; -var getFrameContentSize; -var setFrameSize; +var getFrameContentSize, setFrameSize; getFrameContentSize = function(iframe) { var body, boundingClientRect, contentDocument, display, height, html, width; @@ -133,6 +129,7 @@ setFrameSize = function(iframe, size) { var renderAll; + /* istanbul ignore next */ renderAll = function() { diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index 0a87ca77..10d34363 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -10,9 +10,7 @@ var createElement = function(tag) { return document.createElement(tag); }; -var baseURL; -var buttonClass; -var uuid; +var baseURL, buttonClass, uuid; buttonClass = "github-button"; @@ -62,8 +60,7 @@ var stringifyQueryString = function(obj) { return params.join("&"); }; -var onEvent; -var onceEvent; +var onEvent, onceEvent; onEvent = function(target, eventName, func) { @@ -90,8 +87,8 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; -var ceilPixel; -var devicePixelRatio; +var ceilPixel, devicePixelRatio; + /* istanbul ignore next */ @@ -101,8 +98,7 @@ ceilPixel = function(px) { return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; }; -var getFrameContentSize; -var setFrameSize; +var getFrameContentSize, setFrameSize; getFrameContentSize = function(iframe) { var body, boundingClientRect, contentDocument, display, height, html, width; @@ -129,6 +125,7 @@ setFrameSize = function(iframe, size) { var renderAll; + /* istanbul ignore next */ renderAll = function() { @@ -153,6 +150,7 @@ renderAll = function() { var render; + /* istanbul ignore next */ render = function(targetNode, options) { diff --git a/dist/buttons.js b/dist/buttons.js index 8f2152e4..26e8cc94 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -1,458 +1,454 @@ (function () { -'use strict'; + 'use strict'; -var document = window.document; + var document = window.document; -var encodeURIComponent = window.encodeURIComponent; + var encodeURIComponent = window.encodeURIComponent; -var decodeURIComponent = window.decodeURIComponent; + var decodeURIComponent = window.decodeURIComponent; -var Math = window.Math; + var Math = window.Math; -var createElement = function(tag) { - return document.createElement(tag); -}; + var createElement = function(tag) { + return document.createElement(tag); + }; -var createTextNode = function(text) { - return document.createTextNode(text); -}; + var createTextNode = function(text) { + return document.createTextNode(text); + }; -var apiBaseURL; -var baseURL; -var buttonClass; -var setBaseURL; -var uuid; + var apiBaseURL, baseURL, buttonClass, setBaseURL, uuid; -buttonClass = "github-button"; + buttonClass = "github-button"; -uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; + uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; -/* istanbul ignore next */ + /* istanbul ignore next */ -baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; + baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; -apiBaseURL = "https://api.github.com/"; + apiBaseURL = "https://api.github.com/"; -setBaseURL = function(url) { - baseURL = url; -}; + setBaseURL = function(url) { + baseURL = url; + }; -var currentScript; -var currentScriptURL; + var currentScript, currentScriptURL; -currentScript = "currentScript"; + currentScript = "currentScript"; -/* istanbul ignore next */ + /* istanbul ignore next */ -currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; + currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; -var stringifyQueryString = function(obj) { - var name, params, value; - params = []; - for (name in obj) { - value = obj[name]; - if (value != null) { - params.push((encodeURIComponent(name)) + "=" + (encodeURIComponent(value))); - } - } - return params.join("&"); -}; - -var parseQueryString = function(str) { - var i, len, pair, params, ref, ref1; - params = {}; - ref1 = str.split("&"); - for (i = 0, len = ref1.length; i < len; i++) { - pair = ref1[i]; - if (!(pair !== "")) { - continue; - } - ref = pair.split("="); - if (ref[0] !== "") { - params[decodeURIComponent(ref[0])] = decodeURIComponent(ref.slice(1).join("=")); + var stringifyQueryString = function(obj) { + var name, params, value; + params = []; + for (name in obj) { + value = obj[name]; + if (value != null) { + params.push((encodeURIComponent(name)) + "=" + (encodeURIComponent(value))); + } } - } - return params; -}; - -var onEvent; -var onceEvent; + return params.join("&"); + }; -onEvent = function(target, eventName, func) { + var parseQueryString = function(str) { + var i, len, pair, params, ref, ref1; + params = {}; + ref1 = str.split("&"); + for (i = 0, len = ref1.length; i < len; i++) { + pair = ref1[i]; + if (!(pair !== "")) { + continue; + } + ref = pair.split("="); + if (ref[0] !== "") { + params[decodeURIComponent(ref[0])] = decodeURIComponent(ref.slice(1).join("=")); + } + } + return params; + }; - /* istanbul ignore else: IE lt 9 */ - if (target.addEventListener) { - target.addEventListener("" + eventName, func); - } else { - target.attachEvent("on" + eventName, func); - } -}; + var onEvent, onceEvent; -onceEvent = function(target, eventName, func) { - var callback; - callback = function(event) { + onEvent = function(target, eventName, func) { /* istanbul ignore else: IE lt 9 */ - if (target.removeEventListener) { - target.removeEventListener("" + eventName, callback); + if (target.addEventListener) { + target.addEventListener("" + eventName, func); } else { - target.detachEvent("on" + eventName, callback); + target.attachEvent("on" + eventName, func); } - return func(event); }; - onEvent(target, eventName, callback); -}; -var defer; + onceEvent = function(target, eventName, func) { + var callback; + callback = function(event) { + + /* istanbul ignore else: IE lt 9 */ + if (target.removeEventListener) { + target.removeEventListener("" + eventName, callback); + } else { + target.detachEvent("on" + eventName, callback); + } + return func(event); + }; + onEvent(target, eventName, callback); + }; -/* istanbul ignore next */ + var defer; -defer = function(func) { - var callback, onceToken; - if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { - setTimeout(func); - } else { - if (document.addEventListener) { - onceToken = 0; - callback = function() { - if (!onceToken && (onceToken = 1)) { - func(); - } - }; - onceEvent(document, "DOMContentLoaded", callback); - onceEvent(window, "load", callback); + + /* istanbul ignore next */ + + defer = function(func) { + var callback, onceToken; + if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { + setTimeout(func); } else { - callback = function() { - if (/m/.test(document.readyState)) { - document.detachEvent("onreadystatechange", callback); - func(); - } - }; - document.attachEvent("onreadystatechange", callback); + if (document.addEventListener) { + onceToken = 0; + callback = function() { + if (!onceToken && (onceToken = 1)) { + func(); + } + }; + onceEvent(document, "DOMContentLoaded", callback); + onceEvent(window, "load", callback); + } else { + callback = function() { + if (/m/.test(document.readyState)) { + document.detachEvent("onreadystatechange", callback); + func(); + } + }; + document.attachEvent("onreadystatechange", callback); + } } - } -}; + }; -var data = {"alert":{"path":"","height":"16","width":"16"},"arrow-down":{"path":"","height":"16","width":"10"},"arrow-left":{"path":"","height":"16","width":"10"},"arrow-right":{"path":"","height":"16","width":"10"},"arrow-small-down":{"path":"","height":"16","width":"6"},"arrow-small-left":{"path":"","height":"16","width":"6"},"arrow-small-right":{"path":"","height":"16","width":"6"},"arrow-small-up":{"path":"","height":"16","width":"6"},"arrow-up":{"path":"","height":"16","width":"10"},"beaker":{"path":"","height":"16","width":"16"},"bell":{"path":"","height":"16","width":"14"},"bold":{"path":"","height":"16","width":"10"},"book":{"path":"","height":"16","width":"16"},"bookmark":{"path":"","height":"16","width":"10"},"briefcase":{"path":"","height":"16","width":"14"},"broadcast":{"path":"","height":"16","width":"16"},"browser":{"path":"","height":"16","width":"14"},"bug":{"path":"","height":"16","width":"16"},"calendar":{"path":"","height":"16","width":"14"},"check":{"path":"","height":"16","width":"12"},"checklist":{"path":"","height":"16","width":"16"},"chevron-down":{"path":"","height":"16","width":"10"},"chevron-left":{"path":"","height":"16","width":"8"},"chevron-right":{"path":"","height":"16","width":"8"},"chevron-up":{"path":"","height":"16","width":"10"},"circle-slash":{"path":"","height":"16","width":"14"},"circuit-board":{"path":"","height":"16","width":"14"},"clippy":{"path":"","height":"16","width":"14"},"clock":{"path":"","height":"16","width":"14"},"cloud-download":{"path":"","height":"16","width":"16"},"cloud-upload":{"path":"","height":"16","width":"16"},"code":{"path":"","height":"16","width":"14"},"comment":{"path":"","height":"16","width":"16"},"comment-discussion":{"path":"","height":"16","width":"16"},"credit-card":{"path":"","height":"16","width":"16"},"dash":{"path":"","height":"16","width":"8"},"dashboard":{"path":"","height":"16","width":"16"},"database":{"path":"","height":"16","width":"12"},"desktop-download":{"path":"","height":"16","width":"16"},"device-camera":{"path":"","height":"16","width":"16"},"device-camera-video":{"path":"","height":"16","width":"16"},"device-desktop":{"path":"","height":"16","width":"16"},"device-mobile":{"path":"","height":"16","width":"10"},"diff":{"path":"","height":"16","width":"13"},"diff-added":{"path":"","height":"16","width":"14"},"diff-ignored":{"path":"","height":"16","width":"14"},"diff-modified":{"path":"","height":"16","width":"14"},"diff-removed":{"path":"","height":"16","width":"14"},"diff-renamed":{"path":"","height":"16","width":"14"},"ellipsis":{"path":"","height":"16","width":"12"},"eye":{"path":"","height":"16","width":"16"},"file":{"path":"","height":"16","width":"12"},"file-binary":{"path":"","height":"16","width":"12"},"file-code":{"path":"","height":"16","width":"12"},"file-directory":{"path":"","height":"16","width":"14"},"file-media":{"path":"","height":"16","width":"12"},"file-pdf":{"path":"","height":"16","width":"12"},"file-submodule":{"path":"","height":"16","width":"14"},"file-symlink-directory":{"path":"","height":"16","width":"14"},"file-symlink-file":{"path":"","height":"16","width":"12"},"file-zip":{"path":"","height":"16","width":"12"},"flame":{"path":"","height":"16","width":"12"},"fold":{"path":"","height":"16","width":"14"},"gear":{"path":"","height":"16","width":"14"},"gift":{"path":"","height":"16","width":"14"},"gist":{"path":"","height":"16","width":"12"},"gist-secret":{"path":"","height":"16","width":"14"},"git-branch":{"path":"","height":"16","width":"10"},"git-commit":{"path":"","height":"16","width":"14"},"git-compare":{"path":"","height":"16","width":"14"},"git-merge":{"path":"","height":"16","width":"12"},"git-pull-request":{"path":"","height":"16","width":"12"},"globe":{"path":"","height":"16","width":"14"},"grabber":{"path":"","height":"16","width":"8"},"graph":{"path":"","height":"16","width":"16"},"heart":{"path":"","height":"16","width":"12"},"history":{"path":"","height":"16","width":"14"},"home":{"path":"","height":"16","width":"16"},"horizontal-rule":{"path":"","height":"16","width":"10"},"hubot":{"path":"","height":"16","width":"14"},"inbox":{"path":"","height":"16","width":"14"},"info":{"path":"","height":"16","width":"14"},"issue-closed":{"path":"","height":"16","width":"16"},"issue-opened":{"path":"","height":"16","width":"14"},"issue-reopened":{"path":"","height":"16","width":"14"},"italic":{"path":"","height":"16","width":"6"},"jersey":{"path":"","height":"16","width":"14"},"kebab-horizontal":{"path":"","height":"16","width":"13"},"kebab-vertical":{"path":"","height":"16","width":"3"},"key":{"path":"","height":"16","width":"14"},"keyboard":{"path":"","height":"16","width":"16"},"law":{"path":"","height":"16","width":"14"},"light-bulb":{"path":"","height":"16","width":"12"},"link":{"path":"","height":"16","width":"16"},"link-external":{"path":"","height":"16","width":"12"},"list-ordered":{"path":"","height":"16","width":"12"},"list-unordered":{"path":"","height":"16","width":"12"},"location":{"path":"","height":"16","width":"12"},"lock":{"path":"","height":"16","width":"12"},"logo-gist":{"path":"","height":"16","width":"25"},"logo-github":{"path":"","height":"16","width":"45"},"mail":{"path":"","height":"16","width":"14"},"mail-read":{"path":"","height":"16","width":"14"},"mark-github":{"path":"","height":"16","width":"16"},"markdown":{"path":"","height":"16","width":"16"},"megaphone":{"path":"","height":"16","width":"16"},"mention":{"path":"","height":"16","width":"14"},"milestone":{"path":"","height":"16","width":"14"},"mirror":{"path":"","height":"16","width":"16"},"mortar-board":{"path":"","height":"16","width":"16"},"mute":{"path":"","height":"16","width":"16"},"no-newline":{"path":"","height":"16","width":"16"},"note":{"path":"","height":"16","width":"14"},"octoface":{"path":"","height":"16","width":"16"},"organization":{"path":"","height":"16","width":"16"},"package":{"path":"","height":"16","width":"16"},"paintcan":{"path":"","height":"16","width":"12"},"pencil":{"path":"","height":"16","width":"14"},"person":{"path":"","height":"16","width":"12"},"pin":{"path":"","height":"16","width":"16"},"plug":{"path":"","height":"16","width":"14"},"plus":{"path":"","height":"16","width":"12"},"plus-small":{"path":"","height":"16","width":"7"},"primitive-dot":{"path":"","height":"16","width":"8"},"primitive-square":{"path":"","height":"16","width":"8"},"project":{"path":"","height":"16","width":"15"},"pulse":{"path":"","height":"16","width":"14"},"question":{"path":"","height":"16","width":"14"},"quote":{"path":"","height":"16","width":"14"},"radio-tower":{"path":"","height":"16","width":"16"},"reply":{"path":"","height":"16","width":"14"},"repo":{"path":"","height":"16","width":"12"},"repo-clone":{"path":"","height":"16","width":"16"},"repo-force-push":{"path":"","height":"16","width":"12"},"repo-forked":{"path":"","height":"16","width":"10"},"repo-pull":{"path":"","height":"16","width":"16"},"repo-push":{"path":"","height":"16","width":"12"},"report":{"path":"","height":"16","width":"16"},"rocket":{"path":"","height":"16","width":"16"},"rss":{"path":"","height":"16","width":"10"},"ruby":{"path":"","height":"16","width":"16"},"screen-full":{"path":"","height":"16","width":"14"},"screen-normal":{"path":"","height":"16","width":"14"},"search":{"path":"","height":"16","width":"16"},"server":{"path":"","height":"16","width":"12"},"settings":{"path":"","height":"16","width":"16"},"shield":{"path":"","height":"16","width":"14"},"sign-in":{"path":"","height":"16","width":"14"},"sign-out":{"path":"","height":"16","width":"16"},"smiley":{"path":"","height":"16","width":"16"},"squirrel":{"path":"","height":"16","width":"16"},"star":{"path":"","height":"16","width":"14"},"stop":{"path":"","height":"16","width":"14"},"sync":{"path":"","height":"16","width":"12"},"tag":{"path":"","height":"16","width":"14"},"tasklist":{"path":"","height":"16","width":"16"},"telescope":{"path":"","height":"16","width":"14"},"terminal":{"path":"","height":"16","width":"14"},"text-size":{"path":"","height":"16","width":"18"},"three-bars":{"path":"","height":"16","width":"12"},"thumbsdown":{"path":"","height":"16","width":"16"},"thumbsup":{"path":"","height":"16","width":"16"},"tools":{"path":"","height":"16","width":"16"},"trashcan":{"path":"","height":"16","width":"12"},"triangle-down":{"path":"","height":"16","width":"12"},"triangle-left":{"path":"","height":"16","width":"6"},"triangle-right":{"path":"","height":"16","width":"6"},"triangle-up":{"path":"","height":"16","width":"12"},"unfold":{"path":"","height":"16","width":"14"},"unmute":{"path":"","height":"16","width":"16"},"unverified":{"path":"","height":"16","width":"16"},"verified":{"path":"","height":"16","width":"16"},"versions":{"path":"","height":"16","width":"14"},"watch":{"path":"","height":"16","width":"12"},"x":{"path":"","height":"16","width":"12"},"zap":{"path":"","height":"16","width":"10"}} + var data = {"alert":{"name":"alert","figma":{"id":"0:5","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"arrow-down":{"name":"arrow-down","figma":{"id":"0:8","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"arrow-left":{"name":"arrow-left","figma":{"id":"0:10","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"arrow-right":{"name":"arrow-right","figma":{"id":"0:12","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"arrow-up":{"name":"arrow-up","figma":{"id":"0:14","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"arrow-small-down":{"name":"arrow-small-down","figma":{"id":"0:16","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":6,"height":16,"path":""},"arrow-small-left":{"name":"arrow-small-left","figma":{"id":"0:18","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":6,"height":16,"path":""},"arrow-small-right":{"name":"arrow-small-right","figma":{"id":"0:20","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":6,"height":16,"path":""},"arrow-small-up":{"name":"arrow-small-up","figma":{"id":"0:22","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":6,"height":16,"path":""},"beaker":{"name":"beaker","figma":{"id":"0:26","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"bell":{"name":"bell","figma":{"id":"0:34","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"bold":{"name":"bold","figma":{"id":"0:38","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"book":{"name":"book","figma":{"id":"0:43","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"bookmark":{"name":"bookmark","figma":{"id":"0:54","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"briefcase":{"name":"briefcase","figma":{"id":"0:58","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"broadcast":{"name":"broadcast","figma":{"id":"0:63","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"browser":{"name":"browser","figma":{"id":"0:70","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"bug":{"name":"bug","figma":{"id":"0:78","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"calendar":{"name":"calendar","figma":{"id":"0:82","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"check":{"name":"check","figma":{"id":"0:104","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"checklist":{"name":"checklist","figma":{"id":"0:108","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"chevron-down":{"name":"chevron-down","figma":{"id":"0:117","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"chevron-left":{"name":"chevron-left","figma":{"id":"0:119","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":8,"height":16,"path":""},"chevron-right":{"name":"chevron-right","figma":{"id":"0:121","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":8,"height":16,"path":""},"chevron-up":{"name":"chevron-up","figma":{"id":"0:123","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"circle-slash":{"name":"circle-slash","figma":{"id":"0:127","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"circuit-board":{"name":"circuit-board","figma":{"id":"0:132","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"clippy":{"name":"clippy","figma":{"id":"0:138","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"clock":{"name":"clock","figma":{"id":"0:147","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"cloud-download":{"name":"cloud-download","figma":{"id":"0:152","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"cloud-upload":{"name":"cloud-upload","figma":{"id":"0:156","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"code":{"name":"code","figma":{"id":"0:160","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"comment-discussion":{"name":"comment-discussion","figma":{"id":"0:164","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"comment":{"name":"comment","figma":{"id":"0:169","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"credit-card":{"name":"credit-card","figma":{"id":"0:173","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"dash":{"name":"dash","figma":{"id":"0:178","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":8,"height":16,"path":""},"dashboard":{"name":"dashboard","figma":{"id":"0:182","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"database":{"name":"database","figma":{"id":"0:190","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"desktop-download":{"name":"desktop-download","figma":{"id":"0:196","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"device-camera-video":{"name":"device-camera-video","figma":{"id":"0:198","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"device-camera":{"name":"device-camera","figma":{"id":"0:202","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"device-desktop":{"name":"device-desktop","figma":{"id":"0:208","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"device-mobile":{"name":"device-mobile","figma":{"id":"0:212","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"diff-added":{"name":"diff-added","figma":{"id":"0:217","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"diff-ignored":{"name":"diff-ignored","figma":{"id":"0:222","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"diff-modified":{"name":"diff-modified","figma":{"id":"0:227","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"diff-removed":{"name":"diff-removed","figma":{"id":"0:232","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"diff-renamed":{"name":"diff-renamed","figma":{"id":"0:237","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"diff":{"name":"diff","figma":{"id":"0:242","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":13,"height":16,"path":""},"ellipsis":{"name":"ellipsis","figma":{"id":"0:249","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"eye":{"name":"eye","figma":{"id":"0:255","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"file-binary":{"name":"file-binary","figma":{"id":"0:260","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"file-code":{"name":"file-code","figma":{"id":"0:270","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"file-directory":{"name":"file-directory","figma":{"id":"0:276","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"file-media":{"name":"file-media","figma":{"id":"0:280","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"file-pdf":{"name":"file-pdf","figma":{"id":"0:285","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"file-submodule":{"name":"file-submodule","figma":{"id":"0:292","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"file-symlink-directory":{"name":"file-symlink-directory","figma":{"id":"0:298","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"file-symlink-file":{"name":"file-symlink-file","figma":{"id":"0:303","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"file":{"name":"file","figma":{"id":"0:308","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"file-zip":{"name":"file-zip","figma":{"id":"0:316","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"flame":{"name":"flame","figma":{"id":"0:325","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"fold":{"name":"fold","figma":{"id":"0:329","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"gear":{"name":"gear","figma":{"id":"0:334","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"gift":{"name":"gift","figma":{"id":"0:338","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"gist-secret":{"name":"gist-secret","figma":{"id":"0:347","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"gist":{"name":"gist","figma":{"id":"0:354","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"git-branch":{"name":"git-branch","figma":{"id":"0:360","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"git-commit":{"name":"git-commit","figma":{"id":"0:366","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"git-compare":{"name":"git-compare","figma":{"id":"0:370","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"git-merge":{"name":"git-merge","figma":{"id":"0:376","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"git-pull-request":{"name":"git-pull-request","figma":{"id":"0:382","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"globe":{"name":"globe","figma":{"id":"0:389","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"graph":{"name":"graph","figma":{"id":"0:396","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"heart":{"name":"heart","figma":{"id":"0:400","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"history":{"name":"history","figma":{"id":"0:404","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"home":{"name":"home","figma":{"id":"0:408","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"horizontal-rule":{"name":"horizontal-rule","figma":{"id":"0:412","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"hubot":{"name":"hubot","figma":{"id":"0:419","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"inbox":{"name":"inbox","figma":{"id":"0:426","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"info":{"name":"info","figma":{"id":"0:430","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"issue-closed":{"name":"issue-closed","figma":{"id":"0:436","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"issue-opened":{"name":"issue-opened","figma":{"id":"0:442","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"issue-reopened":{"name":"issue-reopened","figma":{"id":"0:448","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"italic":{"name":"italic","figma":{"id":"0:454","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":6,"height":16,"path":""},"jersey":{"name":"jersey","figma":{"id":"0:458","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"keyboard":{"name":"keyboard","figma":{"id":"0:466","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"law":{"name":"law","figma":{"id":"0:490","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"link":{"name":"link","figma":{"id":"0:496","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"list-ordered":{"name":"list-ordered","figma":{"id":"0:500","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"list-unordered":{"name":"list-unordered","figma":{"id":"0:508","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"location":{"name":"location","figma":{"id":"0:516","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"lock":{"name":"lock","figma":{"id":"0:521","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"logo-gist":{"name":"logo-gist","figma":{"id":"0:529","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":25,"height":16,"path":""},"logo-github":{"name":"logo-github","figma":{"id":"0:536","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":45,"height":16,"path":""},"mail-read":{"name":"mail-read","figma":{"id":"0:547","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"reply":{"name":"reply","figma":{"id":"0:554","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"mail":{"name":"mail","figma":{"id":"0:558","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"mark-github":{"name":"mark-github","figma":{"id":"0:563","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"markdown":{"name":"markdown","figma":{"id":"0:567","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"megaphone":{"name":"megaphone","figma":{"id":"0:572","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"mention":{"name":"mention","figma":{"id":"0:579","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"milestone":{"name":"milestone","figma":{"id":"0:583","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"mirror":{"name":"mirror","figma":{"id":"0:589","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"mortar-board":{"name":"mortar-board","figma":{"id":"0:594","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"mute":{"name":"mute","figma":{"id":"0:599","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"no-newline":{"name":"no-newline","figma":{"id":"0:603","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"octoface":{"name":"octoface","figma":{"id":"0:609","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"organization":{"name":"organization","figma":{"id":"0:613","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"package":{"name":"package","figma":{"id":"0:617","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"paintcan":{"name":"paintcan","figma":{"id":"0:624","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"pencil":{"name":"pencil","figma":{"id":"0:630","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"person":{"name":"person","figma":{"id":"0:633","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"pin":{"name":"pin","figma":{"id":"0:635","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"plug":{"name":"plug","figma":{"id":"0:637","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"plus":{"name":"plus","figma":{"id":"0:639","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"primitive-dot":{"name":"primitive-dot","figma":{"id":"0:641","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":8,"height":16,"path":""},"primitive-square":{"name":"primitive-square","figma":{"id":"0:643","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":8,"height":16,"path":""},"pulse":{"name":"pulse","figma":{"id":"0:645","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"question":{"name":"question","figma":{"id":"0:649","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"quote":{"name":"quote","figma":{"id":"0:655","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"radio-tower":{"name":"radio-tower","figma":{"id":"0:659","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"repo-clone":{"name":"repo-clone","figma":{"id":"0:669","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"repo-force-push":{"name":"repo-force-push","figma":{"id":"0:681","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"repo-forked":{"name":"repo-forked","figma":{"id":"0:685","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"repo-pull":{"name":"repo-pull","figma":{"id":"0:691","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"repo-push":{"name":"repo-push","figma":{"id":"0:700","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"repo":{"name":"repo","figma":{"id":"0:706","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"rocket":{"name":"rocket","figma":{"id":"0:715","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"rss":{"name":"rss","figma":{"id":"0:719","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"ruby":{"name":"ruby","figma":{"id":"0:724","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"search":{"name":"search","figma":{"id":"0:729","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"server":{"name":"server","figma":{"id":"0:733","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"settings":{"name":"settings","figma":{"id":"0:751","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"shield":{"name":"shield","figma":{"id":"0:762","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"sign-in":{"name":"sign-in","figma":{"id":"0:764","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"sign-out":{"name":"sign-out","figma":{"id":"0:768","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"smiley":{"name":"smiley","figma":{"id":"0:772","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"squirrel":{"name":"squirrel","figma":{"id":"0:779","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"star":{"name":"star","figma":{"id":"0:781","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"stop":{"name":"stop","figma":{"id":"0:785","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"sync":{"name":"sync","figma":{"id":"0:791","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"tag":{"name":"tag","figma":{"id":"0:795","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"tasklist":{"name":"tasklist","figma":{"id":"0:800","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"telescope":{"name":"telescope","figma":{"id":"0:806","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"terminal":{"name":"terminal","figma":{"id":"0:815","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"text-size":{"name":"text-size","figma":{"id":"0:821","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":18,"height":16,"path":""},"three-bars":{"name":"three-bars","figma":{"id":"0:826","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"thumbsdown":{"name":"thumbsdown","figma":{"id":"0:831","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"thumbsup":{"name":"thumbsup","figma":{"id":"0:835","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"tools":{"name":"tools","figma":{"id":"0:839","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"trashcan":{"name":"trashcan","figma":{"id":"0:844","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"triangle-down":{"name":"triangle-down","figma":{"id":"0:847","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"triangle-left":{"name":"triangle-left","figma":{"id":"0:849","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":6,"height":16,"path":""},"triangle-right":{"name":"triangle-right","figma":{"id":"0:851","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":6,"height":16,"path":""},"triangle-up":{"name":"triangle-up","figma":{"id":"0:853","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"unfold":{"name":"unfold","figma":{"id":"0:857","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"unmute":{"name":"unmute","figma":{"id":"0:862","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"project":{"name":"project","figma":{"id":"0:868","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":15,"height":16,"path":""},"kebab-horizontal":{"name":"kebab-horizontal","figma":{"id":"0:875","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":13,"height":16,"path":""},"kebab-vertical":{"name":"kebab-vertical","figma":{"id":"0:880","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":3,"height":16,"path":""},"report":{"name":"report","figma":{"id":"0:885","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"note":{"name":"note","figma":{"id":"0:891","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"screen-full":{"name":"screen-full","figma":{"id":"0:898","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"screen-normal":{"name":"screen-normal","figma":{"id":"0:906","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"unverified":{"name":"unverified","figma":{"id":"0:914","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"verified":{"name":"verified","figma":{"id":"0:919","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":16,"height":16,"path":""},"versions":{"name":"versions","figma":{"id":"0:923","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"watch":{"name":"watch","figma":{"id":"0:929","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"x":{"name":"x","figma":{"id":"0:932","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"zap":{"name":"zap","figma":{"id":"0:934","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":10,"height":16,"path":""},"key":{"name":"key","figma":{"id":"0:938","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":14,"height":16,"path":""},"grabber":{"name":"grabber","figma":{"id":"0:942","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":8,"height":16,"path":""},"plus-small":{"name":"plus-small","figma":{"id":"0:947","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":7,"height":16,"path":""},"light-bulb":{"name":"light-bulb","figma":{"id":"0:951","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""},"link-external":{"name":"link-external","figma":{"id":"0:956","file":"FP7lqd1V00LUaT5zvdklkkZr"},"width":12,"height":16,"path":""}} -var octicon; + var octicon; -octicon = function(icon, height) { - var width; - icon = ("" + icon).toLowerCase().replace(/^octicon-/, ""); - if (!data.hasOwnProperty(icon)) { - icon = "mark-github"; - } - width = height * data[icon].width / data[icon].height; - return "" + data[icon].path + ""; -}; - -var renderButton; - -renderButton = function(options) { - var a, ariaLabel, span; - a = createElement("a"); - a.href = options.href; - if (!/\.github\.com$/.test("." + a.hostname)) { - a.href = "#"; - a.target = "_self"; - } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { - a.target = "_top"; - } - a.className = "btn"; - if (ariaLabel = options["aria-label"]) { - a.setAttribute("aria-label", ariaLabel); - } - a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); - a.appendChild(createTextNode(" ")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(options["data-text"] || "")); - return document.body.appendChild(a); -}; - -var fetch; - -fetch = function(url, func) { - var callback, head, onceToken, onloadend, script, xhr; - window.$ = function() { - window.$ = null; + octicon = function(icon, height) { + var width; + icon = ("" + icon).toLowerCase().replace(/^octicon-/, ""); + if (!data.hasOwnProperty(icon)) { + icon = "mark-github"; + } + width = height * data[icon].width / data[icon].height; + return "" + data[icon].path + ""; }; - onceToken = 0; - callback = function() { - if (!onceToken && (onceToken = 1)) { - func.apply(null, arguments); - $(); + + var renderButton; + + renderButton = function(options) { + var a, ariaLabel, span; + a = createElement("a"); + a.href = options.href; + if (!/\.github\.com$/.test("." + a.hostname)) { + a.href = "#"; + a.target = "_self"; + } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { + a.target = "_top"; + } + a.className = "btn"; + if (ariaLabel = options["aria-label"]) { + a.setAttribute("aria-label", ariaLabel); } + a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); + a.appendChild(createTextNode(" ")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(options["data-text"] || "")); + return document.body.appendChild(a); }; - if (window.XMLHttpRequest && "withCredentials" in XMLHttpRequest.prototype) { - xhr = new XMLHttpRequest(); - onEvent(xhr, "abort", callback); - onEvent(xhr, "error", callback); - onEvent(xhr, "load", function() { - callback(xhr.status !== 200, JSON.parse(xhr.responseText)); - }); - xhr.open("GET", url); - xhr.send(); - } else { - window._ = function(json) { - window._ = null; - callback(json.meta.status !== 200, json.data); + + var fetch; + + fetch = function(url, func) { + var callback, head, onceToken, onloadend, script, xhr; + window.$ = function() { + window.$ = null; }; - script = createElement("script"); - script.async = true; - script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; - onloadend = function() { - if (window._) { - _({ - meta: {} - }); + onceToken = 0; + callback = function() { + if (!onceToken && (onceToken = 1)) { + func.apply(null, arguments); + $(); } }; - onEvent(script, "error", onloadend); - if (script.readyState) { - - /* istanbul ignore next: IE lt 9 */ - onEvent(script, "readystatechange", function() { - if (script.readyState === "loaded") { - onloadend(); - } + if (window.XMLHttpRequest && "withCredentials" in XMLHttpRequest.prototype) { + xhr = new XMLHttpRequest(); + onEvent(xhr, "abort", callback); + onEvent(xhr, "error", callback); + onEvent(xhr, "load", function() { + callback(xhr.status !== 200, JSON.parse(xhr.responseText)); }); - } - head = document.getElementsByTagName("head")[0]; + xhr.open("GET", url); + xhr.send(); + } else { + window._ = function(json) { + window._ = null; + callback(json.meta.status !== 200, json.data); + }; + script = createElement("script"); + script.async = true; + script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; + onloadend = function() { + if (window._) { + _({ + meta: {} + }); + } + }; + onEvent(script, "error", onloadend); + if (script.readyState) { + + /* istanbul ignore next: IE lt 9 */ + onEvent(script, "readystatechange", function() { + if (script.readyState === "loaded") { + onloadend(); + } + }); + } + head = document.getElementsByTagName("head")[0]; - /* istanbul ignore if: Presto based Opera */ - if ("[object Opera]" === {}.toString.call(window.opera)) { - defer(function() { + /* istanbul ignore if: Presto based Opera */ + if ("[object Opera]" === {}.toString.call(window.opera)) { + defer(function() { + head.appendChild(script); + }); + } else { head.appendChild(script); - }); - } else { - head.appendChild(script); + } } - } -}; + }; -var renderSocialCount; + var renderSocialCount; -renderSocialCount = function(button) { - var api, href, match, property; - if (button.hostname !== "github.com") { - return; - } - match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); - if (!(match && !match[6])) { - return; - } - if (match[2]) { - api = "repos/" + match[1] + "/" + match[2]; - if (match[3]) { - property = "subscribers_count"; - href = "watchers"; - } else if (match[4]) { - property = "forks_count"; - href = "network"; - } else if (match[5]) { - property = "open_issues_count"; - href = "issues"; + renderSocialCount = function(button) { + var api, href, match, property; + if (button.hostname !== "github.com") { + return; + } + match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); + if (!(match && !match[6])) { + return; + } + if (match[2]) { + api = "repos/" + match[1] + "/" + match[2]; + if (match[3]) { + property = "subscribers_count"; + href = "watchers"; + } else if (match[4]) { + property = "forks_count"; + href = "network"; + } else if (match[5]) { + property = "open_issues_count"; + href = "issues"; + } else { + property = "stargazers_count"; + href = "stargazers"; + } } else { - property = "stargazers_count"; - href = "stargazers"; + api = "users/" + match[1]; + href = property = "followers"; } - } else { - api = "users/" + match[1]; - href = property = "followers"; - } - fetch(apiBaseURL + api, function(error, json) { - var a, data, span; - if (!error) { - data = json[property]; - a = createElement("a"); - a.href = json.html_url + "/" + href; - a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); - a.appendChild(createElement("b")); - a.appendChild(createElement("i")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); - button.parentNode.insertBefore(a, button.nextSibling); + fetch(apiBaseURL + api, function(error, json) { + var a, data, span; + if (!error) { + data = json[property]; + a = createElement("a"); + a.href = json.html_url + "/" + href; + a.className = "social-count"; + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.appendChild(createElement("b")); + a.appendChild(createElement("i")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); + button.parentNode.insertBefore(a, button.nextSibling); + } + }); + }; + + var renderFrameContent; + + renderFrameContent = function(options) { + var button; + if (!options) { + return; + } + if (/^large$/i.test(options["data-size"])) { + document.body.className = "large"; + } + button = renderButton(options); + if (/^(true|1)$/i.test(options["data-show-count"])) { + renderSocialCount(button); + } + }; + + var parseOptions = function(anchor) { + var attribute, deprecate, i, len, options, ref; + options = { + "href": anchor.href, + "title": anchor.title, + "aria-label": anchor.getAttribute("aria-label") + }; + ref = ["icon", "text", "size", "show-count"]; + for (i = 0, len = ref.length; i < len; i++) { + attribute = ref[i]; + attribute = "data-" + attribute; + options[attribute] = anchor.getAttribute(attribute); } - }); -}; + if (options["data-text"] == null) { + options["data-text"] = anchor.textContent || anchor.innerText; + } + deprecate = function(oldAttribute, newAttribute, newValue) { + if (anchor.getAttribute(oldAttribute)) { + options[newAttribute] = newValue; + window.console && console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); + } + }; + deprecate("data-count-api", "data-show-count", "true"); + deprecate("data-style", "data-size", "large"); + return options; + }; -var renderFrameContent; + var ceilPixel, devicePixelRatio; -renderFrameContent = function(options) { - var button; - if (!options) { - return; - } - if (/^large$/i.test(options["data-size"])) { - document.body.className = "large"; - } - button = renderButton(options); - if (/^(true|1)$/i.test(options["data-show-count"])) { - renderSocialCount(button); - } -}; - -var parseOptions = function(anchor) { - var attribute, deprecate, i, len, options, ref; - options = { - "href": anchor.href, - "title": anchor.title, - "aria-label": anchor.getAttribute("aria-label") + + /* istanbul ignore next */ + + devicePixelRatio = window.devicePixelRatio || 1; + + ceilPixel = function(px) { + return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; }; - ref = ["icon", "text", "size", "show-count"]; - for (i = 0, len = ref.length; i < len; i++) { - attribute = ref[i]; - attribute = "data-" + attribute; - options[attribute] = anchor.getAttribute(attribute); - } - if (options["data-text"] == null) { - options["data-text"] = anchor.textContent || anchor.innerText; - } - deprecate = function(oldAttribute, newAttribute, newValue) { - if (anchor.getAttribute(oldAttribute)) { - options[newAttribute] = newValue; - window.console && console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); + + var getFrameContentSize, setFrameSize; + + getFrameContentSize = function(iframe) { + var body, boundingClientRect, contentDocument, display, height, html, width; + contentDocument = iframe.contentWindow.document; + html = contentDocument.documentElement; + body = contentDocument.body; + width = html.scrollWidth; + height = html.scrollHeight; + if (body.getBoundingClientRect) { + display = body.style.display; + body.style.display = "inline-block"; + boundingClientRect = body.getBoundingClientRect(); + width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); + height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); + body.style.display = display; } + return [width, height]; }; - deprecate("data-count-api", "data-show-count", "true"); - deprecate("data-style", "data-size", "large"); - return options; -}; - -var ceilPixel; -var devicePixelRatio; - -/* istanbul ignore next */ - -devicePixelRatio = window.devicePixelRatio || 1; - -ceilPixel = function(px) { - return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; -}; - -var getFrameContentSize; -var setFrameSize; - -getFrameContentSize = function(iframe) { - var body, boundingClientRect, contentDocument, display, height, html, width; - contentDocument = iframe.contentWindow.document; - html = contentDocument.documentElement; - body = contentDocument.body; - width = html.scrollWidth; - height = html.scrollHeight; - if (body.getBoundingClientRect) { - display = body.style.display; - body.style.display = "inline-block"; - boundingClientRect = body.getBoundingClientRect(); - width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); - height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); - body.style.display = display; - } - return [width, height]; -}; -setFrameSize = function(iframe, size) { - iframe.style.width = size[0] + "px"; - iframe.style.height = size[1] + "px"; -}; + setFrameSize = function(iframe, size) { + iframe.style.width = size[0] + "px"; + iframe.style.height = size[1] + "px"; + }; -var renderAll; + var renderAll; -/* istanbul ignore next */ -renderAll = function() { - var anchor, anchors, i, j, len, len1, ref; - anchors = []; - if (document.querySelectorAll) { - anchors = document.querySelectorAll("a." + buttonClass); - } else { - ref = document.getElementsByTagName("a"); - for (i = 0, len = ref.length; i < len; i++) { - anchor = ref[i]; - if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { - anchors.push(anchor); + /* istanbul ignore next */ + + renderAll = function() { + var anchor, anchors, i, j, len, len1, ref; + anchors = []; + if (document.querySelectorAll) { + anchors = document.querySelectorAll("a." + buttonClass); + } else { + ref = document.getElementsByTagName("a"); + for (i = 0, len = ref.length; i < len; i++) { + anchor = ref[i]; + if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { + anchors.push(anchor); + } } } - } - for (j = 0, len1 = anchors.length; j < len1; j++) { - anchor = anchors[j]; - render(anchor); - } -}; + for (j = 0, len1 = anchors.length; j < len1; j++) { + anchor = anchors[j]; + render(anchor); + } + }; -var render; + var render; -/* istanbul ignore next */ -render = function(targetNode, options) { - var contentDocument, hash, iframe, name, onload, ref, title, value; - if (targetNode == null) { - return renderAll(); - } - if (options == null) { - options = parseOptions(targetNode); - } - hash = "#" + stringifyQueryString(options); - iframe = createElement("iframe"); - ref = { - allowtransparency: true, - scrolling: "no", - frameBorder: 0 - }; - for (name in ref) { - value = ref[name]; - iframe.setAttribute(name, value); - } - setFrameSize(iframe, [1, 0]); - iframe.style.border = "none"; - iframe.src = "javascript:0"; - if (title = options.title) { - iframe.title = title; - } - document.body.appendChild(iframe); - onload = function() { - var size; - size = getFrameContentSize(iframe); - iframe.parentNode.removeChild(iframe); + /* istanbul ignore next */ + + render = function(targetNode, options) { + var contentDocument, hash, iframe, name, onload, ref, title, value; + if (targetNode == null) { + return renderAll(); + } + if (options == null) { + options = parseOptions(targetNode); + } + hash = "#" + stringifyQueryString(options); + iframe = createElement("iframe"); + ref = { + allowtransparency: true, + scrolling: "no", + frameBorder: 0 + }; + for (name in ref) { + value = ref[name]; + iframe.setAttribute(name, value); + } + setFrameSize(iframe, [1, 0]); + iframe.style.border = "none"; + iframe.src = "javascript:0"; + if (title = options.title) { + iframe.title = title; + } + document.body.appendChild(iframe); + onload = function() { + var size; + size = getFrameContentSize(iframe); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + setFrameSize(iframe, size); + }); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); + }; onceEvent(iframe, "load", function() { - setFrameSize(iframe, size); + var contentWindow; + contentWindow = iframe.contentWindow; + if (contentWindow.$) { + contentWindow.$ = onload; + } else { + onload(); + } }); - iframe.src = baseURL + "buttons.html" + hash; - targetNode.parentNode.replaceChild(iframe, targetNode); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); }; - onceEvent(iframe, "load", function() { - var contentWindow; - contentWindow = iframe.contentWindow; - if (contentWindow.$) { - contentWindow.$ = onload; + + if (typeof define === "function" && define.amd) { + define([], { + render: render + }); + } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { + exports.render = render; + } else { + if (currentScriptURL) { + setBaseURL(currentScriptURL.replace(/[^\/]*([?#].*)?$/, "")); + } + if (document.title === uuid) { + renderFrameContent(parseQueryString(document.location.hash.replace(/^#/, ""))); } else { - onload(); + defer(renderAll); } - }); - contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); - contentDocument.close(); -}; - -if (typeof define === "function" && define.amd) { - define([], { - render: render - }); -} else if (typeof exports === "object" && typeof exports.nodeName !== "string") { - exports.render = render; -} else { - if (currentScriptURL) { - setBaseURL(currentScriptURL.replace(/[^\/]*([?#].*)?$/, "")); - } - if (document.title === uuid) { - renderFrameContent(parseQueryString(document.location.hash.replace(/^#/, ""))); - } else { - defer(renderAll); } -} }()); diff --git a/dist/buttons.min.js b/dist/buttons.min.js index 5c9bab5c..9aae1ce6 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var h,e,t,l,c=window.document,d=window.encodeURIComponent,v=window.decodeURIComponent,i=window.Math,a=function(h){return c.createElement(h)},z=function(h){return c.createTextNode(h)};t="faa75404-3b97-5585-b449-4bc51338fbd1",h=(/^http:/.test(c.location)?"http":"https")+"://buttons.github.io/",e=function(e){h=e},l=!{}.hasOwnProperty.call(c,"currentScript")&&c.currentScript&&delete c.currentScript&&c.currentScript?c.currentScript.src:void 0;var H,n,r;H=function(h,e,t){h.addEventListener?h.addEventListener(""+e,t):h.attachEvent("on"+e,t)},n=function(h,e,t){var l;H(h,e,l=function(c){return h.removeEventListener?h.removeEventListener(""+e,l):h.detachEvent("on"+e,l),t(c)})},r=function(h){var e,t;/m/.test(c.readyState)||!/g/.test(c.readyState)&&!c.documentElement.doScroll?setTimeout(h):c.addEventListener?(t=0,n(c,"DOMContentLoaded",e=function(){!t&&(t=1)&&h()}),n(window,"load",e)):(e=function(){/m/.test(c.readyState)&&(c.detachEvent("onreadystatechange",e),h())},c.attachEvent("onreadystatechange",e))};var o,p,V,m,M,u={alert:{path:'',height:"16",width:"16"},"arrow-down":{path:'',height:"16",width:"10"},"arrow-left":{path:'',height:"16",width:"10"},"arrow-right":{path:'',height:"16",width:"10"},"arrow-small-down":{path:'',height:"16",width:"6"},"arrow-small-left":{path:'',height:"16",width:"6"},"arrow-small-right":{path:'',height:"16",width:"6"},"arrow-small-up":{path:'',height:"16",width:"6"},"arrow-up":{path:'',height:"16",width:"10"},beaker:{path:'',height:"16",width:"16"},bell:{path:'',height:"16",width:"14"},bold:{path:'',height:"16",width:"10"},book:{path:'',height:"16",width:"16"},bookmark:{path:'',height:"16",width:"10"},briefcase:{path:'',height:"16",width:"14"},broadcast:{path:'',height:"16",width:"16"},browser:{path:'',height:"16",width:"14"},bug:{path:'',height:"16",width:"16"},calendar:{path:'',height:"16",width:"14"},check:{path:'',height:"16",width:"12"},checklist:{path:'',height:"16",width:"16"},"chevron-down":{path:'',height:"16",width:"10"},"chevron-left":{path:'',height:"16",width:"8"},"chevron-right":{path:'',height:"16",width:"8"},"chevron-up":{path:'',height:"16",width:"10"},"circle-slash":{path:'',height:"16",width:"14"},"circuit-board":{path:'',height:"16",width:"14"},clippy:{path:'',height:"16",width:"14"},clock:{path:'',height:"16",width:"14"},"cloud-download":{path:'',height:"16",width:"16"},"cloud-upload":{path:'',height:"16",width:"16"},code:{path:'',height:"16",width:"14"},comment:{path:'',height:"16",width:"16"},"comment-discussion":{path:'',height:"16",width:"16"},"credit-card":{path:'',height:"16",width:"16"},dash:{path:'',height:"16",width:"8"},dashboard:{path:'',height:"16",width:"16"},database:{path:'',height:"16",width:"12"},"desktop-download":{path:'',height:"16",width:"16"},"device-camera":{path:'',height:"16",width:"16"},"device-camera-video":{path:'',height:"16",width:"16"},"device-desktop":{path:'',height:"16",width:"16"},"device-mobile":{path:'',height:"16",width:"10"},diff:{path:'',height:"16",width:"13"},"diff-added":{path:'',height:"16",width:"14"},"diff-ignored":{path:'',height:"16",width:"14"},"diff-modified":{path:'',height:"16",width:"14"},"diff-removed":{path:'',height:"16",width:"14"},"diff-renamed":{path:'',height:"16",width:"14"},ellipsis:{path:'',height:"16",width:"12"},eye:{path:'',height:"16",width:"16"},file:{path:'',height:"16",width:"12"},"file-binary":{path:'',height:"16",width:"12"},"file-code":{path:'',height:"16",width:"12"},"file-directory":{path:'',height:"16",width:"14"},"file-media":{path:'',height:"16",width:"12"},"file-pdf":{path:'',height:"16",width:"12"},"file-submodule":{path:'',height:"16",width:"14"},"file-symlink-directory":{path:'',height:"16",width:"14"},"file-symlink-file":{path:'',height:"16",width:"12"},"file-zip":{path:'',height:"16",width:"12"},flame:{path:'',height:"16",width:"12"},fold:{path:'',height:"16",width:"14"},gear:{path:'',height:"16",width:"14"},gift:{path:'',height:"16",width:"14"},gist:{path:'',height:"16",width:"12"},"gist-secret":{path:'',height:"16",width:"14"},"git-branch":{path:'',height:"16",width:"10"},"git-commit":{path:'',height:"16",width:"14"},"git-compare":{path:'',height:"16",width:"14"},"git-merge":{path:'',height:"16",width:"12"},"git-pull-request":{path:'',height:"16",width:"12"},globe:{path:'',height:"16",width:"14"},grabber:{path:'',height:"16",width:"8"},graph:{path:'',height:"16",width:"16"},heart:{path:'',height:"16",width:"12"},history:{path:'',height:"16",width:"14"},home:{path:'',height:"16",width:"16"},"horizontal-rule":{path:'',height:"16",width:"10"},hubot:{path:'',height:"16",width:"14"},inbox:{path:'',height:"16",width:"14"},info:{path:'',height:"16",width:"14"},"issue-closed":{path:'',height:"16",width:"16"},"issue-opened":{path:'',height:"16",width:"14"},"issue-reopened":{path:'',height:"16",width:"14"},italic:{path:'',height:"16",width:"6"},jersey:{path:'',height:"16",width:"14"},"kebab-horizontal":{path:'',height:"16",width:"13"},"kebab-vertical":{path:'',height:"16",width:"3"},key:{path:'',height:"16",width:"14"},keyboard:{path:'',height:"16",width:"16"},law:{path:'',height:"16",width:"14"},"light-bulb":{path:'',height:"16",width:"12"},link:{path:'',height:"16",width:"16"},"link-external":{path:'',height:"16",width:"12"},"list-ordered":{path:'',height:"16",width:"12"},"list-unordered":{path:'',height:"16",width:"12"},location:{path:'',height:"16",width:"12"},lock:{path:'',height:"16",width:"12"},"logo-gist":{path:'',height:"16",width:"25"},"logo-github":{path:'',height:"16",width:"45"},mail:{path:'',height:"16",width:"14"},"mail-read":{path:'',height:"16",width:"14"},"mark-github":{path:'',height:"16",width:"16"},markdown:{path:'',height:"16",width:"16"},megaphone:{path:'',height:"16",width:"16"},mention:{path:'',height:"16",width:"14"},milestone:{path:'',height:"16",width:"14"},mirror:{path:'',height:"16",width:"16"},"mortar-board":{path:'',height:"16",width:"16"},mute:{path:'',height:"16",width:"16"},"no-newline":{path:'',height:"16",width:"16"},note:{path:'',height:"16",width:"14"},octoface:{path:'',height:"16",width:"16"},organization:{path:'',height:"16",width:"16"},package:{path:'',height:"16",width:"16"},paintcan:{path:'',height:"16",width:"12"},pencil:{path:'',height:"16",width:"14"},person:{path:'',height:"16",width:"12"},pin:{path:'',height:"16",width:"16"},plug:{path:'',height:"16",width:"14"},plus:{path:'',height:"16",width:"12"},"plus-small":{path:'',height:"16",width:"7"},"primitive-dot":{path:'',height:"16",width:"8"},"primitive-square":{path:'',height:"16",width:"8"},project:{path:'',height:"16",width:"15"},pulse:{path:'',height:"16",width:"14"},question:{path:'',height:"16",width:"14"},quote:{path:'',height:"16",width:"14"},"radio-tower":{path:'',height:"16",width:"16"},reply:{path:'',height:"16",width:"14"},repo:{path:'',height:"16",width:"12"},"repo-clone":{path:'',height:"16",width:"16"},"repo-force-push":{path:'',height:"16",width:"12"},"repo-forked":{path:'',height:"16",width:"10"},"repo-pull":{path:'',height:"16",width:"16"},"repo-push":{path:'',height:"16",width:"12"},report:{path:'',height:"16",width:"16"},rocket:{path:'',height:"16",width:"16"},rss:{path:'',height:"16",width:"10"},ruby:{path:'',height:"16",width:"16"},"screen-full":{path:'',height:"16",width:"14"},"screen-normal":{path:'',height:"16",width:"14"},search:{path:'',height:"16",width:"16"},server:{path:'',height:"16",width:"12"},settings:{path:'',height:"16",width:"16"},shield:{path:'',height:"16",width:"14"},"sign-in":{path:'',height:"16",width:"14"},"sign-out":{path:'',height:"16",width:"16"},smiley:{path:'',height:"16",width:"16"},squirrel:{path:'',height:"16",width:"16"},star:{path:'',height:"16",width:"14"},stop:{path:'',height:"16",width:"14"},sync:{path:'',height:"16",width:"12"},tag:{path:'',height:"16",width:"14"},tasklist:{path:'',height:"16",width:"16"},telescope:{path:'',height:"16",width:"14"},terminal:{path:'',height:"16",width:"14"},"text-size":{path:'',height:"16",width:"18"},"three-bars":{path:'',height:"16",width:"12"},thumbsdown:{path:'',height:"16",width:"16"},thumbsup:{path:'',height:"16",width:"16"},tools:{path:'',height:"16",width:"16"},trashcan:{path:'',height:"16",width:"12"},"triangle-down":{path:'',height:"16",width:"12"},"triangle-left":{path:'',height:"16",width:"6"},"triangle-right":{path:'',height:"16",width:"6"},"triangle-up":{path:'',height:"16",width:"12"},unfold:{path:'',height:"16",width:"14"},unmute:{path:'',height:"16",width:"16"},unverified:{path:'',height:"16",width:"16"},verified:{path:'',height:"16",width:"16"},versions:{path:'',height:"16",width:"14"},watch:{path:'',height:"16",width:"12"},x:{path:'',height:"16",width:"12"},zap:{path:'',height:"16",width:"10"}};o=function(h,e){return h=(""+h).toLowerCase().replace(/^octicon-/,""),u.hasOwnProperty(h)||(h="mark-github"),'"},p=function(h){var e,t;return(e=a("a")).href=h.href,/\.github\.com$/.test("."+e.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(e.href)&&(e.target="_top"):(e.href="#",e.target="_self"),e.className="btn",(t=h["aria-label"])&&e.setAttribute("aria-label",t),e.innerHTML=o(h["data-icon"],/^large$/i.test(h["data-size"])?16:14),e.appendChild(z(" ")),e.appendChild(a("span")).appendChild(z(h["data-text"]||"")),c.body.appendChild(e)},V=function(h,e){var t,l,d,v,i,z;window.$=function(){window.$=null},d=0,t=function(){!d&&(d=1)&&(e.apply(null,arguments),$())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(z=new XMLHttpRequest,H(z,"abort",t),H(z,"error",t),H(z,"load",function(){t(200!==z.status,JSON.parse(z.responseText))}),z.open("GET",h),z.send()):(window._=function(h){window._=null,t(200!==h.meta.status,h.data)},(i=a("script")).async=!0,i.src=h+(/\?/.test(h)?"&":"?")+"callback=_",H(i,"error",v=function(){window._&&_({meta:{}})}),i.readyState&&H(i,"readystatechange",function(){"loaded"===i.readyState&&v()}),l=c.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?r(function(){l.appendChild(i)}):l.appendChild(i))},m=function(h){var e,t,l,c;"github.com"===h.hostname&&(l=h.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!l[6]&&(l[2]?(e="repos/"+l[1]+"/"+l[2],l[3]?(c="subscribers_count",t="watchers"):l[4]?(c="forks_count",t="network"):l[5]?(c="open_issues_count",t="issues"):(c="stargazers_count",t="stargazers")):(e="users/"+l[1],t=c="followers"),V("https://api.github.com/"+e,function(e,l){var d,v;e||(v=l[c],(d=a("a")).href=l.html_url+"/"+t,d.className="social-count",d.setAttribute("aria-label",v+" "+c.replace(/_count$/,"").replace("_"," ")+" on GitHub"),d.appendChild(a("b")),d.appendChild(a("i")),d.appendChild(a("span")).appendChild(z((""+v).replace(/\B(?=(\d{3})+(?!\d))/g,","))),h.parentNode.insertBefore(d,h.nextSibling))}))},M=function(h){var e;h&&(/^large$/i.test(h["data-size"])&&(c.body.className="large"),e=p(h),/^(true|1)$/i.test(h["data-show-count"])&&m(e))};var s,f,g,w,L,C;f=window.devicePixelRatio||1,s=function(h){return(f>1?i.ceil(i.round(h*f)/f*2)/2:i.ceil(h))||0},g=function(h){var e,t,l,c,d,v,a;return v=(l=h.contentWindow.document).documentElement,e=l.body,a=v.scrollWidth,d=v.scrollHeight,e.getBoundingClientRect&&(c=e.style.display,e.style.display="inline-block",t=e.getBoundingClientRect(),a=i.max(a,s(t.width||t.right-t.left)),d=i.max(d,s(t.height||t.bottom-t.top)),e.style.display=c),[a,d]},w=function(h,e){h.style.width=e[0]+"px",h.style.height=e[1]+"px"},L=function(){var h,e,t,l,d,v,i;if(e=[],c.querySelectorAll)e=c.querySelectorAll("a.github-button");else for(t=0,d=(i=c.getElementsByTagName("a")).length;t'+t+'"); - contentDocument.close(); + setFrameSize(iframe, [1, 0]); + iframe.style.border = "none"; + iframe.src = "javascript:0"; + if (title = options.title) { + iframe.title = title; + } + document.body.appendChild(iframe); + onload = function() { + var size; + size = getFrameContentSize(iframe); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + setFrameSize(iframe, size); + }); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); + }; + onceEvent(iframe, "load", function() { + var contentWindow; + contentWindow = iframe.contentWindow; + if (contentWindow.$) { + contentWindow.$ = onload; + } else { + onload(); + } + }); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); + } }; - var renderAll; + var render$4; /* istanbul ignore next */ - renderAll = function() { + render$4 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -246,7 +432,7 @@ } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render(anchor); + render$3(anchor); } }; @@ -318,7 +504,7 @@ el: '#app', template: '#app-template', mounted: function() { - setTimeout(renderAll); + setTimeout(render$4); }, data: function() { return { diff --git a/assets/js/app.min.js b/assets/js/app.min.js index a421b3f9..72f3d24c 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var t,e,n,o,s=window.document,r=window.encodeURIComponent,i=(window.decodeURIComponent,window.Math),u=function(t){return s.createElement(t)};n="faa75404-3b97-5585-b449-4bc51338fbd1",t=(/^http:/.test(s.location)?"http":"https")+"://buttons.github.io/",e=function(e){t=e},o=!{}.hasOwnProperty.call(s,"currentScript")&&s.currentScript&&delete s.currentScript&&s.currentScript?s.currentScript.src:void 0;var a,c,l,h,d,p,f,m=function(t){var e,n,o;for(e in n=[],t)null!=(o=t[e])&&n.push(r(e)+"="+r(o));return n.join("&")};a=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},c=function(t,e,n){var o;a(t,e,o=function(s){return t.removeEventListener?t.removeEventListener(""+e,o):t.detachEvent("on"+e,o),n(s)})},l=function(t){var e,n;/m/.test(s.readyState)||!/g/.test(s.readyState)&&!s.documentElement.doScroll?setTimeout(t):s.addEventListener?(n=0,c(s,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),c(window,"load",e)):(e=function(){/m/.test(s.readyState)&&(s.detachEvent("onreadystatechange",e),t())},s.attachEvent("onreadystatechange",e))},d=window.devicePixelRatio||1,h=function(t){return(d>1?i.ceil(i.round(t*d)/d*2)/2:i.ceil(t))||0},p=function(t){var e,n,o,s,r,u,a;return u=(o=t.contentWindow.document).documentElement,e=o.body,a=u.scrollWidth,r=u.scrollHeight,e.getBoundingClientRect&&(s=e.style.display,e.style.display="inline-block",n=e.getBoundingClientRect(),a=i.max(a,h(n.width||n.right-n.left)),r=i.max(r,h(n.height||n.bottom-n.top)),e.style.display=s),[a,r]},f=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"};var w,g;w=function(e,o){var r,i,a,l,h,d,w,b;if(null==e)return g();for(l in null==o&&(o=function(t){var e,n,o,s,r,i;for(r={href:t.href,title:t.title,"aria-label":t.getAttribute("aria-label")},o=0,s=(i=["icon","text","size","show-count"]).length;o'+n+'"); - contentDocument.close(); + setFrameSize(iframe, [1, 0]); + iframe.style.border = "none"; + iframe.src = "javascript:0"; + if (title = options.title) { + iframe.title = title; + } + document.body.appendChild(iframe); + onload = function() { + var size; + size = getFrameContentSize(iframe); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + setFrameSize(iframe, size); + }); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); + }; + onceEvent(iframe, "load", function() { + var contentWindow; + contentWindow = iframe.contentWindow; + if (contentWindow.$) { + contentWindow.$ = onload; + } else { + onload(); + } + }); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); + } }; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index 10d34363..06a5bb48 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -10,7 +10,11 @@ var createElement = function(tag) { return document.createElement(tag); }; -var baseURL, buttonClass, uuid; +var createTextNode = function(text) { + return document.createTextNode(text); +}; + +var apiBaseURL, baseURL, buttonClass, uuid; buttonClass = "github-button"; @@ -21,8 +25,10 @@ uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; +apiBaseURL = "https://api.github.com/"; + var parseOptions = function(anchor) { - var attribute, deprecate, i, len, options, ref; + var attribute, i, len, options, ref; options = { "href": anchor.href, "title": anchor.title, @@ -37,14 +43,6 @@ var parseOptions = function(anchor) { if (options["data-text"] == null) { options["data-text"] = anchor.textContent || anchor.innerText; } - deprecate = function(oldAttribute, newAttribute, newValue) { - if (anchor.getAttribute(oldAttribute)) { - options[newAttribute] = newValue; - window.console && console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); - } - }; - deprecate("data-count-api", "data-show-count", "true"); - deprecate("data-style", "data-size", "large"); return options; }; @@ -87,6 +85,209 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; +var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; + +var octicon; + +octicon = function(icon, height) { + var width; + icon = ("" + icon).toLowerCase().replace(/^octicon-/, ""); + if (!data.hasOwnProperty(icon)) { + icon = "mark-github"; + } + width = height * data[icon].width / data[icon].height; + return "" + data[icon].path + ""; +}; + +var render; + +render = function(root, options) { + var a, ariaLabel, span; + a = createElement("a"); + a.href = options.href; + a.target = "_blank"; + if (!/\.github\.com$/.test("." + a.hostname)) { + a.href = "#"; + a.target = "_self"; + } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { + a.target = "_top"; + } + a.className = "btn"; + if (ariaLabel = options["aria-label"]) { + a.setAttribute("aria-label", ariaLabel); + } + a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); + a.appendChild(createTextNode(" ")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(options["data-text"] || "")); + return root.appendChild(a); +}; + +var defer; + + +/* istanbul ignore next */ + +defer = function(func) { + var callback, onceToken; + if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { + setTimeout(func); + } else { + if (document.addEventListener) { + onceToken = 0; + callback = function() { + if (!onceToken && (onceToken = 1)) { + func(); + } + }; + onceEvent(document, "DOMContentLoaded", callback); + onceEvent(window, "load", callback); + } else { + callback = function() { + if (/m/.test(document.readyState)) { + document.detachEvent("onreadystatechange", callback); + func(); + } + }; + document.attachEvent("onreadystatechange", callback); + } + } +}; + +var fetch; + +fetch = function(url, func, hook) { + var callback, head, onceToken, onloadend, script, xhr; + if (hook) { + window[hook] = function() { + window[hook] = null; + }; + } + onceToken = 0; + callback = function() { + if (!onceToken && (onceToken = 1)) { + func.apply(null, arguments); + if (hook) { + window[hook](); + } + } + }; + if (window.XMLHttpRequest && "withCredentials" in XMLHttpRequest.prototype) { + xhr = new XMLHttpRequest(); + onEvent(xhr, "abort", callback); + onEvent(xhr, "error", callback); + onEvent(xhr, "load", function() { + callback(xhr.status !== 200, JSON.parse(xhr.responseText)); + }); + xhr.open("GET", url); + xhr.send(); + } else { + window._ = function(json) { + window._ = null; + callback(json.meta.status !== 200, json.data); + }; + script = createElement("script"); + script.async = true; + script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; + onloadend = function() { + if (window._) { + _({ + meta: {} + }); + } + }; + onEvent(script, "error", onloadend); + if (script.readyState) { + + /* istanbul ignore next: IE lt 9 */ + onEvent(script, "readystatechange", function() { + if (script.readyState === "loaded") { + onloadend(); + } + }); + } + head = document.getElementsByTagName("head")[0]; + + /* istanbul ignore if: Presto based Opera */ + if ("[object Opera]" === {}.toString.call(window.opera)) { + defer(function() { + head.appendChild(script); + }); + } else { + head.appendChild(script); + } + } +}; + +var render$1; + +render$1 = function(button) { + var api, hook, href, match, property; + if (button.hostname !== "github.com") { + return; + } + match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); + if (!(match && !match[6])) { + return; + } + if (match[2]) { + api = "repos/" + match[1] + "/" + match[2]; + if (match[3]) { + property = "subscribers_count"; + href = "watchers"; + } else if (match[4]) { + property = "forks_count"; + href = "network"; + } else if (match[5]) { + property = "open_issues_count"; + href = "issues"; + } else { + property = "stargazers_count"; + href = "stargazers"; + } + } else { + api = "users/" + match[1]; + href = property = "followers"; + } + + /* istanbul ignore if */ + if (!document.getElementsByTagName("head")[0].attachShadow) { + hook = "$"; + } + fetch(apiBaseURL + api, function(error, json) { + var a, data, span; + if (!error) { + data = json[property]; + a = createElement("a"); + a.href = json.html_url + "/" + href; + a.target = "_blank"; + a.className = "social-count"; + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.appendChild(createElement("b")); + a.appendChild(createElement("i")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); + button.parentNode.insertBefore(a, button.nextSibling); + } + }, hook); +}; + +var render$2; + +render$2 = function(root, options) { + var button; + if (!options) { + return; + } + if (/^large$/i.test(options["data-size"])) { + root.className = "large"; + } + button = render(root, options); + if (/^(true|1)$/i.test(options["data-show-count"])) { + render$1(button); + } +}; + var ceilPixel, devicePixelRatio; @@ -123,12 +324,12 @@ setFrameSize = function(iframe, size) { iframe.style.height = size[1] + "px"; }; -var renderAll; +var render$3; /* istanbul ignore next */ -renderAll = function() { +render$3 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -144,63 +345,79 @@ renderAll = function() { } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render(anchor); + render$4(anchor); } }; -var render; +var render$4; /* istanbul ignore next */ -render = function(targetNode, options) { - var contentDocument, hash, iframe, name, onload, ref, title, value; +render$4 = function(targetNode, options) { + var contentDocument, hash, host, iframe, link, name, onload, ref, root, title, value; if (targetNode == null) { - return renderAll(); + return render$3(); } if (options == null) { options = parseOptions(targetNode); } - hash = "#" + stringifyQueryString(options); - iframe = createElement("iframe"); - ref = { - allowtransparency: true, - scrolling: "no", - frameBorder: 0 - }; - for (name in ref) { - value = ref[name]; - iframe.setAttribute(name, value); - } - setFrameSize(iframe, [1, 0]); - iframe.style.border = "none"; - iframe.src = "javascript:0"; - if (title = options.title) { - iframe.title = title; - } - document.body.appendChild(iframe); - onload = function() { - var size; - size = getFrameContentSize(iframe); - iframe.parentNode.removeChild(iframe); - onceEvent(iframe, "load", function() { - setFrameSize(iframe, size); + if (document.head.attachShadow) { + host = createElement("span"); + if (title = options.title) { + host.title = title; + } + root = host.attachShadow({ + mode: "closed" }); - iframe.src = baseURL + "buttons.html" + hash; - targetNode.parentNode.replaceChild(iframe, targetNode); - }; - onceEvent(iframe, "load", function() { - var contentWindow; - contentWindow = iframe.contentWindow; - if (contentWindow.$) { - contentWindow.$ = onload; - } else { - onload(); + link = createElement("link"); + link.rel = "stylesheet"; + link.href = baseURL + "assets/css/buttons.css"; + root.appendChild(link); + render$2(root.appendChild(createElement("span")), options); + targetNode.parentNode.replaceChild(host, targetNode); + } else { + hash = "#" + stringifyQueryString(options); + iframe = createElement("iframe"); + ref = { + allowtransparency: true, + scrolling: "no", + frameBorder: 0 + }; + for (name in ref) { + value = ref[name]; + iframe.setAttribute(name, value); } - }); - contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); - contentDocument.close(); + setFrameSize(iframe, [1, 0]); + iframe.style.border = "none"; + iframe.src = "javascript:0"; + if (title = options.title) { + iframe.title = title; + } + document.body.appendChild(iframe); + onload = function() { + var size; + size = getFrameContentSize(iframe); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + setFrameSize(iframe, size); + }); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); + }; + onceEvent(iframe, "load", function() { + var contentWindow; + contentWindow = iframe.contentWindow; + if (contentWindow.$) { + contentWindow.$ = onload; + } else { + onload(); + } + }); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); + } }; -export { render }; +export { render$4 as render }; diff --git a/dist/buttons.js b/dist/buttons.js index 388cf295..7bdedb26 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -130,7 +130,26 @@ } }; - var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}} + var parseOptions = function(anchor) { + var attribute, i, len, options, ref; + options = { + "href": anchor.href, + "title": anchor.title, + "aria-label": anchor.getAttribute("aria-label") + }; + ref = ["icon", "text", "size", "show-count"]; + for (i = 0, len = ref.length; i < len; i++) { + attribute = ref[i]; + attribute = "data-" + attribute; + options[attribute] = anchor.getAttribute(attribute); + } + if (options["data-text"] == null) { + options["data-text"] = anchor.textContent || anchor.innerText; + } + return options; + }; + + var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; var octicon; @@ -144,12 +163,13 @@ return "" + data[icon].path + ""; }; - var renderButton; + var render; - renderButton = function(options) { + render = function(root, options) { var a, ariaLabel, span; a = createElement("a"); a.href = options.href; + a.target = "_blank"; if (!/\.github\.com$/.test("." + a.hostname)) { a.href = "#"; a.target = "_self"; @@ -164,21 +184,25 @@ a.appendChild(createTextNode(" ")); span = a.appendChild(createElement("span")); span.appendChild(createTextNode(options["data-text"] || "")); - return document.body.appendChild(a); + return root.appendChild(a); }; var fetch; - fetch = function(url, func) { + fetch = function(url, func, hook) { var callback, head, onceToken, onloadend, script, xhr; - window.$ = function() { - window.$ = null; - }; + if (hook) { + window[hook] = function() { + window[hook] = null; + }; + } onceToken = 0; callback = function() { if (!onceToken && (onceToken = 1)) { func.apply(null, arguments); - $(); + if (hook) { + window[hook](); + } } }; if (window.XMLHttpRequest && "withCredentials" in XMLHttpRequest.prototype) { @@ -228,10 +252,10 @@ } }; - var renderSocialCount; + var render$1; - renderSocialCount = function(button) { - var api, href, match, property; + render$1 = function(button) { + var api, hook, href, match, property; if (button.hostname !== "github.com") { return; } @@ -258,12 +282,18 @@ api = "users/" + match[1]; href = property = "followers"; } + + /* istanbul ignore if */ + if (!document.getElementsByTagName("head")[0].attachShadow) { + hook = "$"; + } fetch(apiBaseURL + api, function(error, json) { var a, data, span; if (!error) { data = json[property]; a = createElement("a"); a.href = json.html_url + "/" + href; + a.target = "_blank"; a.className = "social-count"; a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); a.appendChild(createElement("b")); @@ -272,52 +302,25 @@ span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); button.parentNode.insertBefore(a, button.nextSibling); } - }); + }, hook); }; - var renderFrameContent; + var render$2; - renderFrameContent = function(options) { + render$2 = function(root, options) { var button; if (!options) { return; } if (/^large$/i.test(options["data-size"])) { - document.body.className = "large"; + root.className = "large"; } - button = renderButton(options); + button = render(root, options); if (/^(true|1)$/i.test(options["data-show-count"])) { - renderSocialCount(button); + render$1(button); } }; - var parseOptions = function(anchor) { - var attribute, deprecate, i, len, options, ref; - options = { - "href": anchor.href, - "title": anchor.title, - "aria-label": anchor.getAttribute("aria-label") - }; - ref = ["icon", "text", "size", "show-count"]; - for (i = 0, len = ref.length; i < len; i++) { - attribute = ref[i]; - attribute = "data-" + attribute; - options[attribute] = anchor.getAttribute(attribute); - } - if (options["data-text"] == null) { - options["data-text"] = anchor.textContent || anchor.innerText; - } - deprecate = function(oldAttribute, newAttribute, newValue) { - if (anchor.getAttribute(oldAttribute)) { - options[newAttribute] = newValue; - window.console && console.warn("GitHub Buttons deprecated `" + oldAttribute + "`: use `" + newAttribute + "=\"" + newValue + "\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info."); - } - }; - deprecate("data-count-api", "data-show-count", "true"); - deprecate("data-style", "data-size", "large"); - return options; - }; - var ceilPixel, devicePixelRatio; @@ -354,12 +357,12 @@ iframe.style.height = size[1] + "px"; }; - var renderAll; + var render$3; /* istanbul ignore next */ - renderAll = function() { + render$3 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -375,79 +378,95 @@ } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render(anchor); + render$4(anchor); } }; - var render; + var render$4; /* istanbul ignore next */ - render = function(targetNode, options) { - var contentDocument, hash, iframe, name, onload, ref, title, value; + render$4 = function(targetNode, options) { + var contentDocument, hash, host, iframe, link, name, onload, ref, root, title, value; if (targetNode == null) { - return renderAll(); + return render$3(); } if (options == null) { options = parseOptions(targetNode); } - hash = "#" + stringifyQueryString(options); - iframe = createElement("iframe"); - ref = { - allowtransparency: true, - scrolling: "no", - frameBorder: 0 - }; - for (name in ref) { - value = ref[name]; - iframe.setAttribute(name, value); - } - setFrameSize(iframe, [1, 0]); - iframe.style.border = "none"; - iframe.src = "javascript:0"; - if (title = options.title) { - iframe.title = title; - } - document.body.appendChild(iframe); - onload = function() { - var size; - size = getFrameContentSize(iframe); - iframe.parentNode.removeChild(iframe); - onceEvent(iframe, "load", function() { - setFrameSize(iframe, size); + if (document.head.attachShadow) { + host = createElement("span"); + if (title = options.title) { + host.title = title; + } + root = host.attachShadow({ + mode: "closed" }); - iframe.src = baseURL + "buttons.html" + hash; - targetNode.parentNode.replaceChild(iframe, targetNode); - }; - onceEvent(iframe, "load", function() { - var contentWindow; - contentWindow = iframe.contentWindow; - if (contentWindow.$) { - contentWindow.$ = onload; - } else { - onload(); + link = createElement("link"); + link.rel = "stylesheet"; + link.href = baseURL + "assets/css/buttons.css"; + root.appendChild(link); + render$2(root.appendChild(createElement("span")), options); + targetNode.parentNode.replaceChild(host, targetNode); + } else { + hash = "#" + stringifyQueryString(options); + iframe = createElement("iframe"); + ref = { + allowtransparency: true, + scrolling: "no", + frameBorder: 0 + }; + for (name in ref) { + value = ref[name]; + iframe.setAttribute(name, value); } - }); - contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); - contentDocument.close(); + setFrameSize(iframe, [1, 0]); + iframe.style.border = "none"; + iframe.src = "javascript:0"; + if (title = options.title) { + iframe.title = title; + } + document.body.appendChild(iframe); + onload = function() { + var size; + size = getFrameContentSize(iframe); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + setFrameSize(iframe, size); + }); + iframe.src = baseURL + "buttons.html" + hash; + targetNode.parentNode.replaceChild(iframe, targetNode); + }; + onceEvent(iframe, "load", function() { + var contentWindow; + contentWindow = iframe.contentWindow; + if (contentWindow.$) { + contentWindow.$ = onload; + } else { + onload(); + } + }); + contentDocument = iframe.contentWindow.document; + contentDocument.open().write("" + uuid + ""); + contentDocument.close(); + } }; if (typeof define === "function" && define.amd) { define([], { - render: render + render: render$4 }); } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { - exports.render = render; + exports.render = render$4; } else { if (currentScriptURL) { setBaseURL(currentScriptURL.replace(/[^\/]*([?#].*)?$/, "")); } if (document.title === uuid) { - renderFrameContent(parseQueryString(document.location.hash.replace(/^#/, ""))); + render$2(document.body, parseQueryString(document.location.hash.replace(/^#/, ""))); } else { - defer(renderAll); + defer(render$3); } } diff --git a/dist/buttons.min.js b/dist/buttons.min.js index fec1a644..8d0032a4 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var t,e,n,a,o=window.document,i=window.encodeURIComponent,r=window.decodeURIComponent,l=window.Math,c=function(t){return o.createElement(t)},d=function(t){return o.createTextNode(t)};n="faa75404-3b97-5585-b449-4bc51338fbd1",t=(/^http:/.test(o.location)?"http":"https")+"://buttons.github.io/",e=function(e){t=e},a=!{}.hasOwnProperty.call(o,"currentScript")&&o.currentScript&&delete o.currentScript&&o.currentScript?o.currentScript.src:void 0;var s,h,u;s=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},h=function(t,e,n){var a;s(t,e,a=function(o){return t.removeEventListener?t.removeEventListener(""+e,a):t.detachEvent("on"+e,a),n(o)})},u=function(t){var e,n;/m/.test(o.readyState)||!/g/.test(o.readyState)&&!o.documentElement.doScroll?setTimeout(t):o.addEventListener?(n=0,h(o,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),h(window,"load",e)):(e=function(){/m/.test(o.readyState)&&(o.detachEvent("onreadystatechange",e),t())},o.attachEvent("onreadystatechange",e))};var p,f,g,m,w,b={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};p=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),b.hasOwnProperty(t)||(t="mark-github"),'"},f=function(t){var e,n;return(e=c("a")).href=t.href,/\.github\.com$/.test("."+e.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(e.href)&&(e.target="_top"):(e.href="#",e.target="_self"),e.className="btn",(n=t["aria-label"])&&e.setAttribute("aria-label",n),e.innerHTML=p(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),e.appendChild(d(" ")),e.appendChild(c("span")).appendChild(d(t["data-text"]||"")),o.body.appendChild(e)},g=function(t,e){var n,a,i,r,l,d;window.$=function(){window.$=null},i=0,n=function(){!i&&(i=1)&&(e.apply(null,arguments),$())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(d=new XMLHttpRequest,s(d,"abort",n),s(d,"error",n),s(d,"load",function(){n(200!==d.status,JSON.parse(d.responseText))}),d.open("GET",t),d.send()):(window._=function(t){window._=null,n(200!==t.meta.status,t.data)},(l=c("script")).async=!0,l.src=t+(/\?/.test(t)?"&":"?")+"callback=_",s(l,"error",r=function(){window._&&_({meta:{}})}),l.readyState&&s(l,"readystatechange",function(){"loaded"===l.readyState&&r()}),a=o.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?u(function(){a.appendChild(l)}):a.appendChild(l))},m=function(t){var e,n,a,o;"github.com"===t.hostname&&(a=t.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!a[6]&&(a[2]?(e="repos/"+a[1]+"/"+a[2],a[3]?(o="subscribers_count",n="watchers"):a[4]?(o="forks_count",n="network"):a[5]?(o="open_issues_count",n="issues"):(o="stargazers_count",n="stargazers")):(e="users/"+a[1],n=o="followers"),g("https://api.github.com/"+e,function(e,a){var i,r;e||(r=a[o],(i=c("a")).href=a.html_url+"/"+n,i.className="social-count",i.setAttribute("aria-label",r+" "+o.replace(/_count$/,"").replace("_"," ")+" on GitHub"),i.appendChild(c("b")),i.appendChild(c("i")),i.appendChild(c("span")).appendChild(d((""+r).replace(/\B(?=(\d{3})+(?!\d))/g,","))),t.parentNode.insertBefore(i,t.nextSibling))}))},w=function(t){var e;t&&(/^large$/i.test(t["data-size"])&&(o.body.className="large"),e=f(t),/^(true|1)$/i.test(t["data-show-count"])&&m(e))};var v,y,C,z,x,E;y=window.devicePixelRatio||1,v=function(t){return(y>1?l.ceil(l.round(t*y)/y*2)/2:l.ceil(t))||0},C=function(t){var e,n,a,o,i,r,c;return r=(a=t.contentWindow.document).documentElement,e=a.body,c=r.scrollWidth,i=r.scrollHeight,e.getBoundingClientRect&&(o=e.style.display,e.style.display="inline-block",n=e.getBoundingClientRect(),c=l.max(c,v(n.width||n.right-n.left)),i=l.max(i,v(n.height||n.bottom-n.top)),e.style.display=o),[c,i]},z=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"},x=function(){var t,e,n,a,i,r,l;if(e=[],o.querySelectorAll)e=o.querySelectorAll("a.github-button");else for(n=0,i=(l=o.getElementsByTagName("a")).length;n'+n+'' diff --git a/src/render-all.coffee b/src/batch.coffee similarity index 79% rename from src/render-all.coffee rename to src/batch.coffee index 1f838966..9eeb2828 100644 --- a/src/render-all.coffee +++ b/src/batch.coffee @@ -5,11 +5,11 @@ import { buttonClass } from "./config" import { - render -} from "./render" + render as renderContainer +} from "./container" ### istanbul ignore next ### -renderAll = -> +render = -> anchors = [] if document.querySelectorAll anchors = document.querySelectorAll "a.#{buttonClass}" @@ -17,9 +17,9 @@ renderAll = -> for anchor in document.getElementsByTagName "a" if ~" #{anchor.className} ".replace(/[ \t\n\f\r]+/g, " ").indexOf(" #{buttonClass} ") anchors.push anchor - render anchor for anchor in anchors + renderContainer anchor for anchor in anchors return export { - renderAll + render } diff --git a/src/button.coffee b/src/button.coffee index 96a8c710..9723de67 100644 --- a/src/button.coffee +++ b/src/button.coffee @@ -7,9 +7,10 @@ import { octicon } from "./octicons" -renderButton = (options) -> +render = (root, options) -> a = createElement "a" a.href = options.href + a.target = "_blank" if not /\.github\.com$/.test ".#{a.hostname}" a.href = "#" @@ -29,8 +30,8 @@ renderButton = (options) -> a.appendChild createTextNode " " span = a.appendChild createElement "span" span.appendChild createTextNode options["data-text"] or "" - document.body.appendChild a + root.appendChild a export { - renderButton + render } diff --git a/src/container.coffee b/src/container.coffee new file mode 100644 index 00000000..3a3ce6f2 --- /dev/null +++ b/src/container.coffee @@ -0,0 +1,88 @@ +import { + document + createElement +} from "./alias" +import { + baseURL + uuid +} from "./config" +import { + parseOptions +} from "./options" +import { + stringifyQueryString +} from "./querystring" +import { + onceEvent +} from "./event" +import { + render as renderContent +} from "./content" +import { + getFrameContentSize + setFrameSize +} from "./frame" +import { + render as batchRender +} from "./batch" + +### istanbul ignore next ### +render = (targetNode, options) -> + return batchRender() unless targetNode? + options = parseOptions targetNode unless options? + + if document.head.attachShadow + host = createElement "span" + host.title = title if title = options.title + root = host.attachShadow mode: "closed" + link = createElement "link" + link.rel = "stylesheet" + link.href = "#{baseURL}assets/css/buttons.css" + root.appendChild link + renderContent root.appendChild(createElement "span"), options + targetNode.parentNode.replaceChild host, targetNode + else + hash = "#" + stringifyQueryString options + + iframe = createElement "iframe" + iframe.setAttribute name, value for name, value of { + allowtransparency: true + scrolling: "no" + frameBorder: 0 + } + setFrameSize iframe, [1, 0] + iframe.style.border = "none" + iframe.src = "javascript:0" + iframe.title = title if title = options.title + + document.body.appendChild iframe + + onload = -> + size = getFrameContentSize iframe + iframe.parentNode.removeChild iframe + onceEvent iframe, "load", -> + setFrameSize iframe, size + return + iframe.src = "#{baseURL}buttons.html#{hash}" + targetNode.parentNode.replaceChild iframe, targetNode + return + + onceEvent iframe, "load", -> + contentWindow = iframe.contentWindow + if contentWindow.$ + contentWindow.$ = onload + else + onload() + return + + contentDocument = iframe.contentWindow.document + contentDocument.open().write \ + """ + #{uuid} + """ + contentDocument.close() + return + +export { + render +} diff --git a/src/frame-content.coffee b/src/content.coffee similarity index 52% rename from src/frame-content.coffee rename to src/content.coffee index b8edb503..9905749a 100644 --- a/src/frame-content.coffee +++ b/src/content.coffee @@ -2,19 +2,19 @@ import { document } from "./alias" import { - renderButton + render as renderButton } from "./button" import { - renderSocialCount + render as renderSocialCount } from "./social-count" -renderFrameContent = (options) -> +render = (root, options) -> return unless options - document.body.className = "large" if /^large$/i.test options["data-size"] - button = renderButton options + root.className = "large" if /^large$/i.test options["data-size"] + button = renderButton root, options renderSocialCount button if /^(true|1)$/i.test options["data-show-count"] return export { - renderFrameContent + render } diff --git a/src/fetch.coffee b/src/fetch.coffee index 960df3bc..0fce4c84 100644 --- a/src/fetch.coffee +++ b/src/fetch.coffee @@ -9,16 +9,17 @@ import { defer } from "./defer" -fetch = (url, func) -> - window.$ = -> - window.$ = null - return +fetch = (url, func, hook) -> + if hook + window[hook] = -> + window[hook] = null + return onceToken = 0 callback = -> if !onceToken and onceToken = 1 func.apply null, arguments - $() + window[hook]() if hook return if window.XMLHttpRequest and "withCredentials" of XMLHttpRequest.prototype diff --git a/src/frame-size.coffee b/src/frame.coffee similarity index 100% rename from src/frame-size.coffee rename to src/frame.coffee diff --git a/src/main.coffee b/src/main.coffee index b5d93fec..37f629b9 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -15,23 +15,23 @@ import { defer } from "./defer" import { - renderFrameContent -} from "./frame-content" + render as renderContainer +} from "./container" import { - render -} from "./render" + render as renderContent +} from "./content" import { - renderAll -} from "./render-all" + render as batchRender +} from "./batch" if typeof define is "function" and define.amd - define [], { render: render } + define [], { render: renderContainer } else if typeof exports is "object" and typeof exports.nodeName isnt "string" - exports.render = render + exports.render = renderContainer else setBaseURL currentScriptURL.replace /[^/]*([?#].*)?$/, "" if currentScriptURL if document.title is uuid - renderFrameContent parseQueryString document.location.hash.replace /^#/, "" + renderContent document.body, parseQueryString document.location.hash.replace /^#/, "" else - defer renderAll + defer batchRender diff --git a/src/options.coffee b/src/options.coffee index 09b92395..29ef014d 100644 --- a/src/options.coffee +++ b/src/options.coffee @@ -13,13 +13,4 @@ export parseOptions = (anchor) -> options[attribute] = anchor.getAttribute attribute if !options["data-text"]? options["data-text"] = anchor.textContent or anchor.innerText - - deprecate = (oldAttribute, newAttribute, newValue) -> - if anchor.getAttribute oldAttribute - options[newAttribute] = newValue - window.console and console.warn "GitHub Buttons deprecated `#{oldAttribute}`: use `#{newAttribute}=\"#{newValue}\"` instead. Please refer to https://github.com/ntkme/github-buttons#readme for more info." - return - deprecate "data-count-api", "data-show-count", "true" - deprecate "data-style", "data-size", "large" - options diff --git a/src/render.coffee b/src/render.coffee deleted file mode 100644 index 22cd202f..00000000 --- a/src/render.coffee +++ /dev/null @@ -1,74 +0,0 @@ -import { - document - createElement -} from "./alias" -import { - baseURL - uuid -} from "./config" -import { - parseOptions -} from "./options" -import { - stringifyQueryString -} from "./querystring" -import { - onceEvent -} from "./event" -import { - getFrameContentSize - setFrameSize -} from "./frame-size" -import { - renderAll -} from "./render-all" - -### istanbul ignore next ### -render = (targetNode, options) -> - return renderAll() unless targetNode? - options = parseOptions targetNode unless options? - - hash = "#" + stringifyQueryString options - - iframe = createElement "iframe" - iframe.setAttribute name, value for name, value of { - allowtransparency: true - scrolling: "no" - frameBorder: 0 - } - setFrameSize iframe, [1, 0] - iframe.style.border = "none" - iframe.src = "javascript:0" - iframe.title = title if title = options.title - - document.body.appendChild iframe - - onload = -> - size = getFrameContentSize iframe - iframe.parentNode.removeChild iframe - onceEvent iframe, "load", -> - setFrameSize iframe, size - return - iframe.src = "#{baseURL}buttons.html#{hash}" - targetNode.parentNode.replaceChild iframe, targetNode - return - - onceEvent iframe, "load", -> - contentWindow = iframe.contentWindow - if contentWindow.$ - contentWindow.$ = onload - else - onload() - return - - contentDocument = iframe.contentWindow.document - contentDocument.open().write \ - """ - #{uuid} - """ - contentDocument.close() - return - -export { - render -} diff --git a/src/social-count.coffee b/src/social-count.coffee index ca7a8cb0..c5a98359 100644 --- a/src/social-count.coffee +++ b/src/social-count.coffee @@ -2,6 +2,7 @@ import { apiBaseURL } from "./config" import { + document createElement createTextNode } from "./alias" @@ -9,7 +10,7 @@ import { fetch } from "./fetch" -renderSocialCount = (button) -> +render = (button) -> return unless button.hostname is "github.com" match = button.pathname.replace(/^(?!\/)/, "/").match /// @@ -43,12 +44,16 @@ renderSocialCount = (button) -> api = "users/#{match[1]}" href = property = "followers" + ### istanbul ignore if ### + hook = "$" unless document.getElementsByTagName("head")[0].attachShadow + fetch apiBaseURL + api, (error, json) -> if !error data = json[property] a = createElement "a" a.href = json.html_url + "/" + href + a.target = "_blank" a.className = "social-count" a.setAttribute "aria-label", "#{data} #{property.replace(/_count$/, "").replace("_", " ")} on GitHub" a.appendChild createElement "b" @@ -57,8 +62,9 @@ renderSocialCount = (button) -> span.appendChild createTextNode "#{data}".replace /\B(?=(\d{3})+(?!\d))/g, "," button.parentNode.insertBefore a, button.nextSibling return + , hook return export { - renderSocialCount + render } diff --git a/test/unit/button.spec.coffee b/test/unit/button.spec.coffee index 8e166846..ba988541 100644 --- a/test/unit/button.spec.coffee +++ b/test/unit/button.spec.coffee @@ -1,34 +1,36 @@ import { - renderButton + render } from "@/button" describe "Button", -> - describe "renderButton(config)", -> + root = document.body + + describe "render(root, config)", -> beforeEach -> - sinon.stub document.body, "appendChild" + sinon.stub root, "appendChild" afterEach -> - document.body.appendChild.restore() + root.appendChild.restore() - it "should append the button to document.body when the necessary config is given", -> - renderButton {} - expect document.body.appendChild + it "should append the button to root when the necessary config is given", -> + render root, {} + expect root.appendChild .to.have.been.calledOnce - button = document.body.appendChild.args[0][0] + button = root.appendChild.args[0][0] expect button .to.have.property "className" .and.equal "btn" it "should append the button with given href", -> config = "href": "https://ntkme.github.com/" - renderButton config - button = document.body.appendChild.args[0][0] + render root, config + button = root.appendChild.args[0][0] expect button.getAttribute "href" .to.equal config.href it "should create a button with href # if domain is not github", -> - renderButton "href": "https://twitter/ntkme" - button = document.body.appendChild.args[0][0] + render root, "href": "https://twitter/ntkme" + button = root.appendChild.args[0][0] expect button .to.have.property "href" .to.equal document.location.href + "#" @@ -48,8 +50,8 @@ describe "Button", -> "\rjavascript:" "\fjavascript:" ] - renderButton "href": protocol - button = document.body.appendChild.args[i][0] + render root, "href": protocol + button = root.appendChild.args[i][0] expect button .to.have.property "href" .to.equal document.location.href + "#" @@ -63,15 +65,15 @@ describe "Button", -> "https://codeload.github.com/ntkme/github-buttons/zip/master" "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip" ] - renderButton "href": url - button = document.body.appendChild.args[i][0] + render root, "href": url + button = root.appendChild.args[i][0] expect button .to.have.property "target" .to.equal "_top" it "should append the button with the default icon", -> - renderButton {} - button = document.body.appendChild.args[0][0] + render root, {} + button = root.appendChild.args[0][0] expect " #{button.firstChild.getAttribute "class"} ".indexOf " octicon " .to.be.at.least 0 expect " #{button.firstChild.getAttribute "class"} ".indexOf " octicon-mark-github " @@ -79,21 +81,21 @@ describe "Button", -> it "should append the button with given icon", -> config = "data-icon": "octicon-star" - renderButton config - button = document.body.appendChild.args[0][0] + render root, config + button = root.appendChild.args[0][0] expect " #{button.firstChild.getAttribute "class"} ".indexOf " #{config["data-icon"]} " .to.be.at.least 0 it "should append the button with given text", -> config = "data-text": "Follow" - renderButton config - button = document.body.appendChild.args[0][0] + render root, config + button = root.appendChild.args[0][0] expect button.lastChild.innerHTML .to.equal config["data-text"] it "should append the button with given aria label", -> config = "aria-label": "GitHub" - renderButton config - button = document.body.appendChild.args[0][0] + render root, config + button = root.appendChild.args[0][0] expect button.getAttribute "aria-label" .to.equal config["aria-label"] diff --git a/test/unit/content.spec.coffee b/test/unit/content.spec.coffee new file mode 100644 index 00000000..19ffd4d5 --- /dev/null +++ b/test/unit/content.spec.coffee @@ -0,0 +1,28 @@ +import { + render +} from "@/content" + +describe "Frame Content", -> + root = document.body + + describe "render(root, config)", -> + className = root.className + + afterEach -> + root.className = className + + it "should do nothing when no option given", -> + render root + + it "should set root.className when data-size is large", -> + render root, "data-size": "large" + expect root.className + .to.equal "large" + + it "should call Button::render()", -> + render root, "href": "https://google.com/" + + it "should call SocialCount::render() when data-show-count is true", -> + render root, + "href": "https://google.com/" + "data-show-count": true diff --git a/test/unit/frame-content.spec.coffee b/test/unit/frame-content.spec.coffee deleted file mode 100644 index 666f0799..00000000 --- a/test/unit/frame-content.spec.coffee +++ /dev/null @@ -1,26 +0,0 @@ -import { - renderFrameContent -} from "@/frame-content" - -describe "Frame Content", -> - describe "renderFrameContent(config)", -> - className = document.body.className - - afterEach -> - document.body.className = className - - it "should do nothing when no option given", -> - renderFrameContent() - - it "should set document.body.className when data-size is large", -> - renderFrameContent "data-size": "large" - expect document.body.className - .to.equal "large" - - it "should call renderButton()", -> - renderFrameContent "href": "https://google.com/" - - it "should call renderSocialCount() when data-show-count is true", -> - renderFrameContent - "href": "https://google.com/" - "data-show-count": true diff --git a/test/unit/frame-size.spec.coffee b/test/unit/frame.spec.coffee similarity index 98% rename from test/unit/frame-size.spec.coffee rename to test/unit/frame.spec.coffee index 36adb0b7..c1126d5c 100644 --- a/test/unit/frame-size.spec.coffee +++ b/test/unit/frame.spec.coffee @@ -4,9 +4,9 @@ import { import { getFrameContentSize setFrameSize -} from "@/frame-size" +} from "@/frame" -describe "Frame Size", -> +describe "Frame", -> iframe = null getRandomInt = (min = 0, max = 1000) -> diff --git a/test/unit/jsonp.spec.coffee b/test/unit/jsonp.spec.coffee index a1899acf..4c64eccf 100644 --- a/test/unit/jsonp.spec.coffee +++ b/test/unit/jsonp.spec.coffee @@ -3,7 +3,7 @@ import { } from "@/fetch" describe "JSON-P", -> - describe "fetch(url, func)", -> + describe "fetch(url, func, hook)", -> jsonp = fetch XMLHttpRequest = window.XMLHttpRequest @@ -23,9 +23,15 @@ describe "JSON-P", -> expect window._ .to.be.a "function" + it "should set up the hook function", -> + jsonp "hello", -> + return + , "$" + expect window.$ .to.be.a "function" + it "should setup the script and add callback query to request url", -> url = "/random/url/" + new Date().getTime() @@ -64,6 +70,7 @@ describe "JSON-P", -> expect json .to.deep.equal response.data done() + , "$" window._ response diff --git a/test/unit/options.spec.coffee b/test/unit/options.spec.coffee index d3ab92d3..00778e10 100644 --- a/test/unit/options.spec.coffee +++ b/test/unit/options.spec.coffee @@ -68,25 +68,12 @@ describe "Options", -> .to.have.property "data-size" .and.equal size - it "should parse the attribute data-style for backward compatibility", -> - a.setAttribute "data-style", "mega" - expect parseOptions a - .to.have.property "data-size" - .and.equal "large" - it "should parse the attribute data-show-count", -> a.setAttribute "data-show-count", "true" expect parseOptions a .to.have.property "data-show-count" .and.equal "true" - it "should parse the attribute data-count-api for backward compatibility", -> - api = "/repos/:user/:repo#item" - a.setAttribute "data-count-api", api - expect parseOptions a - .to.have.property "data-show-count" - .and.equal "true" - it "should parse the attribute aria-label", -> label = "GitHub" a.setAttribute "aria-label", label diff --git a/test/unit/social-count.spec.coffee b/test/unit/social-count.spec.coffee index b385fe56..aaa80ad1 100644 --- a/test/unit/social-count.spec.coffee +++ b/test/unit/social-count.spec.coffee @@ -2,13 +2,13 @@ import { setApiBaseURL } from "@/config" import { - renderSocialCount + render } from "@/social-count" setApiBaseURL "/base/test/fixtures/api.github.com/" describe "Social Sount", -> - describe "renderSocialCount(button)", -> + describe "render(button)", -> button = null head = document.getElementsByTagName("head")[0] @@ -25,7 +25,7 @@ describe "Social Sount", -> func.apply null, arguments return button.href = url - renderSocialCount button + render button it "should append the count when a known button type is given", (done) -> testRenderCount "https://github.com/ntkme", (count) -> @@ -134,11 +134,11 @@ describe "Social Sount", -> sinon.stub document.body, "insertBefore" button.href = "https://twitter.com/" - renderSocialCount button + render button button.href = "https://github.com/" - renderSocialCount button + render button button.href = "https://github.com/ntkme/github-buttons/test" - renderSocialCount button + render button expect document.body.insertBefore .to.have.not.been.called From 08f0ecb1dc02ccade962890a66a74dfdd53fc7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 4 Jul 2018 16:45:04 -0700 Subject: [PATCH 0060/1193] Allow package-lock.json to be modified in CI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b4168a3b..f60a7d51 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,6 +14,6 @@ jobs: paths: - node_modules key: v1-dependencies-{{ checksum "package.json" }} - - run: npm run build && git diff --exit-code + - run: npm run build && git diff --exit-code -- :^package-lock.json - run: npm test -- --browsers ChromeHeadless,Firefox - run: test -z "$CIRCLE_PULL_REQUEST" && ./node_modules/.bin/codecov From d63fffdc35e1a3940145f1848d1a2532e1b019d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 4 Jul 2018 17:35:04 -0700 Subject: [PATCH 0061/1193] Update dependency caching config --- .circleci/config.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f60a7d51..bd31e9e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,13 +7,14 @@ jobs: - checkout - restore_cache: keys: - - v1-dependencies-{{ checksum "package.json" }} - - v1-dependencies- + - node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }} + - node-v1-{{ .Branch }}- + - node-v1- - run: npm install - save_cache: paths: - node_modules - key: v1-dependencies-{{ checksum "package.json" }} + key: node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }} - run: npm run build && git diff --exit-code -- :^package-lock.json - run: npm test -- --browsers ChromeHeadless,Firefox - run: test -z "$CIRCLE_PULL_REQUEST" && ./node_modules/.bin/codecov From 2ed3ab8710d88e3a22769ff88fc716c6e7a5bd3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 4 Jul 2018 20:25:43 -0700 Subject: [PATCH 0062/1193] Improve shadow DOM browser support detection --- assets/js/app.js | 4 ++-- assets/js/app.min.js | 2 +- dist/buttons.common.js | 4 ++-- dist/buttons.esm.js | 4 ++-- dist/buttons.js | 4 ++-- dist/buttons.min.js | 2 +- src/container.coffee | 2 +- src/social-count.coffee | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index bdc421f5..00476e0c 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -303,7 +303,7 @@ } /* istanbul ignore if */ - if (!document.getElementsByTagName("head")[0].attachShadow) { + if (!HTMLElement.prototype.attachShadow) { hook = "$"; } fetch(apiBaseURL + api, function(error, json) { @@ -353,7 +353,7 @@ if (options == null) { options = parseOptions(targetNode); } - if (document.head.attachShadow) { + if (HTMLElement.prototype.attachShadow) { host = createElement("span"); if (title = options.title) { host.title = title; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 72f3d24c..cb6fc238 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var p,a,t,e,n,f=window.document,s=window.encodeURIComponent,c=(window.decodeURIComponent,window.Math),w=function(t){return f.createElement(t)},u=function(t){return f.createTextNode(t)};a="github-button",p=(/^http:/.test(f.location)?"http":"https")+"://buttons.github.io/",t=function(t){p=t},e="currentScript",n=!{}.hasOwnProperty.call(f,e)&&f[e]&&delete f[e]&&f[e]?f[e].src:void 0;var l,g,h,d,o,m,b,v=function(t){var e,n,o;for(e in n=[],t)null!=(o=t[e])&&n.push(s(e)+"="+s(o));return n.join("&")};l=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},g=function(e,n,o){var s;l(e,n,s=function(t){return e.removeEventListener?e.removeEventListener(""+n,s):e.detachEvent("on"+n,s),o(t)})},h=function(t){var e,n;/m/.test(f.readyState)||!/g/.test(f.readyState)&&!f.documentElement.doScroll?setTimeout(t):f.addEventListener?(n=0,g(f,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),g(window,"load",e)):(e=function(){/m/.test(f.readyState)&&(f.detachEvent("onreadystatechange",e),t())},f.attachEvent("onreadystatechange",e))},o=window.devicePixelRatio||1,d=function(t){return(1'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};i=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(t)||(t="mark-github"),'"},r=function(t,e){var n,o;return(n=w("a")).href=e.href,n.target="_blank",/\.github\.com$/.test("."+n.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(n.href)&&(n.target="_top"):(n.href="#",n.target="_self"),n.className="btn",(o=e["aria-label"])&&n.setAttribute("aria-label",o),n.innerHTML=i(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),n.appendChild(u(" ")),n.appendChild(w("span")).appendChild(u(e["data-text"]||"")),t.appendChild(n)},y=function(t,e,n){var o,s,i,r,a,c;n&&(window[n]=function(){window[n]=null}),i=0,o=function(){!i&&(i=1)&&(e.apply(null,arguments),n&&window[n]())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(c=new XMLHttpRequest,l(c,"abort",o),l(c,"error",o),l(c,"load",function(){o(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",t),c.send()):(window._=function(t){window._=null,o(200!==t.meta.status,t.data)},(a=w("script")).async=!0,a.src=t+(/\?/.test(t)?"&":"?")+"callback=_",l(a,"error",r=function(){window._&&_({meta:{}})}),a.readyState&&l(a,"readystatechange",function(){"loaded"===a.readyState&&r()}),s=f.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?h(function(){s.appendChild(a)}):s.appendChild(a))},C=function(s){var t,e,i,n,r;"github.com"===s.hostname&&(n=s.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!n[6]&&(n[2]?(t="repos/"+n[1]+"/"+n[2],n[3]?(r="subscribers_count",i="watchers"):n[4]?(r="forks_count",i="network"):n[5]?(r="open_issues_count",i="issues"):(r="stargazers_count",i="stargazers")):(t="users/"+n[1],i=r="followers"),f.getElementsByTagName("head")[0].attachShadow||(e="$"),y("https://api.github.com/"+t,function(t,e){var n,o;t||(o=e[r],(n=w("a")).href=e.html_url+"/"+i,n.target="_blank",n.className="social-count",n.setAttribute("aria-label",o+" "+r.replace(/_count$/,"").replace("_"," ")+" on GitHub"),n.appendChild(w("b")),n.appendChild(w("i")),n.appendChild(w("span")).appendChild(u((""+o).replace(/\B(?=(\d{3})+(?!\d))/g,","))),s.parentNode.insertBefore(n,s.nextSibling))},e))},$=function(t,e){var n;e&&(/^large$/i.test(e["data-size"])&&(t.className="large"),n=r(t,e),/^(true|1)$/i.test(e["data-show-count"])&&C(n))},x=function(e,t){var n,o,s,i,r,a,c,u,l,h,d;if(null==e)return z();if(null==t&&(t=function(t){var e,n,o,s,i;for(s={href:t.href,title:t.title,"aria-label":t.getAttribute("aria-label")},n=0,o=(i=["icon","text","size","show-count"]).length;nfaa75404-3b97-5585-b449-4bc51338fbd1 From ec14979f23349c21ba2fa4004c41c60d745ed8d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 5 Jul 2018 01:03:05 -0700 Subject: [PATCH 0067/1193] Fix previewing with social count --- assets/js/app.js | 6 ++++-- assets/js/app.min.js | 2 +- dist/buttons.common.js | 6 ++++-- dist/buttons.esm.js | 6 ++++-- dist/buttons.js | 8 +++++--- dist/buttons.min.js | 2 +- src/config.coffee | 3 +++ src/main.coffee | 3 ++- src/social-count.coffee | 3 ++- 9 files changed, 26 insertions(+), 13 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 1ec2df1f..728c7938 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -17,12 +17,14 @@ return document.createTextNode(text); }; - var apiBaseURL, baseURL, buttonClass, setBaseURL, uuid; + var apiBaseURL, baseURL, buttonClass, isInFrame, setBaseURL, uuid; buttonClass = "github-button"; uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; + isInFrame = document.title === uuid; + /* istanbul ignore next */ @@ -303,7 +305,7 @@ } /* istanbul ignore if */ - if (!HTMLElement.prototype.attachShadow) { + if (isInFrame) { hook = "$"; } fetch(apiBaseURL + api, function(error, json) { diff --git a/assets/js/app.min.js b/assets/js/app.min.js index cb6fc238..19333b23 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var p,a,t,e,n,f=window.document,s=window.encodeURIComponent,c=(window.decodeURIComponent,window.Math),w=function(t){return f.createElement(t)},u=function(t){return f.createTextNode(t)};a="github-button",p=(/^http:/.test(f.location)?"http":"https")+"://buttons.github.io/",t=function(t){p=t},e="currentScript",n=!{}.hasOwnProperty.call(f,e)&&f[e]&&delete f[e]&&f[e]?f[e].src:void 0;var l,g,h,d,o,m,b,v=function(t){var e,n,o;for(e in n=[],t)null!=(o=t[e])&&n.push(s(e)+"="+s(o));return n.join("&")};l=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},g=function(e,n,o){var s;l(e,n,s=function(t){return e.removeEventListener?e.removeEventListener(""+n,s):e.detachEvent("on"+n,s),o(t)})},h=function(t){var e,n;/m/.test(f.readyState)||!/g/.test(f.readyState)&&!f.documentElement.doScroll?setTimeout(t):f.addEventListener?(n=0,g(f,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),g(window,"load",e)):(e=function(){/m/.test(f.readyState)&&(f.detachEvent("onreadystatechange",e),t())},f.attachEvent("onreadystatechange",e))},o=window.devicePixelRatio||1,d=function(t){return(1'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};i=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),L.hasOwnProperty(t)||(t="mark-github"),'"},r=function(t,e){var n,o;return(n=w("a")).href=e.href,n.target="_blank",/\.github\.com$/.test("."+n.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(n.href)&&(n.target="_top"):(n.href="#",n.target="_self"),n.className="btn",(o=e["aria-label"])&&n.setAttribute("aria-label",o),n.innerHTML=i(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),n.appendChild(u(" ")),n.appendChild(w("span")).appendChild(u(e["data-text"]||"")),t.appendChild(n)},y=function(t,e,n){var o,s,i,r,a,c;n&&(window[n]=function(){window[n]=null}),i=0,o=function(){!i&&(i=1)&&(e.apply(null,arguments),n&&window[n]())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(c=new XMLHttpRequest,l(c,"abort",o),l(c,"error",o),l(c,"load",function(){o(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",t),c.send()):(window._=function(t){window._=null,o(200!==t.meta.status,t.data)},(a=w("script")).async=!0,a.src=t+(/\?/.test(t)?"&":"?")+"callback=_",l(a,"error",r=function(){window._&&_({meta:{}})}),a.readyState&&l(a,"readystatechange",function(){"loaded"===a.readyState&&r()}),s=f.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?h(function(){s.appendChild(a)}):s.appendChild(a))},C=function(s){var t,e,i,n,r;"github.com"===s.hostname&&(n=s.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!n[6]&&(n[2]?(t="repos/"+n[1]+"/"+n[2],n[3]?(r="subscribers_count",i="watchers"):n[4]?(r="forks_count",i="network"):n[5]?(r="open_issues_count",i="issues"):(r="stargazers_count",i="stargazers")):(t="users/"+n[1],i=r="followers"),HTMLElement.prototype.attachShadow||(e="$"),y("https://api.github.com/"+t,function(t,e){var n,o;t||(o=e[r],(n=w("a")).href=e.html_url+"/"+i,n.target="_blank",n.className="social-count",n.setAttribute("aria-label",o+" "+r.replace(/_count$/,"").replace("_"," ")+" on GitHub"),n.appendChild(w("b")),n.appendChild(w("i")),n.appendChild(w("span")).appendChild(u((""+o).replace(/\B(?=(\d{3})+(?!\d))/g,","))),s.parentNode.insertBefore(n,s.nextSibling))},e))},$=function(t,e){var n;e&&(/^large$/i.test(e["data-size"])&&(t.className="large"),n=r(t,e),/^(true|1)$/i.test(e["data-show-count"])&&C(n))},x=function(e,t){var n,o,s,i,r,a,c,u,l,h,d;if(null==e)return z();if(null==t&&(t=function(t){var e,n,o,s,i;for(s={href:t.href,title:t.title,"aria-label":t.getAttribute("aria-label")},n=0,o=(i=["icon","text","size","show-count"]).length;nfaa75404-3b97-5585-b449-4bc51338fbd1"); + contentDocument.open().write("" + uuid + ""); contentDocument.close(); } }; - var render$4; + var render$5; /* istanbul ignore next */ - render$4 = function() { + render$5 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -434,7 +449,7 @@ } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render$3(anchor); + render$4(anchor); } }; @@ -506,7 +521,7 @@ el: '#app', template: '#app-template', mounted: function() { - setTimeout(render$4); + setTimeout(render$5); }, data: function() { return { diff --git a/assets/js/app.min.js b/assets/js/app.min.js index def51dd1..7bb5de40 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var p,a,o,t,f,e,n,w=window.document,s=window.encodeURIComponent,c=(window.decodeURIComponent,window.Math),g=function(t){return w.createElement(t)},u=function(t){return w.createTextNode(t)};a="github-button",f="faa75404-3b97-5585-b449-4bc51338fbd1",o=w.title===f,p=(/^http:/.test(w.location)?"http":"https")+"://buttons.github.io/",t=function(t){p=t},e="currentScript",n=!{}.hasOwnProperty.call(w,e)&&w[e]&&delete w[e]&&w[e]?w[e].src:void 0;var l,m,h,d,i,b,v,y=function(t){var e,n,o;for(e in n=[],t)null!=(o=t[e])&&n.push(s(e)+"="+s(o));return n.join("&")};l=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},m=function(e,n,o){var s;l(e,n,s=function(t){return e.removeEventListener?e.removeEventListener(""+n,s):e.detachEvent("on"+n,s),o(t)})},h=function(t){var e,n;/m/.test(w.readyState)||!/g/.test(w.readyState)&&!w.documentElement.doScroll?setTimeout(t):w.addEventListener?(n=0,m(w,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),m(window,"load",e)):(e=function(){/m/.test(w.readyState)&&(w.detachEvent("onreadystatechange",e),t())},w.attachEvent("onreadystatechange",e))},i=window.devicePixelRatio||1,d=function(t){return(1'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};r=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(t)||(t="mark-github"),'"},C=function(t,e){var n,o;return(n=g("a")).href=e.href,n.target="_blank",/\.github\.com$/.test("."+n.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(n.href)&&(n.target="_top"):(n.href="#",n.target="_self"),n.className="btn",(o=e["aria-label"])&&n.setAttribute("aria-label",o),n.innerHTML=r(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),n.appendChild(u(" ")),n.appendChild(g("span")).appendChild(u(e["data-text"]||"")),t.appendChild(n)},$=function(t,e,n){var o,s,i,r,a,c;n&&(window[n]=function(){window[n]=null}),i=0,o=function(){!i&&(i=1)&&(e.apply(null,arguments),n&&window[n]())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(c=new XMLHttpRequest,l(c,"abort",o),l(c,"error",o),l(c,"load",function(){o(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",t),c.send()):(window._=function(t){window._=null,o(200!==t.meta.status,t.data)},(a=g("script")).async=!0,a.src=t+(/\?/.test(t)?"&":"?")+"callback=_",l(a,"error",r=function(){window._&&_({meta:{}})}),a.readyState&&l(a,"readystatechange",function(){"loaded"===a.readyState&&r()}),s=w.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?h(function(){s.appendChild(a)}):s.appendChild(a))},x=function(s){var t,e,i,n,r;"github.com"===s.hostname&&(n=s.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!n[6]&&(n[2]?(t="repos/"+n[1]+"/"+n[2],n[3]?(r="subscribers_count",i="watchers"):n[4]?(r="forks_count",i="network"):n[5]?(r="open_issues_count",i="issues"):(r="stargazers_count",i="stargazers")):(t="users/"+n[1],i=r="followers"),o&&(e="$"),$("https://api.github.com/"+t,function(t,e){var n,o;t||(o=e[r],(n=g("a")).href=e.html_url+"/"+i,n.target="_blank",n.className="social-count",n.setAttribute("aria-label",o+" "+r.replace(/_count$/,"").replace("_"," ")+" on GitHub"),n.appendChild(g("b")),n.appendChild(g("i")),n.appendChild(g("span")).appendChild(u((""+o).replace(/\B(?=(\d{3})+(?!\d))/g,","))),s.parentNode.insertBefore(n,s.nextSibling))},e))},z=function(t,e){var n;e&&(/^large$/i.test(e["data-size"])&&(t.className="large"),n=C(t,e),/^(true|1)$/i.test(e["data-show-count"])&&x(n))},L=function(e,t){var n,o,s,i,r,a,c,u,l,h,d;if(null==e)return E();if(null==t&&(t=function(t){var e,n,o,s,i;for(s={href:t.href,title:t.title,"aria-label":t.getAttribute("aria-label")},n=0,o=(i=["icon","text","size","show-count"]).length;n'+f+' - - +faa75404-3b97-5585-b449-4bc51338fbd1 diff --git a/dist/buttons.common.js b/dist/buttons.common.js index a03d6c9e..7fbf486c 100644 --- a/dist/buttons.common.js +++ b/dist/buttons.common.js @@ -91,6 +91,24 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; +var css = "html{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{margin:0;font-size:0;white-space:nowrap}a{color:#24292e;text-decoration:none;outline:0}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:middle;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}:host{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .btn,:host .social-count{vertical-align:bottom}\n"; + +var render; + +render = function(root) { + var style; + style = document.createElement("style"); + style.type = "text/css"; + root.appendChild(style); + + /* istanbul ignore if */ + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } +}; + var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; var octicon; @@ -105,9 +123,9 @@ octicon = function(icon, height) { return "" + data[icon].path + ""; }; -var render; +var render$1; -render = function(root, options) { +render$1 = function(root, options) { var a, ariaLabel, span; a = createElement("a"); a.href = options.href; @@ -225,9 +243,9 @@ fetch = function(url, func, hook) { } }; -var render$1; +var render$2; -render$1 = function(button) { +render$2 = function(button) { var api, hook, href, match, property; if (button.hostname !== "github.com") { return; @@ -278,9 +296,9 @@ render$1 = function(button) { }, hook); }; -var render$2; +var render$3; -render$2 = function(root, options) { +render$3 = function(root, options) { var button; if (!options) { return; @@ -288,9 +306,10 @@ render$2 = function(root, options) { if (/^large$/i.test(options["data-size"])) { root.className = "large"; } - button = render(root, options); + render(root); + button = render$1(root, options); if (/^(true|1)$/i.test(options["data-show-count"])) { - render$1(button); + render$2(button); } }; @@ -330,12 +349,12 @@ setFrameSize = function(iframe, size) { iframe.style.height = size[1] + "px"; }; -var render$3; +var render$4; /* istanbul ignore next */ -render$3 = function() { +render$4 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -358,9 +377,9 @@ render$3 = function() { /* istanbul ignore next */ exports.render = function(targetNode, options) { - var contentDocument, hash, host, iframe, link, name, onload, ref, root, title, value; + var contentDocument, hash, host, iframe, name, onload, ref, root, title, value; if (targetNode == null) { - return render$3(); + return render$4(); } if (options == null) { options = parseOptions(targetNode); @@ -373,11 +392,7 @@ exports.render = function(targetNode, options) { root = host.attachShadow({ mode: "closed" }); - link = createElement("link"); - link.rel = "stylesheet"; - link.href = baseURL + "assets/css/buttons.css"; - root.appendChild(link); - render$2(root.appendChild(createElement("span")), options); + render$3(root.appendChild(createElement("span")), options); targetNode.parentNode.replaceChild(host, targetNode); } else { hash = "#" + stringify(options); @@ -418,7 +433,7 @@ exports.render = function(targetNode, options) { } }); contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); + contentDocument.open().write("" + uuid + ""); contentDocument.close(); } }; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index 01507435..ea28c22a 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -87,6 +87,24 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; +var css = "html{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{margin:0;font-size:0;white-space:nowrap}a{color:#24292e;text-decoration:none;outline:0}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:middle;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}:host{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .btn,:host .social-count{vertical-align:bottom}\n"; + +var render; + +render = function(root) { + var style; + style = document.createElement("style"); + style.type = "text/css"; + root.appendChild(style); + + /* istanbul ignore if */ + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } +}; + var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; var octicon; @@ -101,9 +119,9 @@ octicon = function(icon, height) { return "" + data[icon].path + ""; }; -var render; +var render$1; -render = function(root, options) { +render$1 = function(root, options) { var a, ariaLabel, span; a = createElement("a"); a.href = options.href; @@ -221,9 +239,9 @@ fetch = function(url, func, hook) { } }; -var render$1; +var render$2; -render$1 = function(button) { +render$2 = function(button) { var api, hook, href, match, property; if (button.hostname !== "github.com") { return; @@ -274,9 +292,9 @@ render$1 = function(button) { }, hook); }; -var render$2; +var render$3; -render$2 = function(root, options) { +render$3 = function(root, options) { var button; if (!options) { return; @@ -284,9 +302,10 @@ render$2 = function(root, options) { if (/^large$/i.test(options["data-size"])) { root.className = "large"; } - button = render(root, options); + render(root); + button = render$1(root, options); if (/^(true|1)$/i.test(options["data-show-count"])) { - render$1(button); + render$2(button); } }; @@ -326,12 +345,12 @@ setFrameSize = function(iframe, size) { iframe.style.height = size[1] + "px"; }; -var render$3; +var render$4; /* istanbul ignore next */ -render$3 = function() { +render$4 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -347,19 +366,19 @@ render$3 = function() { } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render$4(anchor); + render$5(anchor); } }; -var render$4; +var render$5; /* istanbul ignore next */ -render$4 = function(targetNode, options) { - var contentDocument, hash, host, iframe, link, name, onload, ref, root, title, value; +render$5 = function(targetNode, options) { + var contentDocument, hash, host, iframe, name, onload, ref, root, title, value; if (targetNode == null) { - return render$3(); + return render$4(); } if (options == null) { options = parseOptions(targetNode); @@ -372,11 +391,7 @@ render$4 = function(targetNode, options) { root = host.attachShadow({ mode: "closed" }); - link = createElement("link"); - link.rel = "stylesheet"; - link.href = baseURL + "assets/css/buttons.css"; - root.appendChild(link); - render$2(root.appendChild(createElement("span")), options); + render$3(root.appendChild(createElement("span")), options); targetNode.parentNode.replaceChild(host, targetNode); } else { hash = "#" + stringify(options); @@ -417,9 +432,9 @@ render$4 = function(targetNode, options) { } }); contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); + contentDocument.open().write("" + uuid + ""); contentDocument.close(); } }; -export { render$4 as render }; +export { render$5 as render }; diff --git a/dist/buttons.js b/dist/buttons.js index 064421ff..2b296e0a 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -149,6 +149,24 @@ return options; }; + var css = "html{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{margin:0;font-size:0;white-space:nowrap}a{color:#24292e;text-decoration:none;outline:0}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:middle;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}:host{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .btn,:host .social-count{vertical-align:bottom}\n"; + + var render; + + render = function(root) { + var style; + style = document.createElement("style"); + style.type = "text/css"; + root.appendChild(style); + + /* istanbul ignore if */ + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } + }; + var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; var octicon; @@ -163,9 +181,9 @@ return "" + data[icon].path + ""; }; - var render; + var render$1; - render = function(root, options) { + render$1 = function(root, options) { var a, ariaLabel, span; a = createElement("a"); a.href = options.href; @@ -252,9 +270,9 @@ } }; - var render$1; + var render$2; - render$1 = function(button) { + render$2 = function(button) { var api, hook, href, match, property; if (button.hostname !== "github.com") { return; @@ -305,9 +323,9 @@ }, hook); }; - var render$2; + var render$3; - render$2 = function(root, options) { + render$3 = function(root, options) { var button; if (!options) { return; @@ -315,9 +333,10 @@ if (/^large$/i.test(options["data-size"])) { root.className = "large"; } - button = render(root, options); + render(root); + button = render$1(root, options); if (/^(true|1)$/i.test(options["data-show-count"])) { - render$1(button); + render$2(button); } }; @@ -357,12 +376,12 @@ iframe.style.height = size[1] + "px"; }; - var render$3; + var render$4; /* istanbul ignore next */ - render$3 = function() { + render$4 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -378,19 +397,19 @@ } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render$4(anchor); + render$5(anchor); } }; - var render$4; + var render$5; /* istanbul ignore next */ - render$4 = function(targetNode, options) { - var contentDocument, hash, host, iframe, link, name, onload, ref, root, title, value; + render$5 = function(targetNode, options) { + var contentDocument, hash, host, iframe, name, onload, ref, root, title, value; if (targetNode == null) { - return render$3(); + return render$4(); } if (options == null) { options = parseOptions(targetNode); @@ -403,11 +422,7 @@ root = host.attachShadow({ mode: "closed" }); - link = createElement("link"); - link.rel = "stylesheet"; - link.href = baseURL + "assets/css/buttons.css"; - root.appendChild(link); - render$2(root.appendChild(createElement("span")), options); + render$3(root.appendChild(createElement("span")), options); targetNode.parentNode.replaceChild(host, targetNode); } else { hash = "#" + stringify(options); @@ -448,25 +463,25 @@ } }); contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); + contentDocument.open().write("" + uuid + ""); contentDocument.close(); } }; if (typeof define === "function" && define.amd) { define([], { - render: render$4 + render: render$5 }); } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { - exports.render = render$4; + exports.render = render$5; } else { if (currentScriptURL) { setBaseURL(currentScriptURL.replace(/[^\/]*([?#].*)?$/, "")); } if (isInFrame) { - render$2(document.body, parse(document.location.hash.replace(/^#/, ""))); + render$3(document.body, parse(document.location.hash.replace(/^#/, ""))); } else { - defer(render$3); + defer(render$4); } } diff --git a/dist/buttons.min.js b/dist/buttons.min.js index d35a7fb3..1a581bb5 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var p,l,a,t,f,e,n,m=window.document,w=window.encodeURIComponent,d=window.decodeURIComponent,s=window.Math,g=function(t){return m.createElement(t)},c=function(t){return m.createTextNode(t)};l="github-button",f="faa75404-3b97-5585-b449-4bc51338fbd1",a=m.title===f,p=(/^http:/.test(m.location)?"http":"https")+"://buttons.github.io/",t=function(t){p=t},e="currentScript",n=!{}.hasOwnProperty.call(m,e)&&m[e]&&delete m[e]&&m[e]?m[e].src:void 0;var h,b,u;h=function(t,e,n){t.addEventListener?t.addEventListener(""+e,n):t.attachEvent("on"+e,n)},b=function(e,n,a){var o;h(e,n,o=function(t){return e.removeEventListener?e.removeEventListener(""+n,o):e.detachEvent("on"+n,o),a(t)})},u=function(t){var e,n;/m/.test(m.readyState)||!/g/.test(m.readyState)&&!m.documentElement.doScroll?setTimeout(t):m.addEventListener?(n=0,b(m,"DOMContentLoaded",e=function(){!n&&(n=1)&&t()}),b(window,"load",e)):(e=function(){/m/.test(m.readyState)&&(m.detachEvent("onreadystatechange",e),t())},m.attachEvent("onreadystatechange",e))};var o,i,v,r,y,C,z,x,E,L,M,S={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};o=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),S.hasOwnProperty(t)||(t="mark-github"),'"},i=function(t,e){var n,a;return(n=g("a")).href=e.href,n.target="_blank",/\.github\.com$/.test("."+n.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(n.href)&&(n.target="_top"):(n.href="#",n.target="_self"),n.className="btn",(a=e["aria-label"])&&n.setAttribute("aria-label",a),n.innerHTML=o(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),n.appendChild(c(" ")),n.appendChild(g("span")).appendChild(c(e["data-text"]||"")),t.appendChild(n)},v=function(t,e,n){var a,o,i,r,l,d;n&&(window[n]=function(){window[n]=null}),i=0,a=function(){!i&&(i=1)&&(e.apply(null,arguments),n&&window[n]())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(d=new XMLHttpRequest,h(d,"abort",a),h(d,"error",a),h(d,"load",function(){a(200!==d.status,JSON.parse(d.responseText))}),d.open("GET",t),d.send()):(window._=function(t){window._=null,a(200!==t.meta.status,t.data)},(l=g("script")).async=!0,l.src=t+(/\?/.test(t)?"&":"?")+"callback=_",h(l,"error",r=function(){window._&&_({meta:{}})}),l.readyState&&h(l,"readystatechange",function(){"loaded"===l.readyState&&r()}),o=m.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?u(function(){o.appendChild(l)}):o.appendChild(l))},r=function(o){var t,e,i,n,r;"github.com"===o.hostname&&(n=o.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!n[6]&&(n[2]?(t="repos/"+n[1]+"/"+n[2],n[3]?(r="subscribers_count",i="watchers"):n[4]?(r="forks_count",i="network"):n[5]?(r="open_issues_count",i="issues"):(r="stargazers_count",i="stargazers")):(t="users/"+n[1],i=r="followers"),a&&(e="$"),v("https://api.github.com/"+t,function(t,e){var n,a;t||(a=e[r],(n=g("a")).href=e.html_url+"/"+i,n.target="_blank",n.className="social-count",n.setAttribute("aria-label",a+" "+r.replace(/_count$/,"").replace("_"," ")+" on GitHub"),n.appendChild(g("b")),n.appendChild(g("i")),n.appendChild(g("span")).appendChild(c((""+a).replace(/\B(?=(\d{3})+(?!\d))/g,","))),o.parentNode.insertBefore(n,o.nextSibling))},e))},y=function(t,e){var n;e&&(/^large$/i.test(e["data-size"])&&(t.className="large"),n=i(t,e),/^(true|1)$/i.test(e["data-show-count"])&&r(n))},z=window.devicePixelRatio||1,C=function(t){return(1'+f+' + #{uuid} """ contentDocument.close() return diff --git a/src/content.coffee b/src/content.coffee index 9905749a..d8bd8c72 100644 --- a/src/content.coffee +++ b/src/content.coffee @@ -1,6 +1,9 @@ import { document } from "./alias" +import { + render as renderStyle +} from "./style" import { render as renderButton } from "./button" @@ -11,6 +14,7 @@ import { render = (root, options) -> return unless options root.className = "large" if /^large$/i.test options["data-size"] + renderStyle root button = renderButton root, options renderSocialCount button if /^(true|1)$/i.test options["data-show-count"] return diff --git a/src/style.coffee b/src/style.coffee new file mode 100644 index 00000000..99f8f6ff --- /dev/null +++ b/src/style.coffee @@ -0,0 +1,21 @@ +import css from "../assets/css/buttons.css" +import { + document +} from "./alias" + +render = (root) -> + style = document.createElement "style" + style.type = "text/css" + root.appendChild style + + ### istanbul ignore if ### + if style.styleSheet + style.styleSheet.cssText = css + else + style.appendChild document.createTextNode css + + return + +export { + render +} From 1c2f844b8d27772df6607886103a9c802e08cfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 8 Jul 2018 19:11:55 -0700 Subject: [PATCH 0070/1193] Reduce compressed script size --- assets/js/app.js | 4 ++-- assets/js/app.min.js | 2 +- dist/buttons.common.js | 4 ++-- dist/buttons.esm.js | 4 ++-- dist/buttons.js | 4 ++-- dist/buttons.min.js | 2 +- src/style.coffee | 7 ++++--- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 6c5c64d9..4a40e77a 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -176,7 +176,7 @@ render = function(root) { var style; - style = document.createElement("style"); + style = createElement("style"); style.type = "text/css"; root.appendChild(style); @@ -184,7 +184,7 @@ if (style.styleSheet) { style.styleSheet.cssText = css; } else { - style.appendChild(document.createTextNode(css)); + style.appendChild(createTextNode(css)); } }; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 7bb5de40..772641cf 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var h,s,n,t,p,e,o,f=window.document,r=window.encodeURIComponent,c=(window.decodeURIComponent,window.Math),g=function(t){return f.createElement(t)},l=function(t){return f.createTextNode(t)};s="github-button",p="faa75404-3b97-5585-b449-4bc51338fbd1",n=f.title===p,h=(/^http:/.test(f.location)?"http":"https")+"://buttons.github.io/",t=function(t){h=t},e="currentScript",o=!{}.hasOwnProperty.call(f,e)&&f[e]&&delete f[e]&&f[e]?f[e].src:void 0;var u,b,d,m,i,w,v,y=function(t){var e,o,n;for(e in o=[],t)null!=(n=t[e])&&o.push(r(e)+"="+r(n));return o.join("&")};u=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},b=function(e,o,n){var r;u(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},d=function(t){var e,o;/m/.test(f.readyState)||!/g/.test(f.readyState)&&!f.documentElement.doScroll?setTimeout(t):f.addEventListener?(o=0,b(f,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),b(window,"load",e)):(e=function(){/m/.test(f.readyState)&&(f.detachEvent("onreadystatechange",e),t())},f.attachEvent("onreadystatechange",e))},i=window.devicePixelRatio||1,m=function(t){return(1'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};x=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),M.hasOwnProperty(t)||(t="mark-github"),'"},k=function(t,e){var o,n;return(o=g("a")).href=e.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=e["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=x(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),o.appendChild(l(" ")),o.appendChild(g("span")).appendChild(l(e["data-text"]||"")),t.appendChild(o)},z=function(t,e,o){var n,r,i,a,s,c;o&&(window[o]=function(){window[o]=null}),i=0,n=function(){!i&&(i=1)&&(e.apply(null,arguments),o&&window[o]())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(c=new XMLHttpRequest,u(c,"abort",n),u(c,"error",n),u(c,"load",function(){n(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",t),c.send()):(window._=function(t){window._=null,n(200!==t.meta.status,t.data)},(s=g("script")).async=!0,s.src=t+(/\?/.test(t)?"&":"?")+"callback=_",u(s,"error",a=function(){window._&&_({meta:{}})}),s.readyState&&u(s,"readystatechange",function(){"loaded"===s.readyState&&a()}),r=f.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?d(function(){r.appendChild(s)}):r.appendChild(s))},F=function(r){var t,e,i,o,a;"github.com"===r.hostname&&(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!o[6]&&(o[2]?(t="repos/"+o[1]+"/"+o[2],o[3]?(a="subscribers_count",i="watchers"):o[4]?(a="forks_count",i="network"):o[5]?(a="open_issues_count",i="issues"):(a="stargazers_count",i="stargazers")):(t="users/"+o[1],i=a="followers"),n&&(e="$"),z("https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[a],(o=g("a")).href=e.html_url+"/"+i,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(g("b")),o.appendChild(g("i")),o.appendChild(g("span")).appendChild(l((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling))},e))},E=function(t,e){var o;e&&(/^large$/i.test(e["data-size"])&&(t.className="large"),a(t),o=k(t,e),/^(true|1)$/i.test(e["data-show-count"])&&F(o))},$=function(e,t){var o,n,r,i,a,s,c,l,u,d;if(null==e)return S();if(null==t&&(t=function(t){var e,o,n,r,i;for(r={href:t.href,title:t.title,"aria-label":t.getAttribute("aria-label")},o=0,n=(i=["icon","text","size","show-count"]).length;o'+p+'"); - contentDocument.close(); - } - }; - - var render$5; - - - /* istanbul ignore next */ - - render$5 = function() { - var anchor, anchors, i, j, len, len1, ref; - anchors = []; - if (document.querySelectorAll) { - anchors = document.querySelectorAll("a." + buttonClass); - } else { - ref = document.getElementsByTagName("a"); - for (i = 0, len = ref.length; i < len; i++) { - anchor = ref[i]; - if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { - anchors.push(anchor); - } - } - } - for (j = 0, len1 = anchors.length; j < len1; j++) { - anchor = anchors[j]; - render$4(anchor); + document.body.appendChild(iframe); } }; @@ -478,36 +451,24 @@ } }, mounted: function() { - var iframe, onload; - iframe = this.$el.firstChild; - onload = function() { - setFrameSize(iframe, getFrameContentSize(iframe)); - }; - onEvent(iframe, 'load', function() { - var contentWindow; - contentWindow = iframe.contentWindow; - if (contentWindow.$) { - contentWindow.$ = onload; - } else { - onload(); - } - }); this.update(); }, + beforeUpdate: function() { + clearTimeout(this.timeoutId); + if (this.$el.firstChild) { + this.$el.removeChild(this.$el.firstChild); + } + }, updated: function() { this.update(); }, methods: { update: function() { - var iframe; - iframe = this.$el.firstChild; - setFrameSize(iframe, [1, 0]); - clearTimeout(this.timeoutId); this.timeoutId = setTimeout((function(_this) { return function() { - iframe = _this.$el.removeChild(iframe); - iframe.src = 'buttons.html#' + stringify(_this.config); - _this.$el.appendChild(iframe); + var root; + root = _this.$el.appendChild(createElement("span")); + render$5(root, _this.config); }; })(this), this.rateLimitWait); } @@ -521,7 +482,7 @@ el: '#app', template: '#app-template', mounted: function() { - setTimeout(render$5); + setTimeout(render$4); }, data: function() { return { diff --git a/assets/js/app.min.js b/assets/js/app.min.js index b45227a2..396b9d71 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var h,s,n,t,p,e,o,f=window.document,r=window.encodeURIComponent,c=(window.decodeURIComponent,window.Math),g=function(t){return f.createElement(t)},l=function(t){return f.createTextNode(t)};s="github-button",p="faa75404-3b97-5585-b449-4bc51338fbd1",n=f.title===p,h=(/^http:/.test(f.location)?"http":"https")+"://buttons.github.io/",t=function(t){h=t},e="currentScript",o=!{}.hasOwnProperty.call(f,e)&&f[e]&&delete f[e]&&f[e]?f[e].src:void 0;var u,b,d,m,i,w,v,y=function(t){var e,o,n;for(e in o=[],t)null!=(n=t[e])&&o.push(r(e)+"="+r(n));return o.join("&")};u=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},b=function(e,o,n){var r;u(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},d=function(t){var e,o;/m/.test(f.readyState)||!/g/.test(f.readyState)&&!f.documentElement.doScroll?setTimeout(t):f.addEventListener?(o=0,b(f,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),b(window,"load",e)):(e=function(){/m/.test(f.readyState)&&(f.detachEvent("onreadystatechange",e),t())},f.attachEvent("onreadystatechange",e))},i=window.devicePixelRatio||1,m=function(t){return(1*{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .btn,:host .social-count{vertical-align:bottom}\n";a=function(t){var e;(e=g("style")).type="text/css",t.appendChild(e),e.styleSheet?e.styleSheet.cssText=C:e.appendChild(l(C))};var x,k,z,F,E,$,S,M={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};x=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),M.hasOwnProperty(t)||(t="mark-github"),'"},k=function(t,e){var o,n;return(o=g("a")).href=e.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=e["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=x(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),o.appendChild(l(" ")),o.appendChild(g("span")).appendChild(l(e["data-text"]||"")),t.appendChild(o)},z=function(t,e,o){var n,r,i,a,s,c;o&&(window[o]=function(){window[o]=null}),i=0,n=function(){!i&&(i=1)&&(e.apply(null,arguments),o&&window[o]())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(c=new XMLHttpRequest,u(c,"abort",n),u(c,"error",n),u(c,"load",function(){n(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",t),c.send()):(window._=function(t){window._=null,n(200!==t.meta.status,t.data)},(s=g("script")).async=!0,s.src=t+(/\?/.test(t)?"&":"?")+"callback=_",u(s,"error",a=function(){window._&&_({meta:{}})}),s.readyState&&u(s,"readystatechange",function(){"loaded"===s.readyState&&a()}),r=f.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?d(function(){r.appendChild(s)}):r.appendChild(s))},F=function(r){var t,e,i,o,a;"github.com"===r.hostname&&(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!o[6]&&(o[2]?(t="repos/"+o[1]+"/"+o[2],o[3]?(a="subscribers_count",i="watchers"):o[4]?(a="forks_count",i="network"):o[5]?(a="open_issues_count",i="issues"):(a="stargazers_count",i="stargazers")):(t="users/"+o[1],i=a="followers"),n&&(e="$"),z("https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[a],(o=g("a")).href=e.html_url+"/"+i,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(g("b")),o.appendChild(g("i")),o.appendChild(g("span")).appendChild(l((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling))},e))},E=function(t,e){var o;e&&(/^large$/i.test(e["data-size"])&&(t.className="large"),a(t),o=k(t,e),/^(true|1)$/i.test(e["data-show-count"])&&F(o))},$=function(e,t){var o,n,r,i,a,s,c,l,u,d;if(null==e)return S();if(null==t&&(t=function(t){var e,o,n,r,i;for(r={href:t.href,title:t.title,"aria-label":t.getAttribute("aria-label")},o=0,n=(i=["icon","text","size","show-count"]).length;o'+p+'"); - contentDocument.close(); + document.body.appendChild(iframe); } }; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index 148c82c2..d8fa1792 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -14,14 +14,10 @@ var createTextNode = function(text) { return document.createTextNode(text); }; -var apiBaseURL, baseURL, buttonClass, isInFrame, uuid; +var apiBaseURL, baseURL, buttonClass; buttonClass = "github-button"; -uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; - -isInFrame = document.title === uuid; - /* istanbul ignore next */ @@ -87,7 +83,7 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; -var css = "html{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{margin:0;font-size:0;white-space:nowrap}a{color:#24292e;text-decoration:none;outline:0}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:middle;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}:host>*{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .btn,:host .social-count{vertical-align:bottom}\n"; +var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; var render; @@ -143,56 +139,18 @@ render$1 = function(root, options) { return root.appendChild(a); }; -var defer; - - -/* istanbul ignore next */ - -defer = function(func) { - var callback, onceToken; - if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { - setTimeout(func); - } else { - if (document.addEventListener) { - onceToken = 0; - callback = function() { - if (!onceToken && (onceToken = 1)) { - func(); - } - }; - onceEvent(document, "DOMContentLoaded", callback); - onceEvent(window, "load", callback); - } else { - callback = function() { - if (/m/.test(document.readyState)) { - document.detachEvent("onreadystatechange", callback); - func(); - } - }; - document.attachEvent("onreadystatechange", callback); - } - } -}; - var fetch; -fetch = function(url, func, hook) { - var callback, head, onceToken, onloadend, script, xhr; - if (hook) { - window[hook] = function() { - window[hook] = null; - }; - } +fetch = function(url, func) { + var XMLHttpRequest, callback, global, onceToken, onloadend, script, xhr; + global = this || window; onceToken = 0; callback = function() { if (!onceToken && (onceToken = 1)) { func.apply(null, arguments); - if (hook) { - window[hook](); - } } }; - if (window.XMLHttpRequest && "withCredentials" in XMLHttpRequest.prototype) { + if ((XMLHttpRequest = window.XMLHttpRequest) && "withCredentials" in XMLHttpRequest.prototype) { xhr = new XMLHttpRequest(); onEvent(xhr, "abort", callback); onEvent(xhr, "error", callback); @@ -202,16 +160,16 @@ fetch = function(url, func, hook) { xhr.open("GET", url); xhr.send(); } else { - window._ = function(json) { - window._ = null; + global._ = function(json) { + global._ = null; callback(json.meta.status !== 200, json.data); }; script = createElement("script"); script.async = true; script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; onloadend = function() { - if (window._) { - _({ + if (global._) { + global._({ meta: {} }); } @@ -226,29 +184,25 @@ fetch = function(url, func, hook) { } }); } - head = document.getElementsByTagName("head")[0]; - - /* istanbul ignore if: Presto based Opera */ - if ("[object Opera]" === {}.toString.call(window.opera)) { - defer(function() { - head.appendChild(script); - }); - } else { - head.appendChild(script); - } + global.document.getElementsByTagName("head")[0].appendChild(script); } }; var render$2; -render$2 = function(button) { - var api, hook, href, match, property; +render$2 = function(button, func) { + var api, callback, href, match, property; + callback = function() { + if (func) { + func(); + } + }; if (button.hostname !== "github.com") { - return; + return callback(); } match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); if (!(match && !match[6])) { - return; + return callback(); } if (match[2]) { api = "repos/" + match[1] + "/" + match[2]; @@ -269,12 +223,7 @@ render$2 = function(button) { api = "users/" + match[1]; href = property = "followers"; } - - /* istanbul ignore if */ - if (isInFrame) { - hook = "$"; - } - fetch(apiBaseURL + api, function(error, json) { + fetch.call(this, apiBaseURL + api, function(error, json) { var a, data, span; if (!error) { data = json[property]; @@ -289,60 +238,32 @@ render$2 = function(button) { span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); button.parentNode.insertBefore(a, button.nextSibling); } - }, hook); + callback(); + }); }; var render$3; -render$3 = function(root, options) { - var button; +render$3 = function(root, options, callback) { + var button, container; if (!options) { return; } - if (/^large$/i.test(options["data-size"])) { - root.className = "large"; - } render(root); - button = render$1(root, options); + container = root.appendChild(document.createElement("div")); + container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); + button = render$1(container, options); if (/^(true|1)$/i.test(options["data-show-count"])) { - render$2(button); - } -}; - -var ceilPixel, devicePixelRatio; - - -/* istanbul ignore next */ - -devicePixelRatio = window.devicePixelRatio || 1; - -ceilPixel = function(px) { - return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; -}; - -var getFrameContentSize, setFrameSize; - -getFrameContentSize = function(iframe) { - var body, boundingClientRect, contentDocument, display, height, html, width; - contentDocument = iframe.contentWindow.document; - html = contentDocument.documentElement; - body = contentDocument.body; - width = html.scrollWidth; - height = html.scrollHeight; - if (body.getBoundingClientRect) { - display = body.style.display; - body.style.display = "inline-block"; - boundingClientRect = body.getBoundingClientRect(); - width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); - height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); - body.style.display = display; + render$2.call(this, button, function() { + if (callback) { + callback(container); + } + }); + } else { + if (callback) { + callback(container); + } } - return [width, height]; -}; - -setFrameSize = function(iframe, size) { - iframe.style.width = size[0] + "px"; - iframe.style.height = size[1] + "px"; }; var render$4; @@ -370,13 +291,43 @@ render$4 = function() { } }; +var ceilPixel, devicePixelRatio; + + +/* istanbul ignore next */ + +devicePixelRatio = window.devicePixelRatio || 1; + +ceilPixel = function(px) { + return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; +}; + +var get, set; + +get = function(el) { + var boundingClientRect, height, width; + width = el.scrollWidth; + height = el.scrollHeight; + if (el.getBoundingClientRect) { + boundingClientRect = el.getBoundingClientRect(); + width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); + height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); + } + return [width, height]; +}; + +set = function(el, size) { + el.style.width = size[0] + "px"; + el.style.height = size[1] + "px"; +}; + var render$5; /* istanbul ignore next */ render$5 = function(targetNode, options) { - var contentDocument, hash, host, iframe, name, onload, ref, root, title, value; + var host, iframe, name, ref, root, title, value; if (targetNode == null) { return render$4(); } @@ -391,10 +342,9 @@ render$5 = function(targetNode, options) { root = host.attachShadow({ mode: "closed" }); - render$3(root.appendChild(createElement("span")), options); + render$3(root, options); targetNode.parentNode.replaceChild(host, targetNode); } else { - hash = "#" + stringify(options); iframe = createElement("iframe"); ref = { allowtransparency: true, @@ -405,35 +355,27 @@ render$5 = function(targetNode, options) { value = ref[name]; iframe.setAttribute(name, value); } - setFrameSize(iframe, [1, 0]); + set(iframe, [1, 0]); iframe.style.border = "none"; iframe.src = "javascript:0"; if (title = options.title) { iframe.title = title; } - document.body.appendChild(iframe); - onload = function() { - var size; - size = getFrameContentSize(iframe); - iframe.parentNode.removeChild(iframe); - onceEvent(iframe, "load", function() { - setFrameSize(iframe, size); - }); - iframe.src = baseURL + "buttons.html" + hash; - targetNode.parentNode.replaceChild(iframe, targetNode); - }; onceEvent(iframe, "load", function() { var contentWindow; contentWindow = iframe.contentWindow; - if (contentWindow.$) { - contentWindow.$ = onload; - } else { - onload(); - } + render$3.call(contentWindow, contentWindow.document.body, options, function(container) { + var size; + size = get(container); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + set(iframe, size); + }); + iframe.src = baseURL + "buttons.html#" + (stringify(options)); + return targetNode.parentNode.replaceChild(iframe, targetNode); + }); }); - contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); - contentDocument.close(); + document.body.appendChild(iframe); } }; diff --git a/dist/buttons.js b/dist/buttons.js index 09d2d780..43bdd9ca 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -17,14 +17,12 @@ return document.createTextNode(text); }; - var apiBaseURL, baseURL, buttonClass, isInFrame, setBaseURL, uuid; + var apiBaseURL, baseURL, buttonClass, setBaseURL, uuid; buttonClass = "github-button"; uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; - isInFrame = document.title === uuid; - /* istanbul ignore next */ @@ -149,7 +147,7 @@ return options; }; - var css = "html{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{margin:0;font-size:0;white-space:nowrap}a{color:#24292e;text-decoration:none;outline:0}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:middle;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}:host>*{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .btn,:host .social-count{vertical-align:bottom}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; var render; @@ -207,23 +205,16 @@ var fetch; - fetch = function(url, func, hook) { - var callback, head, onceToken, onloadend, script, xhr; - if (hook) { - window[hook] = function() { - window[hook] = null; - }; - } + fetch = function(url, func) { + var XMLHttpRequest, callback, global, onceToken, onloadend, script, xhr; + global = this || window; onceToken = 0; callback = function() { if (!onceToken && (onceToken = 1)) { func.apply(null, arguments); - if (hook) { - window[hook](); - } } }; - if (window.XMLHttpRequest && "withCredentials" in XMLHttpRequest.prototype) { + if ((XMLHttpRequest = window.XMLHttpRequest) && "withCredentials" in XMLHttpRequest.prototype) { xhr = new XMLHttpRequest(); onEvent(xhr, "abort", callback); onEvent(xhr, "error", callback); @@ -233,16 +224,16 @@ xhr.open("GET", url); xhr.send(); } else { - window._ = function(json) { - window._ = null; + global._ = function(json) { + global._ = null; callback(json.meta.status !== 200, json.data); }; script = createElement("script"); script.async = true; script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; onloadend = function() { - if (window._) { - _({ + if (global._) { + global._({ meta: {} }); } @@ -257,29 +248,25 @@ } }); } - head = document.getElementsByTagName("head")[0]; - - /* istanbul ignore if: Presto based Opera */ - if ("[object Opera]" === {}.toString.call(window.opera)) { - defer(function() { - head.appendChild(script); - }); - } else { - head.appendChild(script); - } + global.document.getElementsByTagName("head")[0].appendChild(script); } }; var render$2; - render$2 = function(button) { - var api, hook, href, match, property; + render$2 = function(button, func) { + var api, callback, href, match, property; + callback = function() { + if (func) { + func(); + } + }; if (button.hostname !== "github.com") { - return; + return callback(); } match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); if (!(match && !match[6])) { - return; + return callback(); } if (match[2]) { api = "repos/" + match[1] + "/" + match[2]; @@ -300,12 +287,7 @@ api = "users/" + match[1]; href = property = "followers"; } - - /* istanbul ignore if */ - if (isInFrame) { - hook = "$"; - } - fetch(apiBaseURL + api, function(error, json) { + fetch.call(this, apiBaseURL + api, function(error, json) { var a, data, span; if (!error) { data = json[property]; @@ -320,60 +302,32 @@ span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); button.parentNode.insertBefore(a, button.nextSibling); } - }, hook); + callback(); + }); }; var render$3; - render$3 = function(root, options) { - var button; + render$3 = function(root, options, callback) { + var button, container; if (!options) { return; } - if (/^large$/i.test(options["data-size"])) { - root.className = "large"; - } render(root); - button = render$1(root, options); + container = root.appendChild(document.createElement("div")); + container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); + button = render$1(container, options); if (/^(true|1)$/i.test(options["data-show-count"])) { - render$2(button); - } - }; - - var ceilPixel, devicePixelRatio; - - - /* istanbul ignore next */ - - devicePixelRatio = window.devicePixelRatio || 1; - - ceilPixel = function(px) { - return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; - }; - - var getFrameContentSize, setFrameSize; - - getFrameContentSize = function(iframe) { - var body, boundingClientRect, contentDocument, display, height, html, width; - contentDocument = iframe.contentWindow.document; - html = contentDocument.documentElement; - body = contentDocument.body; - width = html.scrollWidth; - height = html.scrollHeight; - if (body.getBoundingClientRect) { - display = body.style.display; - body.style.display = "inline-block"; - boundingClientRect = body.getBoundingClientRect(); - width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); - height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); - body.style.display = display; + render$2.call(this, button, function() { + if (callback) { + callback(container); + } + }); + } else { + if (callback) { + callback(container); + } } - return [width, height]; - }; - - setFrameSize = function(iframe, size) { - iframe.style.width = size[0] + "px"; - iframe.style.height = size[1] + "px"; }; var render$4; @@ -401,13 +355,43 @@ } }; + var ceilPixel, devicePixelRatio; + + + /* istanbul ignore next */ + + devicePixelRatio = window.devicePixelRatio || 1; + + ceilPixel = function(px) { + return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; + }; + + var get, set; + + get = function(el) { + var boundingClientRect, height, width; + width = el.scrollWidth; + height = el.scrollHeight; + if (el.getBoundingClientRect) { + boundingClientRect = el.getBoundingClientRect(); + width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); + height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); + } + return [width, height]; + }; + + set = function(el, size) { + el.style.width = size[0] + "px"; + el.style.height = size[1] + "px"; + }; + var render$5; /* istanbul ignore next */ render$5 = function(targetNode, options) { - var contentDocument, hash, host, iframe, name, onload, ref, root, title, value; + var host, iframe, name, ref, root, title, value; if (targetNode == null) { return render$4(); } @@ -422,10 +406,9 @@ root = host.attachShadow({ mode: "closed" }); - render$3(root.appendChild(createElement("span")), options); + render$3(root, options); targetNode.parentNode.replaceChild(host, targetNode); } else { - hash = "#" + stringify(options); iframe = createElement("iframe"); ref = { allowtransparency: true, @@ -436,35 +419,27 @@ value = ref[name]; iframe.setAttribute(name, value); } - setFrameSize(iframe, [1, 0]); + set(iframe, [1, 0]); iframe.style.border = "none"; iframe.src = "javascript:0"; if (title = options.title) { iframe.title = title; } - document.body.appendChild(iframe); - onload = function() { - var size; - size = getFrameContentSize(iframe); - iframe.parentNode.removeChild(iframe); - onceEvent(iframe, "load", function() { - setFrameSize(iframe, size); - }); - iframe.src = baseURL + "buttons.html" + hash; - targetNode.parentNode.replaceChild(iframe, targetNode); - }; onceEvent(iframe, "load", function() { var contentWindow; contentWindow = iframe.contentWindow; - if (contentWindow.$) { - contentWindow.$ = onload; - } else { - onload(); - } + render$3.call(contentWindow, contentWindow.document.body, options, function(container) { + var size; + size = get(container); + iframe.parentNode.removeChild(iframe); + onceEvent(iframe, "load", function() { + set(iframe, size); + }); + iframe.src = baseURL + "buttons.html#" + (stringify(options)); + return targetNode.parentNode.replaceChild(iframe, targetNode); + }); }); - contentDocument = iframe.contentWindow.document; - contentDocument.open().write("" + uuid + ""); - contentDocument.close(); + document.body.appendChild(iframe); } }; @@ -478,7 +453,7 @@ if (currentScriptURL) { setBaseURL(currentScriptURL.replace(/[^\/]*([?#].*)?$/, "")); } - if (isInFrame) { + if (document.title === uuid) { render$3(document.body, parse(document.location.hash.replace(/^#/, ""))); } else { defer(render$4); diff --git a/dist/buttons.min.js b/dist/buttons.min.js index 587ae788..9a942d94 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var h,l,n,e,u,t,o,f=window.document,g=window.encodeURIComponent,c=window.decodeURIComponent,s=window.Math,b=function(e){return f.createElement(e)},d=function(e){return f.createTextNode(e)};l="github-button",u="faa75404-3b97-5585-b449-4bc51338fbd1",n=f.title===u,h=(/^http:/.test(f.location)?"http":"https")+"://buttons.github.io/",e=function(e){h=e},t="currentScript",o=!{}.hasOwnProperty.call(f,t)&&f[t]&&delete f[t]&&f[t]?f[t].src:void 0;var p,m,w;p=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},m=function(t,o,n){var r;p(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},w=function(e){var t,o;/m/.test(f.readyState)||!/g/.test(f.readyState)&&!f.documentElement.doScroll?setTimeout(e):f.addEventListener?(o=0,m(f,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),m(window,"load",t)):(t=function(){/m/.test(f.readyState)&&(f.detachEvent("onreadystatechange",t),e())},f.attachEvent("onreadystatechange",t))};var r,a="html{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body{margin:0;font-size:0;white-space:nowrap}a{color:#24292e;text-decoration:none;outline:0}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:middle;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}:host>*{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .btn,:host .social-count{vertical-align:bottom}\n";r=function(e){var t;(t=b("style")).type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=a:t.appendChild(d(a))};var i,v,y,C,x,k,z,F,E,M,S,L={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};i=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),L.hasOwnProperty(e)||(e="mark-github"),'"},v=function(e,t){var o,n;return(o=b("a")).href=t.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=t["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=i(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),o.appendChild(d(" ")),o.appendChild(b("span")).appendChild(d(t["data-text"]||"")),e.appendChild(o)},y=function(e,t,o){var n,r,a,i,l,c;o&&(window[o]=function(){window[o]=null}),a=0,n=function(){!a&&(a=1)&&(t.apply(null,arguments),o&&window[o]())},window.XMLHttpRequest&&"withCredentials"in XMLHttpRequest.prototype?(c=new XMLHttpRequest,p(c,"abort",n),p(c,"error",n),p(c,"load",function(){n(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",e),c.send()):(window._=function(e){window._=null,n(200!==e.meta.status,e.data)},(l=b("script")).async=!0,l.src=e+(/\?/.test(e)?"&":"?")+"callback=_",p(l,"error",i=function(){window._&&_({meta:{}})}),l.readyState&&p(l,"readystatechange",function(){"loaded"===l.readyState&&i()}),r=f.getElementsByTagName("head")[0],"[object Opera]"==={}.toString.call(window.opera)?w(function(){r.appendChild(l)}):r.appendChild(l))},C=function(r){var e,t,a,o,i;"github.com"===r.hostname&&(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))&&!o[6]&&(o[2]?(e="repos/"+o[1]+"/"+o[2],o[3]?(i="subscribers_count",a="watchers"):o[4]?(i="forks_count",a="network"):o[5]?(i="open_issues_count",a="issues"):(i="stargazers_count",a="stargazers")):(e="users/"+o[1],a=i="followers"),n&&(t="$"),y("https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[i],(o=b("a")).href=t.html_url+"/"+a,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(b("b")),o.appendChild(b("i")),o.appendChild(b("span")).appendChild(d((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling))},t))},x=function(e,t){var o;t&&(/^large$/i.test(t["data-size"])&&(e.className="large"),r(e),o=v(e,t),/^(true|1)$/i.test(t["data-show-count"])&&C(o))},z=window.devicePixelRatio||1,k=function(e){return(1'+u+' - """ - contentDocument.close() + document.body.appendChild iframe return export { diff --git a/src/content.coffee b/src/content.coffee index d8bd8c72..4f3ad443 100644 --- a/src/content.coffee +++ b/src/content.coffee @@ -11,12 +11,20 @@ import { render as renderSocialCount } from "./social-count" -render = (root, options) -> +render = (root, options, callback) -> return unless options - root.className = "large" if /^large$/i.test options["data-size"] + renderStyle root - button = renderButton root, options - renderSocialCount button if /^(true|1)$/i.test options["data-show-count"] + + container = root.appendChild document.createElement "div" + container.className = "widget" + (if /^large$/i.test options["data-size"] then " large" else "") + button = renderButton container, options + if /^(true|1)$/i.test options["data-show-count"] + renderSocialCount.call @, button, -> + callback container if callback + return + else + callback container if callback return export { diff --git a/src/fetch.coffee b/src/fetch.coffee index 0fce4c84..d6c79439 100644 --- a/src/fetch.coffee +++ b/src/fetch.coffee @@ -9,20 +9,16 @@ import { defer } from "./defer" -fetch = (url, func, hook) -> - if hook - window[hook] = -> - window[hook] = null - return +fetch = (url, func) -> + global = @ or window onceToken = 0 callback = -> if !onceToken and onceToken = 1 func.apply null, arguments - window[hook]() if hook return - if window.XMLHttpRequest and "withCredentials" of XMLHttpRequest.prototype + if (XMLHttpRequest = window.XMLHttpRequest) and "withCredentials" of XMLHttpRequest:: xhr = new XMLHttpRequest() onEvent xhr, "abort", callback @@ -34,8 +30,8 @@ fetch = (url, func, hook) -> xhr.open "GET", url xhr.send() else - window._ = (json) -> - window._ = null + global._ = (json) -> + global._ = null callback json.meta.status isnt 200, json.data return @@ -44,7 +40,7 @@ fetch = (url, func, hook) -> script.src = url + (if /\?/.test url then "&" else "?") + "callback=_" onloadend = -> - _ meta: {} if window._ + global._ meta: {} if global._ return onEvent script, "error", onloadend @@ -55,14 +51,7 @@ fetch = (url, func, hook) -> onloadend() if script.readyState is "loaded" return - head = document.getElementsByTagName("head")[0] - ### istanbul ignore if: Presto based Opera ### - if "[object Opera]" is {}.toString.call window.opera - defer -> - head.appendChild script - return - else - head.appendChild script + global.document.getElementsByTagName("head")[0].appendChild script return export { diff --git a/src/frame.coffee b/src/frame.coffee deleted file mode 100644 index 91a614b2..00000000 --- a/src/frame.coffee +++ /dev/null @@ -1,31 +0,0 @@ -import { - Math -} from "./alias" -import { - ceilPixel -} from "./pixel" - -getFrameContentSize = (iframe) -> - contentDocument = iframe.contentWindow.document - html = contentDocument.documentElement - body = contentDocument.body - width = html.scrollWidth - height = html.scrollHeight - if body.getBoundingClientRect - display = body.style.display - body.style.display = "inline-block" - boundingClientRect = body.getBoundingClientRect() - width = Math.max width, ceilPixel boundingClientRect.width or boundingClientRect.right - boundingClientRect.left - height = Math.max height, ceilPixel boundingClientRect.height or boundingClientRect.bottom - boundingClientRect.top - body.style.display = display - [width, height] - -setFrameSize = (iframe, size) -> - iframe.style.width = "#{size[0]}px" - iframe.style.height = "#{size[1]}px" - return - -export { - getFrameContentSize - setFrameSize -} diff --git a/src/main.coffee b/src/main.coffee index 74109a3c..66eddc61 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -3,7 +3,6 @@ import { } from "./alias" import { uuid - isInFrame setBaseURL } from "./config" import { @@ -32,7 +31,7 @@ else if typeof exports is "object" and typeof exports.nodeName isnt "string" else setBaseURL currentScriptURL.replace /[^/]*([?#].*)?$/, "" if currentScriptURL - if isInFrame + if document.title is uuid renderContent document.body, parseQueryString document.location.hash.replace /^#/, "" else defer batchRender diff --git a/src/size.coffee b/src/size.coffee new file mode 100644 index 00000000..5a926acf --- /dev/null +++ b/src/size.coffee @@ -0,0 +1,25 @@ +import { + Math +} from "./alias" +import { + ceilPixel +} from "./pixel" + +get = (el) -> + width = el.scrollWidth + height = el.scrollHeight + if el.getBoundingClientRect + boundingClientRect = el.getBoundingClientRect() + width = Math.max width, ceilPixel boundingClientRect.width or boundingClientRect.right - boundingClientRect.left + height = Math.max height, ceilPixel boundingClientRect.height or boundingClientRect.bottom - boundingClientRect.top + [width, height] + +set = (el, size) -> + el.style.width = "#{size[0]}px" + el.style.height = "#{size[1]}px" + return + +export { + get + set +} diff --git a/src/social-count.coffee b/src/social-count.coffee index 6c7b1c14..0203a715 100644 --- a/src/social-count.coffee +++ b/src/social-count.coffee @@ -1,6 +1,5 @@ import { apiBaseURL - isInFrame } from "./config" import { document @@ -11,8 +10,12 @@ import { fetch } from "./fetch" -render = (button) -> - return unless button.hostname is "github.com" +render = (button, func) -> + callback = -> + func() if func + return + + return callback() unless button.hostname is "github.com" match = button.pathname.replace(/^(?!\/)/, "/").match /// ^/([^/?#]+) @@ -25,7 +28,7 @@ render = (button) -> (?:[/?#]|$) /// - return unless match and not match[6] + return callback() unless match and not match[6] if match[2] api = "repos/#{match[1]}/#{match[2]}" @@ -45,10 +48,7 @@ render = (button) -> api = "users/#{match[1]}" href = property = "followers" - ### istanbul ignore if ### - hook = "$" if isInFrame - - fetch apiBaseURL + api, (error, json) -> + fetch.call @, apiBaseURL + api, (error, json) -> if !error data = json[property] @@ -62,8 +62,8 @@ render = (button) -> span = a.appendChild createElement "span" span.appendChild createTextNode "#{data}".replace /\B(?=(\d{3})+(?!\d))/g, "," button.parentNode.insertBefore a, button.nextSibling + callback() return - , hook return export { diff --git a/test/unit/content.spec.coffee b/test/unit/content.spec.coffee index 19ffd4d5..3b95ddb8 100644 --- a/test/unit/content.spec.coffee +++ b/test/unit/content.spec.coffee @@ -3,21 +3,33 @@ import { } from "@/content" describe "Frame Content", -> - root = document.body + root = null - describe "render(root, config)", -> - className = root.className + beforeEach -> + root = document.body.appendChild document.createElement "div" - afterEach -> - root.className = className + afterEach -> + root.parentNode.removeChild root + root = null + describe "render(root, config, callback)", -> it "should do nothing when no option given", -> render root - it "should set root.className when data-size is large", -> + it "should call Style::render()", -> + render root, {} + expect root.getElementsByTagName("style").length + .to.equal 1 + + it "should add widget to container.className", -> + render root, {} + expect root.getElementsByTagName("div")[0].className + .to.equal "widget" + + it "should add large to container.className when data-size is large", -> render root, "data-size": "large" - expect root.className - .to.equal "large" + expect root.getElementsByTagName("div")[0].className + .to.equal "widget large" it "should call Button::render()", -> render root, "href": "https://google.com/" @@ -26,3 +38,18 @@ describe "Frame Content", -> render root, "href": "https://google.com/" "data-show-count": true + + it "should call callback function with created container", (done) -> + render root, {}, (el) -> + expect el.tagName + .to.equal "DIV" + done() + + it "should call callback function with created container when data-show-count is true", (done) -> + render root, + "href": "https://google.com/" + "data-show-count": true + , (el) -> + expect el.tagName + .to.equal "DIV" + done() diff --git a/test/unit/frame.spec.coffee b/test/unit/frame.spec.coffee deleted file mode 100644 index c1126d5c..00000000 --- a/test/unit/frame.spec.coffee +++ /dev/null @@ -1,103 +0,0 @@ -import { - onEvent -} from "@/event" -import { - getFrameContentSize - setFrameSize -} from "@/frame" - -describe "Frame", -> - iframe = null - - getRandomInt = (min = 0, max = 1000) -> - min = Math.ceil min - max = Math.floor max - Math.floor(Math.random() * (max - min)) + min - - html = (size) -> - """ - - - - - - - -
- - - """ - - beforeEach -> - iframe = document.body.appendChild document.createElement "iframe" - - afterEach -> - iframe.parentNode.removeChild iframe - - describe "getFrameContentSize(iframe)", -> - it "should return iframe content size", (done) -> - size = [getRandomInt(), getRandomInt()] - setFrameSize iframe, [1, 0] - onEvent iframe, "load", -> - expect getFrameContentSize iframe - .to.deep.equal size - done() - contentDocument = iframe.contentWindow.document - contentDocument.open().write html size - contentDocument.close() - - it "should return iframe content size without Element.getBoundingClientRect()", (done) -> - size = [getRandomInt(), getRandomInt()] - setFrameSize iframe, [1, 0] - onEvent iframe, "load", -> - contentDocument.body.getBoundingClientRect = null - expect getFrameContentSize iframe - .to.deep.equal size - done() - contentDocument = iframe.contentWindow.document - contentDocument.open().write html size - contentDocument.close() - - it "should return iframe content size with Element.getBoundingClientRect()", (done) -> - size = [getRandomInt(), getRandomInt()] - setFrameSize iframe, [1, 0] - onEvent iframe, "load", -> - contentDocument.body.getBoundingClientRect = sinon.stub().returns - width: size[0] - height: size[1] - expect getFrameContentSize iframe - .to.deep.equal size - done() - contentDocument = iframe.contentWindow.document - contentDocument.open().write html size - contentDocument.close() - - it "should return iframe content size with Element.getBoundingClientRect() that lacks of width and height properties", (done) -> - size = [getRandomInt(), getRandomInt()] - setFrameSize iframe, [1, 0] - onEvent iframe, "load", -> - contentDocument.body.getBoundingClientRect = sinon.stub().returns - top: 0 - right: size[0] - bottom: size[1] - left: 0 - expect getFrameContentSize iframe - .to.deep.equal size - done() - contentDocument = iframe.contentWindow.document - contentDocument.open().write html size - contentDocument.close() - - describe "setFrameSize(iframe, size)", -> - it "should set width and height on iframe", -> - setFrameSize iframe, [0, 0] - expect iframe.scrollWidth - .to.equal 0 - expect iframe.scrollHeight - .to.equal 0 - - setFrameSize iframe, [50, 100] - expect iframe.scrollWidth - .to.equal 50 - expect iframe.scrollHeight - .to.equal 100 diff --git a/test/unit/jsonp.spec.coffee b/test/unit/jsonp.spec.coffee index 4c64eccf..9c26e1a5 100644 --- a/test/unit/jsonp.spec.coffee +++ b/test/unit/jsonp.spec.coffee @@ -23,15 +23,6 @@ describe "JSON-P", -> expect window._ .to.be.a "function" - it "should set up the hook function", -> - jsonp "hello", -> - return - , "$" - - expect window.$ - .to.be.a "function" - - it "should setup the script and add callback query to request url", -> url = "/random/url/" + new Date().getTime() diff --git a/test/unit/size.spec.coffee b/test/unit/size.spec.coffee new file mode 100644 index 00000000..42ce8178 --- /dev/null +++ b/test/unit/size.spec.coffee @@ -0,0 +1,71 @@ +import { + get + set +} from "@/size" + +describe "Size", -> + el = null + size = null + + getRandomInt = (min = 0, max = 1000) -> + min = Math.ceil min + max = Math.floor max + Math.floor(Math.random() * (max - min)) + min + + beforeEach -> + el = document.body.appendChild document.createElement "div" + el.style.display = "inline-block" + el.style.overflow = "hidden" + size = [getRandomInt(), getRandomInt()] + + afterEach -> + el.parentNode.removeChild el + + describe "get(el)", -> + it "should return size", -> + set el, size + expect get el + .to.deep.equal size + + it "should return size without Element::getBoundingClientRect()", -> + el.getBoundingClientRect = null + + set el, size + expect get el + .to.deep.equal size + + it "should return size with Element::getBoundingClientRect()", -> + el.getBoundingClientRect = sinon.stub().returns + width: size[0] + height: size[1] + set el, size + expect get el + .to.deep.equal size + expect el.getBoundingClientRect + .to.be.calledOnce + + it "should return size with Element::getBoundingClientRect() that lacks of width and height properties", -> + el.getBoundingClientRect = sinon.stub().returns + top: 0 + right: size[0] + bottom: size[1] + left: 0 + set el, size + expect get el + .to.deep.equal size + expect el.getBoundingClientRect + .to.be.calledOnce + + describe "set(el, size)", -> + it "should set width and height on element", -> + set el, [0, 0] + expect el.scrollWidth + .to.equal 0 + expect el.scrollHeight + .to.equal 0 + + set el, [50, 100] + expect el.scrollWidth + .to.equal 50 + expect el.scrollHeight + .to.equal 100 From aff8c70a7e65be70458040c4b1cdc74f31ca4268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 14 Jul 2018 17:37:31 -0700 Subject: [PATCH 0074/1193] Remove uuid --- buttons.html | 2 +- dist/buttons.js | 6 ++---- dist/buttons.min.js | 2 +- src/config.coffee | 2 -- src/container.coffee | 1 - src/main.coffee | 4 ++-- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/buttons.html b/buttons.html index 94699b06..bd7a7498 100644 --- a/buttons.html +++ b/buttons.html @@ -1 +1 @@ -faa75404-3b97-5585-b449-4bc51338fbd1 + diff --git a/dist/buttons.js b/dist/buttons.js index 43bdd9ca..6c3cbd52 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -17,12 +17,10 @@ return document.createTextNode(text); }; - var apiBaseURL, baseURL, buttonClass, setBaseURL, uuid; + var apiBaseURL, baseURL, buttonClass, setBaseURL; buttonClass = "github-button"; - uuid = "faa75404-3b97-5585-b449-4bc51338fbd1"; - /* istanbul ignore next */ @@ -453,7 +451,7 @@ if (currentScriptURL) { setBaseURL(currentScriptURL.replace(/[^\/]*([?#].*)?$/, "")); } - if (document.title === uuid) { + if (baseURL + "buttons.html" === document.location.href.replace(/[?#].*$/, "")) { render$3(document.body, parse(document.location.hash.replace(/^#/, ""))); } else { defer(render$4); diff --git a/dist/buttons.min.js b/dist/buttons.min.js index 9a942d94..8f451b06 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var d,l,e,t,o,s=window.document,h=window.encodeURIComponent,c=window.decodeURIComponent,r=window.Math,p=function(e){return s.createElement(e)},u=function(e){return s.createTextNode(e)};l="github-button",d=(/^http:/.test(s.location)?"http":"https")+"://buttons.github.io/",e=function(e){d=e},t="currentScript",o=!{}.hasOwnProperty.call(s,t)&&s[t]&&delete s[t]&&s[t]?s[t].src:void 0;var f,g,n;f=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},g=function(t,o,n){var r;f(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},n=function(e){var t,o;/m/.test(s.readyState)||!/g/.test(s.readyState)&&!s.documentElement.doScroll?setTimeout(e):s.addEventListener?(o=0,g(s,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),g(window,"load",t)):(t=function(){/m/.test(s.readyState)&&(s.detachEvent("onreadystatechange",t),e())},s.attachEvent("onreadystatechange",t))};var a,i="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n";a=function(e){var t;(t=p("style")).type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=i:t.appendChild(u(i))};var b,m,v,w,x,C,y,F,k,z,E,_={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),_.hasOwnProperty(e)||(e="mark-github"),'"},m=function(e,t){var o,n;return(o=p("a")).href=t.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=t["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=b(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),o.appendChild(u(" ")),o.appendChild(p("span")).appendChild(u(t["data-text"]||"")),e.appendChild(o)},v=function(e,t){var o,n,r,a,i,l,c;r=this||window,a=0,n=function(){!a&&(a=1)&&t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(c=new o,f(c,"abort",n),f(c,"error",n),f(c,"load",function(){n(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",e),c.send()):(r._=function(e){r._=null,n(200!==e.meta.status,e.data)},(l=p("script")).async=!0,l.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(l,"error",i=function(){r._&&r._({meta:{}})}),l.readyState&&f(l,"readystatechange",function(){"loaded"===l.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(l))},w=function(r,e){var t,a,i,o,l;return a=function(){e&&e()},"github.com"!==r.hostname?a():!(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||o[6]?a():(o[2]?(t="repos/"+o[1]+"/"+o[2],o[3]?(l="subscribers_count",i="watchers"):o[4]?(l="forks_count",i="network"):o[5]?(l="open_issues_count",i="issues"):(l="stargazers_count",i="stargazers")):(t="users/"+o[1],i=l="followers"),void v.call(this,"https://api.github.com/"+t,function(e,t){var o,n;e||(n=t[l],(o=p("a")).href=t.html_url+"/"+i,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+l.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(p("b")),o.appendChild(p("i")),o.appendChild(p("span")).appendChild(u((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()}))},x=function(e,t,o){var n,r;t&&(a(e),(r=e.appendChild(s.createElement("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),n=m(r,t),/^(true|1)$/i.test(t["data-show-count"])?w.call(this,n,function(){o&&o(r)}):o&&o(r))},C=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),_.hasOwnProperty(e)||(e="mark-github"),'"},m=function(e,t){var o,n;return(o=p("a")).href=t.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=t["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=b(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),o.appendChild(u(" ")),o.appendChild(p("span")).appendChild(u(t["data-text"]||"")),e.appendChild(o)},v=function(e,t){var o,n,r,a,i,l,c;r=this||window,a=0,n=function(){!a&&(a=1)&&t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(c=new o,f(c,"abort",n),f(c,"error",n),f(c,"load",function(){n(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",e),c.send()):(r._=function(e){r._=null,n(200!==e.meta.status,e.data)},(l=p("script")).async=!0,l.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(l,"error",i=function(){r._&&r._({meta:{}})}),l.readyState&&f(l,"readystatechange",function(){"loaded"===l.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(l))},w=function(r,e){var t,a,i,o,l;return a=function(){e&&e()},"github.com"!==r.hostname?a():!(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||o[6]?a():(o[2]?(t="repos/"+o[1]+"/"+o[2],o[3]?(l="subscribers_count",i="watchers"):o[4]?(l="forks_count",i="network"):o[5]?(l="open_issues_count",i="issues"):(l="stargazers_count",i="stargazers")):(t="users/"+o[1],i=l="followers"),void v.call(this,"https://api.github.com/"+t,function(e,t){var o,n;e||(n=t[l],(o=p("a")).href=t.html_url+"/"+i,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+l.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(p("b")),o.appendChild(p("i")),o.appendChild(p("span")).appendChild(u((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()}))},x=function(e,t,o){var n,r;t&&(a(e),(r=e.appendChild(s.createElement("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),n=m(r,t),/^(true|1)$/i.test(t["data-show-count"])?w.call(this,n,function(){o&&o(r)}):o&&o(r))},C=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o export { buttonClass - uuid baseURL apiBaseURL setBaseURL diff --git a/src/container.coffee b/src/container.coffee index 969c3b33..96f34068 100644 --- a/src/container.coffee +++ b/src/container.coffee @@ -4,7 +4,6 @@ import { } from "./alias" import { baseURL - uuid } from "./config" import { parseOptions diff --git a/src/main.coffee b/src/main.coffee index 66eddc61..74092201 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -2,7 +2,7 @@ import { document } from "./alias" import { - uuid + baseURL setBaseURL } from "./config" import { @@ -31,7 +31,7 @@ else if typeof exports is "object" and typeof exports.nodeName isnt "string" else setBaseURL currentScriptURL.replace /[^/]*([?#].*)?$/, "" if currentScriptURL - if document.title is uuid + if baseURL + "buttons.html" is document.location.href.replace /[?#].*$/, "" renderContent document.body, parseQueryString document.location.hash.replace /^#/, "" else defer batchRender From efc32540c70573f8b412413a7e69528055f5782e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 14 Jul 2018 17:49:41 -0700 Subject: [PATCH 0075/1193] Combine indential requests --- assets/js/app.js | 26 +++++++++++++++++--------- assets/js/app.min.js | 2 +- dist/buttons.common.js | 26 +++++++++++++++++--------- dist/buttons.esm.js | 26 +++++++++++++++++--------- dist/buttons.js | 26 +++++++++++++++++--------- dist/buttons.min.js | 2 +- src/fetch.coffee | 17 +++++++++++------ 7 files changed, 81 insertions(+), 44 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 31f98258..192fd941 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -186,15 +186,22 @@ return root.appendChild(a); }; - var fetch; + var fetch, queues; + + queues = {}; fetch = function(url, func) { - var XMLHttpRequest, callback, global, onceToken, onloadend, script, xhr; - global = this || window; + var XMLHttpRequest, callback, contentWindow, onceToken, onloadend, queue, script, xhr; + if (1 < (queue = (queues[url] || (queues[url] = []))).push(func)) { + return; + } onceToken = 0; callback = function() { if (!onceToken && (onceToken = 1)) { - func.apply(null, arguments); + delete queues[url]; + while (func = queue.shift()) { + func.apply(null, arguments); + } } }; if ((XMLHttpRequest = window.XMLHttpRequest) && "withCredentials" in XMLHttpRequest.prototype) { @@ -207,16 +214,17 @@ xhr.open("GET", url); xhr.send(); } else { - global._ = function(json) { - global._ = null; + contentWindow = this || window; + contentWindow._ = function(json) { + contentWindow._ = null; callback(json.meta.status !== 200, json.data); }; script = createElement("script"); script.async = true; script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; onloadend = function() { - if (global._) { - global._({ + if (contentWindow._) { + contentWindow._({ meta: {} }); } @@ -231,7 +239,7 @@ } }); } - global.document.getElementsByTagName("head")[0].appendChild(script); + contentWindow.document.getElementsByTagName("head")[0].appendChild(script); } }; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 396b9d71..54d3db53 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)},c=function(t){return u.createTextNode(t)};s="github-button",l=(/^http:/.test(u.location)?"http":"https")+"://buttons.github.io/",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,n;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var i,a="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n";i=function(t){var e;(e=h("style")).type="text/css",t.appendChild(e),e.styleSheet?e.styleSheet.cssText=a:e.appendChild(c(a))};var g,b,m,w,v,y,C,x,k,z,F,E={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(t)||(t="mark-github"),'"},b=function(t,e){var o,n;return(o=h("a")).href=e.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=e["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=g(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),o.appendChild(c(" ")),o.appendChild(h("span")).appendChild(c(e["data-text"]||"")),t.appendChild(o)},m=function(t,e){var o,n,r,i,a,s,c;r=this||window,i=0,n=function(){!i&&(i=1)&&e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(c=new o,p(c,"abort",n),p(c,"error",n),p(c,"load",function(){n(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",t),c.send()):(r._=function(t){r._=null,n(200!==t.meta.status,t.data)},(s=h("script")).async=!0,s.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(s,"error",a=function(){r._&&r._({meta:{}})}),s.readyState&&p(s,"readystatechange",function(){"loaded"===s.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(s))},w=function(r,t){var e,i,a,o,s;return i=function(){t&&t()},"github.com"!==r.hostname?i():!(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||o[6]?i():(o[2]?(e="repos/"+o[1]+"/"+o[2],o[3]?(s="subscribers_count",a="watchers"):o[4]?(s="forks_count",a="network"):o[5]?(s="open_issues_count",a="issues"):(s="stargazers_count",a="stargazers")):(e="users/"+o[1],a=s="followers"),void m.call(this,"https://api.github.com/"+e,function(t,e){var o,n;t||(n=e[s],(o=h("a")).href=e.html_url+"/"+a,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+s.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(h("b")),o.appendChild(h("i")),o.appendChild(h("span")).appendChild(c((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()}))},v=function(t,e,o){var n,r;e&&(i(t),(r=t.appendChild(u.createElement("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),n=b(r,e),/^(true|1)$/i.test(e["data-show-count"])?w.call(this,n,function(){o&&o(r)}):o&&o(r))},y=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),$.hasOwnProperty(t)||(t="mark-github"),'"},b=function(t,e){var o,n;return(o=h("a")).href=e.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=e["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=g(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),o.appendChild(c(" ")),o.appendChild(h("span")).appendChild(c(e["data-text"]||"")),t.appendChild(o)},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,JSON.parse(l.responseText))}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=h("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(r,t){var e,i,a,o,s;return i=function(){t&&t()},"github.com"!==r.hostname?i():!(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||o[6]?i():(o[2]?(e="repos/"+o[1]+"/"+o[2],o[3]?(s="subscribers_count",a="watchers"):o[4]?(s="forks_count",a="network"):o[5]?(s="open_issues_count",a="issues"):(s="stargazers_count",a="stargazers")):(e="users/"+o[1],a=s="followers"),void m.call(this,"https://api.github.com/"+e,function(t,e){var o,n;t||(n=e[s],(o=h("a")).href=e.html_url+"/"+a,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+s.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(h("b")),o.appendChild(h("i")),o.appendChild(h("span")).appendChild(c((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()}))},y=function(t,e,o){var n,r;e&&(i(t),(r=t.appendChild(u.createElement("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),n=b(r,e),/^(true|1)$/i.test(e["data-show-count"])?v.call(this,n,function(){o&&o(r)}):o&&o(r))},C=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),_.hasOwnProperty(e)||(e="mark-github"),'"},m=function(e,t){var o,n;return(o=p("a")).href=t.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=t["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=b(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),o.appendChild(u(" ")),o.appendChild(p("span")).appendChild(u(t["data-text"]||"")),e.appendChild(o)},v=function(e,t){var o,n,r,a,i,l,c;r=this||window,a=0,n=function(){!a&&(a=1)&&t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(c=new o,f(c,"abort",n),f(c,"error",n),f(c,"load",function(){n(200!==c.status,JSON.parse(c.responseText))}),c.open("GET",e),c.send()):(r._=function(e){r._=null,n(200!==e.meta.status,e.data)},(l=p("script")).async=!0,l.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(l,"error",i=function(){r._&&r._({meta:{}})}),l.readyState&&f(l,"readystatechange",function(){"loaded"===l.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(l))},w=function(r,e){var t,a,i,o,l;return a=function(){e&&e()},"github.com"!==r.hostname?a():!(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||o[6]?a():(o[2]?(t="repos/"+o[1]+"/"+o[2],o[3]?(l="subscribers_count",i="watchers"):o[4]?(l="forks_count",i="network"):o[5]?(l="open_issues_count",i="issues"):(l="stargazers_count",i="stargazers")):(t="users/"+o[1],i=l="followers"),void v.call(this,"https://api.github.com/"+t,function(e,t){var o,n;e||(n=t[l],(o=p("a")).href=t.html_url+"/"+i,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+l.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(p("b")),o.appendChild(p("i")),o.appendChild(p("span")).appendChild(u((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()}))},x=function(e,t,o){var n,r;t&&(a(e),(r=e.appendChild(s.createElement("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),n=m(r,t),/^(true|1)$/i.test(t["data-show-count"])?w.call(this,n,function(){o&&o(r)}):o&&o(r))},C=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),M.hasOwnProperty(e)||(e="mark-github"),'"},m=function(e,t){var o,n;return(o=p("a")).href=t.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=t["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=b(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),o.appendChild(u(" ")),o.appendChild(p("span")).appendChild(u(t["data-text"]||"")),e.appendChild(o)},w={},v=function(e,t){var o,n,r,a,i,l,c,d;1<(l=w[e]||(w[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete w[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,JSON.parse(d.responseText))}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=p("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},x=function(r,e){var t,a,i,o,l;return a=function(){e&&e()},"github.com"!==r.hostname?a():!(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||o[6]?a():(o[2]?(t="repos/"+o[1]+"/"+o[2],o[3]?(l="subscribers_count",i="watchers"):o[4]?(l="forks_count",i="network"):o[5]?(l="open_issues_count",i="issues"):(l="stargazers_count",i="stargazers")):(t="users/"+o[1],i=l="followers"),void v.call(this,"https://api.github.com/"+t,function(e,t){var o,n;e||(n=t[l],(o=p("a")).href=t.html_url+"/"+i,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+l.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(p("b")),o.appendChild(p("i")),o.appendChild(p("span")).appendChild(u((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()}))},C=function(e,t,o){var n,r;t&&(a(e),(r=e.appendChild(s.createElement("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),n=m(r,t),/^(true|1)$/i.test(t["data-show-count"])?x.call(this,n,function(){o&&o(r)}):o&&o(r))},y=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o - global = @ or window + return if 1 < (queue = (queues[url] ||= [])).push func onceToken = 0 callback = -> if !onceToken and onceToken = 1 - func.apply null, arguments + delete queues[url] + func.apply null, arguments while func = queue.shift() return if (XMLHttpRequest = window.XMLHttpRequest) and "withCredentials" of XMLHttpRequest:: @@ -30,8 +33,10 @@ fetch = (url, func) -> xhr.open "GET", url xhr.send() else - global._ = (json) -> - global._ = null + contentWindow = @ or window + + contentWindow._ = (json) -> + contentWindow._ = null callback json.meta.status isnt 200, json.data return @@ -40,7 +45,7 @@ fetch = (url, func) -> script.src = url + (if /\?/.test url then "&" else "?") + "callback=_" onloadend = -> - global._ meta: {} if global._ + contentWindow._ meta: {} if contentWindow._ return onEvent script, "error", onloadend @@ -51,7 +56,7 @@ fetch = (url, func) -> onloadend() if script.readyState is "loaded" return - global.document.getElementsByTagName("head")[0].appendChild script + contentWindow.document.getElementsByTagName("head")[0].appendChild script return export { From 9cf1afa6c8647065833de85a7667ddef40fb8978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 14 Jul 2018 19:44:55 -0700 Subject: [PATCH 0076/1193] Fix for ancient browsers --- assets/js/app.js | 232 +++++++++++------------ assets/js/app.min.js | 2 +- dist/buttons.common.js | 222 ++++++++++------------ dist/buttons.esm.js | 230 +++++++++++------------ dist/buttons.js | 236 +++++++++++------------ dist/buttons.min.js | 2 +- src/alias.coffee | 1 - src/button.coffee | 37 ---- src/container.coffee | 2 +- src/content.coffee | 119 ++++++++++-- src/fetch.coffee | 4 +- src/social-count.coffee | 71 ------- src/style.coffee | 22 --- test/unit/alias.spec.coffee | 5 - test/unit/button.spec.coffee | 101 ---------- test/unit/content.spec.coffee | 289 +++++++++++++++++++++++++---- test/unit/fetch.spec.coffee | 46 +++++ test/unit/jsonp.spec.coffee | 3 +- test/unit/social-count.spec.coffee | 145 --------------- 19 files changed, 835 insertions(+), 934 deletions(-) delete mode 100644 src/button.coffee delete mode 100644 src/social-count.coffee delete mode 100644 src/style.coffee delete mode 100644 test/unit/button.spec.coffee create mode 100644 test/unit/fetch.spec.coffee delete mode 100644 test/unit/social-count.spec.coffee diff --git a/assets/js/app.js b/assets/js/app.js index 192fd941..6f12bd84 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -13,10 +13,6 @@ return document.createElement(tag); }; - var createTextNode = function(text) { - return document.createTextNode(text); - }; - var apiBaseURL, baseURL, buttonClass, setBaseURL; buttonClass = "github-button"; @@ -132,22 +128,6 @@ var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; - var render; - - render = function(root) { - var style; - style = createElement("style"); - style.type = "text/css"; - root.appendChild(style); - - /* istanbul ignore if */ - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - style.appendChild(createTextNode(css)); - } - }; - var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; var octicon; @@ -162,30 +142,6 @@ return "" + data[icon].path + ""; }; - var render$1; - - render$1 = function(root, options) { - var a, ariaLabel, span; - a = createElement("a"); - a.href = options.href; - a.target = "_blank"; - if (!/\.github\.com$/.test("." + a.hostname)) { - a.href = "#"; - a.target = "_self"; - } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { - a.target = "_top"; - } - a.className = "btn"; - if (ariaLabel = options["aria-label"]) { - a.setAttribute("aria-label", ariaLabel); - } - a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); - a.appendChild(createTextNode(" ")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(options["data-text"] || "")); - return root.appendChild(a); - }; - var fetch, queues; queues = {}; @@ -209,7 +165,11 @@ onEvent(xhr, "abort", callback); onEvent(xhr, "error", callback); onEvent(xhr, "load", function() { - callback(xhr.status !== 200, JSON.parse(xhr.responseText)); + callback(xhr.status !== 200, (function() { + try { + return JSON.parse(xhr.responseText); + } catch (error) {} + })()); }); xhr.open("GET", url); xhr.send(); @@ -219,7 +179,7 @@ contentWindow._ = null; callback(json.meta.status !== 200, json.data); }; - script = createElement("script"); + script = contentWindow.document.createElement("script"); script.async = true; script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; onloadend = function() { @@ -243,90 +203,112 @@ } }; - var render$2; + var render; - render$2 = function(button, func) { - var api, callback, href, match, property; + render = function(root, options, func) { + var button, callback, container, createElement, createTextNode, document, style; + if (!options) { + return; + } + document = root.ownerDocument; + createElement = function(tag) { + return document.createElement(tag); + }; + createTextNode = function(text) { + return document.createTextNode(text); + }; + style = createElement("style"); + style.type = "text/css"; + root.appendChild(style); + + /* istanbul ignore if */ + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(createTextNode(css)); + } + container = root.appendChild(createElement("div")); + container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); callback = function() { if (func) { - func(); + func(container); } }; - if (button.hostname !== "github.com") { - return callback(); - } - match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); - if (!(match && !match[6])) { - return callback(); - } - if (match[2]) { - api = "repos/" + match[1] + "/" + match[2]; - if (match[3]) { - property = "subscribers_count"; - href = "watchers"; - } else if (match[4]) { - property = "forks_count"; - href = "network"; - } else if (match[5]) { - property = "open_issues_count"; - href = "issues"; - } else { - property = "stargazers_count"; - href = "stargazers"; + button = (function() { + var a, ariaLabel, span; + a = createElement("a"); + a.href = options.href; + a.target = "_blank"; + if (!/\.github\.com$/.test("." + a.hostname)) { + a.href = "#"; + a.target = "_self"; + } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { + a.target = "_top"; } - } else { - api = "users/" + match[1]; - href = property = "followers"; - } - fetch.call(this, apiBaseURL + api, function(error, json) { - var a, data, span; - if (!error) { - data = json[property]; - a = createElement("a"); - a.href = json.html_url + "/" + href; - a.target = "_blank"; - a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); - a.appendChild(createElement("b")); - a.appendChild(createElement("i")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); - button.parentNode.insertBefore(a, button.nextSibling); + a.className = "btn"; + if (ariaLabel = options["aria-label"]) { + a.setAttribute("aria-label", ariaLabel); } - callback(); - }); - }; - - var render$3; - - render$3 = function(root, options, callback) { - var button, container; - if (!options) { - return; - } - render(root); - container = root.appendChild(document.createElement("div")); - container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); - button = render$1(container, options); - if (/^(true|1)$/i.test(options["data-show-count"])) { - render$2.call(this, button, function() { - if (callback) { - callback(container); + a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); + a.appendChild(createTextNode(" ")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(options["data-text"] || "")); + return container.appendChild(a); + })(); + (function() { + var api, href, match, property; + if (!(/^(true|1)$/i.test(options["data-show-count"]) && button.hostname === "github.com")) { + return callback(); + } + match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); + if (!(match && !match[6])) { + return callback(); + } + if (match[2]) { + api = "repos/" + match[1] + "/" + match[2]; + if (match[3]) { + property = "subscribers_count"; + href = "watchers"; + } else if (match[4]) { + property = "forks_count"; + href = "network"; + } else if (match[5]) { + property = "open_issues_count"; + href = "issues"; + } else { + property = "stargazers_count"; + href = "stargazers"; } - }); - } else { - if (callback) { - callback(container); + } else { + api = "users/" + match[1]; + href = property = "followers"; } - } + fetch.call(this, apiBaseURL + api, function(error, json) { + var a, data, span; + if (!error) { + data = json[property]; + a = createElement("a"); + a.href = json.html_url + "/" + href; + a.target = "_blank"; + a.className = "social-count"; + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.appendChild(createElement("b")); + a.appendChild(createElement("i")); + span = a.appendChild(createElement("span")); + span.appendChild(document.createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); + button.parentNode.insertBefore(a, button.nextSibling); + } + callback(); + }); + })(); }; - var render$4; + var render$1; /* istanbul ignore next */ - render$4 = function() { + render$1 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -342,7 +324,7 @@ } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render$5(anchor); + render$2(anchor); } }; @@ -376,20 +358,20 @@ el.style.height = size[1] + "px"; }; - var render$5; + var render$2; /* istanbul ignore next */ - render$5 = function(targetNode, options) { - var host, iframe, name, ref, root, title, value; + render$2 = function(targetNode, options) { + var HTMLElement, host, iframe, name, ref, root, title, value; if (targetNode == null) { - return render$4(); + return render$1(); } if (options == null) { options = parseOptions(targetNode); } - if (HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { + if ((HTMLElement = window.HTMLElement) && HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { host = createElement("span"); if (title = options.title) { host.title = title; @@ -397,7 +379,7 @@ root = host.attachShadow({ mode: "closed" }); - render$3(root, options); + render(root, options); targetNode.parentNode.replaceChild(host, targetNode); } else { iframe = createElement("iframe"); @@ -419,7 +401,7 @@ onceEvent(iframe, "load", function() { var contentWindow; contentWindow = iframe.contentWindow; - render$3.call(contentWindow, contentWindow.document.body, options, function(container) { + render.call(contentWindow, contentWindow.document.body, options, function(container) { var size; size = get(container); iframe.parentNode.removeChild(iframe); @@ -476,7 +458,7 @@ return function() { var root; root = _this.$el.appendChild(createElement("span")); - render$5(root, _this.config); + render$2(root, _this.config); }; })(this), this.rateLimitWait); } @@ -490,7 +472,7 @@ el: '#app', template: '#app-template', mounted: function() { - setTimeout(render$4); + setTimeout(render$1); }, data: function() { return { diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 54d3db53..2dceefe3 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)},c=function(t){return u.createTextNode(t)};s="github-button",l=(/^http:/.test(u.location)?"http":"https")+"://buttons.github.io/",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,n;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var i,a="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n";i=function(t){var e;(e=h("style")).type="text/css",t.appendChild(e),e.styleSheet?e.styleSheet.cssText=a:e.appendChild(c(a))};var g,b,m,w,v,y,C,x,k,z,F,E,$={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),$.hasOwnProperty(t)||(t="mark-github"),'"},b=function(t,e){var o,n;return(o=h("a")).href=e.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=e["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=g(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),o.appendChild(c(" ")),o.appendChild(h("span")).appendChild(c(e["data-text"]||"")),t.appendChild(o)},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,JSON.parse(l.responseText))}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=h("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(r,t){var e,i,a,o,s;return i=function(){t&&t()},"github.com"!==r.hostname?i():!(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||o[6]?i():(o[2]?(e="repos/"+o[1]+"/"+o[2],o[3]?(s="subscribers_count",a="watchers"):o[4]?(s="forks_count",a="network"):o[5]?(s="open_issues_count",a="issues"):(s="stargazers_count",a="stargazers")):(e="users/"+o[1],a=s="followers"),void m.call(this,"https://api.github.com/"+e,function(t,e){var o,n;t||(n=e[s],(o=h("a")).href=e.html_url+"/"+a,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+s.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(h("b")),o.appendChild(h("i")),o.appendChild(h("span")).appendChild(c((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()}))},y=function(t,e,o){var n,r;e&&(i(t),(r=t.appendChild(u.createElement("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),n=b(r,e),/^(true|1)$/i.test(e["data-show-count"])?v.call(this,n,function(){o&&o(r)}):o&&o(r))},C=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),l.hasOwnProperty(t)||(t="mark-github"),'"},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,f(l,"abort",n),f(l,"error",n),f(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",f(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(t,o,e){var a,s,n,c,r,l,i,u,d;o&&(l=t.ownerDocument,r=function(t){return l.createTextNode(t)},(i=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=k:i.appendChild(r(k)),(n=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(n)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(r(" ")),u.appendChild(c("span")).appendChild(r(o["data-text"]||"")),a=n.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),m.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},y=function(){var t,e,o,n,r,i,a;if(e=[],d.querySelectorAll)e=d.querySelectorAll("a."+s);else for(o=0,r=(a=d.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){d.activeElement!==this.$refs.user&&d.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=p("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0"},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; var octicon; @@ -119,30 +99,6 @@ octicon = function(icon, height) { return "" + data[icon].path + ""; }; -var render$1; - -render$1 = function(root, options) { - var a, ariaLabel, span; - a = createElement("a"); - a.href = options.href; - a.target = "_blank"; - if (!/\.github\.com$/.test("." + a.hostname)) { - a.href = "#"; - a.target = "_self"; - } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { - a.target = "_top"; - } - a.className = "btn"; - if (ariaLabel = options["aria-label"]) { - a.setAttribute("aria-label", ariaLabel); - } - a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); - a.appendChild(createTextNode(" ")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(options["data-text"] || "")); - return root.appendChild(a); -}; - var fetch, queues; queues = {}; @@ -166,7 +122,11 @@ fetch = function(url, func) { onEvent(xhr, "abort", callback); onEvent(xhr, "error", callback); onEvent(xhr, "load", function() { - callback(xhr.status !== 200, JSON.parse(xhr.responseText)); + callback(xhr.status !== 200, (function() { + try { + return JSON.parse(xhr.responseText); + } catch (error) {} + })()); }); xhr.open("GET", url); xhr.send(); @@ -176,7 +136,7 @@ fetch = function(url, func) { contentWindow._ = null; callback(json.meta.status !== 200, json.data); }; - script = createElement("script"); + script = contentWindow.document.createElement("script"); script.async = true; script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; onloadend = function() { @@ -200,90 +160,112 @@ fetch = function(url, func) { } }; -var render$2; +var render; + +render = function(root, options, func) { + var button, callback, container, createElement, createTextNode, document, style; + if (!options) { + return; + } + document = root.ownerDocument; + createElement = function(tag) { + return document.createElement(tag); + }; + createTextNode = function(text) { + return document.createTextNode(text); + }; + style = createElement("style"); + style.type = "text/css"; + root.appendChild(style); -render$2 = function(button, func) { - var api, callback, href, match, property; + /* istanbul ignore if */ + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(createTextNode(css)); + } + container = root.appendChild(createElement("div")); + container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); callback = function() { if (func) { - func(); + func(container); } }; - if (button.hostname !== "github.com") { - return callback(); - } - match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); - if (!(match && !match[6])) { - return callback(); - } - if (match[2]) { - api = "repos/" + match[1] + "/" + match[2]; - if (match[3]) { - property = "subscribers_count"; - href = "watchers"; - } else if (match[4]) { - property = "forks_count"; - href = "network"; - } else if (match[5]) { - property = "open_issues_count"; - href = "issues"; - } else { - property = "stargazers_count"; - href = "stargazers"; + button = (function() { + var a, ariaLabel, span; + a = createElement("a"); + a.href = options.href; + a.target = "_blank"; + if (!/\.github\.com$/.test("." + a.hostname)) { + a.href = "#"; + a.target = "_self"; + } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { + a.target = "_top"; } - } else { - api = "users/" + match[1]; - href = property = "followers"; - } - fetch.call(this, apiBaseURL + api, function(error, json) { - var a, data, span; - if (!error) { - data = json[property]; - a = createElement("a"); - a.href = json.html_url + "/" + href; - a.target = "_blank"; - a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); - a.appendChild(createElement("b")); - a.appendChild(createElement("i")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); - button.parentNode.insertBefore(a, button.nextSibling); + a.className = "btn"; + if (ariaLabel = options["aria-label"]) { + a.setAttribute("aria-label", ariaLabel); } - callback(); - }); -}; - -var render$3; - -render$3 = function(root, options, callback) { - var button, container; - if (!options) { - return; - } - render(root); - container = root.appendChild(document.createElement("div")); - container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); - button = render$1(container, options); - if (/^(true|1)$/i.test(options["data-show-count"])) { - render$2.call(this, button, function() { - if (callback) { - callback(container); + a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); + a.appendChild(createTextNode(" ")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(options["data-text"] || "")); + return container.appendChild(a); + })(); + (function() { + var api, href, match, property; + if (!(/^(true|1)$/i.test(options["data-show-count"]) && button.hostname === "github.com")) { + return callback(); + } + match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); + if (!(match && !match[6])) { + return callback(); + } + if (match[2]) { + api = "repos/" + match[1] + "/" + match[2]; + if (match[3]) { + property = "subscribers_count"; + href = "watchers"; + } else if (match[4]) { + property = "forks_count"; + href = "network"; + } else if (match[5]) { + property = "open_issues_count"; + href = "issues"; + } else { + property = "stargazers_count"; + href = "stargazers"; } - }); - } else { - if (callback) { - callback(container); + } else { + api = "users/" + match[1]; + href = property = "followers"; } - } + fetch.call(this, apiBaseURL + api, function(error, json) { + var a, data, span; + if (!error) { + data = json[property]; + a = createElement("a"); + a.href = json.html_url + "/" + href; + a.target = "_blank"; + a.className = "social-count"; + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.appendChild(createElement("b")); + a.appendChild(createElement("i")); + span = a.appendChild(createElement("span")); + span.appendChild(document.createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); + button.parentNode.insertBefore(a, button.nextSibling); + } + callback(); + }); + })(); }; -var render$4; +var render$1; /* istanbul ignore next */ -render$4 = function() { +render$1 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -336,14 +318,14 @@ set = function(el, size) { /* istanbul ignore next */ exports.render = function(targetNode, options) { - var host, iframe, name, ref, root, title, value; + var HTMLElement, host, iframe, name, ref, root, title, value; if (targetNode == null) { - return render$4(); + return render$1(); } if (options == null) { options = parseOptions(targetNode); } - if (HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { + if ((HTMLElement = window.HTMLElement) && HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { host = createElement("span"); if (title = options.title) { host.title = title; @@ -351,7 +333,7 @@ exports.render = function(targetNode, options) { root = host.attachShadow({ mode: "closed" }); - render$3(root, options); + render(root, options); targetNode.parentNode.replaceChild(host, targetNode); } else { iframe = createElement("iframe"); @@ -373,7 +355,7 @@ exports.render = function(targetNode, options) { onceEvent(iframe, "load", function() { var contentWindow; contentWindow = iframe.contentWindow; - render$3.call(contentWindow, contentWindow.document.body, options, function(container) { + render.call(contentWindow, contentWindow.document.body, options, function(container) { var size; size = get(container); iframe.parentNode.removeChild(iframe); diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index f5b09bbc..91456094 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -10,10 +10,6 @@ var createElement = function(tag) { return document.createElement(tag); }; -var createTextNode = function(text) { - return document.createTextNode(text); -}; - var apiBaseURL, baseURL, buttonClass; buttonClass = "github-button"; @@ -85,22 +81,6 @@ onceEvent = function(target, eventName, func) { var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; -var render; - -render = function(root) { - var style; - style = createElement("style"); - style.type = "text/css"; - root.appendChild(style); - - /* istanbul ignore if */ - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - style.appendChild(createTextNode(css)); - } -}; - var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; var octicon; @@ -115,30 +95,6 @@ octicon = function(icon, height) { return "" + data[icon].path + ""; }; -var render$1; - -render$1 = function(root, options) { - var a, ariaLabel, span; - a = createElement("a"); - a.href = options.href; - a.target = "_blank"; - if (!/\.github\.com$/.test("." + a.hostname)) { - a.href = "#"; - a.target = "_self"; - } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { - a.target = "_top"; - } - a.className = "btn"; - if (ariaLabel = options["aria-label"]) { - a.setAttribute("aria-label", ariaLabel); - } - a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); - a.appendChild(createTextNode(" ")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(options["data-text"] || "")); - return root.appendChild(a); -}; - var fetch, queues; queues = {}; @@ -162,7 +118,11 @@ fetch = function(url, func) { onEvent(xhr, "abort", callback); onEvent(xhr, "error", callback); onEvent(xhr, "load", function() { - callback(xhr.status !== 200, JSON.parse(xhr.responseText)); + callback(xhr.status !== 200, (function() { + try { + return JSON.parse(xhr.responseText); + } catch (error) {} + })()); }); xhr.open("GET", url); xhr.send(); @@ -172,7 +132,7 @@ fetch = function(url, func) { contentWindow._ = null; callback(json.meta.status !== 200, json.data); }; - script = createElement("script"); + script = contentWindow.document.createElement("script"); script.async = true; script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; onloadend = function() { @@ -196,90 +156,112 @@ fetch = function(url, func) { } }; -var render$2; +var render; + +render = function(root, options, func) { + var button, callback, container, createElement, createTextNode, document, style; + if (!options) { + return; + } + document = root.ownerDocument; + createElement = function(tag) { + return document.createElement(tag); + }; + createTextNode = function(text) { + return document.createTextNode(text); + }; + style = createElement("style"); + style.type = "text/css"; + root.appendChild(style); -render$2 = function(button, func) { - var api, callback, href, match, property; + /* istanbul ignore if */ + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(createTextNode(css)); + } + container = root.appendChild(createElement("div")); + container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); callback = function() { if (func) { - func(); + func(container); } }; - if (button.hostname !== "github.com") { - return callback(); - } - match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); - if (!(match && !match[6])) { - return callback(); - } - if (match[2]) { - api = "repos/" + match[1] + "/" + match[2]; - if (match[3]) { - property = "subscribers_count"; - href = "watchers"; - } else if (match[4]) { - property = "forks_count"; - href = "network"; - } else if (match[5]) { - property = "open_issues_count"; - href = "issues"; - } else { - property = "stargazers_count"; - href = "stargazers"; + button = (function() { + var a, ariaLabel, span; + a = createElement("a"); + a.href = options.href; + a.target = "_blank"; + if (!/\.github\.com$/.test("." + a.hostname)) { + a.href = "#"; + a.target = "_self"; + } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { + a.target = "_top"; } - } else { - api = "users/" + match[1]; - href = property = "followers"; - } - fetch.call(this, apiBaseURL + api, function(error, json) { - var a, data, span; - if (!error) { - data = json[property]; - a = createElement("a"); - a.href = json.html_url + "/" + href; - a.target = "_blank"; - a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); - a.appendChild(createElement("b")); - a.appendChild(createElement("i")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); - button.parentNode.insertBefore(a, button.nextSibling); + a.className = "btn"; + if (ariaLabel = options["aria-label"]) { + a.setAttribute("aria-label", ariaLabel); } - callback(); - }); -}; - -var render$3; - -render$3 = function(root, options, callback) { - var button, container; - if (!options) { - return; - } - render(root); - container = root.appendChild(document.createElement("div")); - container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); - button = render$1(container, options); - if (/^(true|1)$/i.test(options["data-show-count"])) { - render$2.call(this, button, function() { - if (callback) { - callback(container); + a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); + a.appendChild(createTextNode(" ")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(options["data-text"] || "")); + return container.appendChild(a); + })(); + (function() { + var api, href, match, property; + if (!(/^(true|1)$/i.test(options["data-show-count"]) && button.hostname === "github.com")) { + return callback(); + } + match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); + if (!(match && !match[6])) { + return callback(); + } + if (match[2]) { + api = "repos/" + match[1] + "/" + match[2]; + if (match[3]) { + property = "subscribers_count"; + href = "watchers"; + } else if (match[4]) { + property = "forks_count"; + href = "network"; + } else if (match[5]) { + property = "open_issues_count"; + href = "issues"; + } else { + property = "stargazers_count"; + href = "stargazers"; } - }); - } else { - if (callback) { - callback(container); + } else { + api = "users/" + match[1]; + href = property = "followers"; } - } + fetch.call(this, apiBaseURL + api, function(error, json) { + var a, data, span; + if (!error) { + data = json[property]; + a = createElement("a"); + a.href = json.html_url + "/" + href; + a.target = "_blank"; + a.className = "social-count"; + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.appendChild(createElement("b")); + a.appendChild(createElement("i")); + span = a.appendChild(createElement("span")); + span.appendChild(document.createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); + button.parentNode.insertBefore(a, button.nextSibling); + } + callback(); + }); + })(); }; -var render$4; +var render$1; /* istanbul ignore next */ -render$4 = function() { +render$1 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -295,7 +277,7 @@ render$4 = function() { } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render$5(anchor); + render$2(anchor); } }; @@ -329,20 +311,20 @@ set = function(el, size) { el.style.height = size[1] + "px"; }; -var render$5; +var render$2; /* istanbul ignore next */ -render$5 = function(targetNode, options) { - var host, iframe, name, ref, root, title, value; +render$2 = function(targetNode, options) { + var HTMLElement, host, iframe, name, ref, root, title, value; if (targetNode == null) { - return render$4(); + return render$1(); } if (options == null) { options = parseOptions(targetNode); } - if (HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { + if ((HTMLElement = window.HTMLElement) && HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { host = createElement("span"); if (title = options.title) { host.title = title; @@ -350,7 +332,7 @@ render$5 = function(targetNode, options) { root = host.attachShadow({ mode: "closed" }); - render$3(root, options); + render(root, options); targetNode.parentNode.replaceChild(host, targetNode); } else { iframe = createElement("iframe"); @@ -372,7 +354,7 @@ render$5 = function(targetNode, options) { onceEvent(iframe, "load", function() { var contentWindow; contentWindow = iframe.contentWindow; - render$3.call(contentWindow, contentWindow.document.body, options, function(container) { + render.call(contentWindow, contentWindow.document.body, options, function(container) { var size; size = get(container); iframe.parentNode.removeChild(iframe); @@ -387,4 +369,4 @@ render$5 = function(targetNode, options) { } }; -export { render$5 as render }; +export { render$2 as render }; diff --git a/dist/buttons.js b/dist/buttons.js index fdd927d1..cb0b29b0 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -13,10 +13,6 @@ return document.createElement(tag); }; - var createTextNode = function(text) { - return document.createTextNode(text); - }; - var apiBaseURL, baseURL, buttonClass, setBaseURL; buttonClass = "github-button"; @@ -147,22 +143,6 @@ var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; - var render; - - render = function(root) { - var style; - style = createElement("style"); - style.type = "text/css"; - root.appendChild(style); - - /* istanbul ignore if */ - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - style.appendChild(createTextNode(css)); - } - }; - var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; var octicon; @@ -177,30 +157,6 @@ return "" + data[icon].path + ""; }; - var render$1; - - render$1 = function(root, options) { - var a, ariaLabel, span; - a = createElement("a"); - a.href = options.href; - a.target = "_blank"; - if (!/\.github\.com$/.test("." + a.hostname)) { - a.href = "#"; - a.target = "_self"; - } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { - a.target = "_top"; - } - a.className = "btn"; - if (ariaLabel = options["aria-label"]) { - a.setAttribute("aria-label", ariaLabel); - } - a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); - a.appendChild(createTextNode(" ")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(options["data-text"] || "")); - return root.appendChild(a); - }; - var fetch, queues; queues = {}; @@ -224,7 +180,11 @@ onEvent(xhr, "abort", callback); onEvent(xhr, "error", callback); onEvent(xhr, "load", function() { - callback(xhr.status !== 200, JSON.parse(xhr.responseText)); + callback(xhr.status !== 200, (function() { + try { + return JSON.parse(xhr.responseText); + } catch (error) {} + })()); }); xhr.open("GET", url); xhr.send(); @@ -234,7 +194,7 @@ contentWindow._ = null; callback(json.meta.status !== 200, json.data); }; - script = createElement("script"); + script = contentWindow.document.createElement("script"); script.async = true; script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; onloadend = function() { @@ -258,90 +218,112 @@ } }; - var render$2; + var render; - render$2 = function(button, func) { - var api, callback, href, match, property; + render = function(root, options, func) { + var button, callback, container, createElement, createTextNode, document, style; + if (!options) { + return; + } + document = root.ownerDocument; + createElement = function(tag) { + return document.createElement(tag); + }; + createTextNode = function(text) { + return document.createTextNode(text); + }; + style = createElement("style"); + style.type = "text/css"; + root.appendChild(style); + + /* istanbul ignore if */ + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(createTextNode(css)); + } + container = root.appendChild(createElement("div")); + container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); callback = function() { if (func) { - func(); + func(container); } }; - if (button.hostname !== "github.com") { - return callback(); - } - match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); - if (!(match && !match[6])) { - return callback(); - } - if (match[2]) { - api = "repos/" + match[1] + "/" + match[2]; - if (match[3]) { - property = "subscribers_count"; - href = "watchers"; - } else if (match[4]) { - property = "forks_count"; - href = "network"; - } else if (match[5]) { - property = "open_issues_count"; - href = "issues"; - } else { - property = "stargazers_count"; - href = "stargazers"; + button = (function() { + var a, ariaLabel, span; + a = createElement("a"); + a.href = options.href; + a.target = "_blank"; + if (!/\.github\.com$/.test("." + a.hostname)) { + a.href = "#"; + a.target = "_self"; + } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { + a.target = "_top"; } - } else { - api = "users/" + match[1]; - href = property = "followers"; - } - fetch.call(this, apiBaseURL + api, function(error, json) { - var a, data, span; - if (!error) { - data = json[property]; - a = createElement("a"); - a.href = json.html_url + "/" + href; - a.target = "_blank"; - a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); - a.appendChild(createElement("b")); - a.appendChild(createElement("i")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); - button.parentNode.insertBefore(a, button.nextSibling); + a.className = "btn"; + if (ariaLabel = options["aria-label"]) { + a.setAttribute("aria-label", ariaLabel); } - callback(); - }); - }; - - var render$3; - - render$3 = function(root, options, callback) { - var button, container; - if (!options) { - return; - } - render(root); - container = root.appendChild(document.createElement("div")); - container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); - button = render$1(container, options); - if (/^(true|1)$/i.test(options["data-show-count"])) { - render$2.call(this, button, function() { - if (callback) { - callback(container); + a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); + a.appendChild(createTextNode(" ")); + span = a.appendChild(createElement("span")); + span.appendChild(createTextNode(options["data-text"] || "")); + return container.appendChild(a); + })(); + (function() { + var api, href, match, property; + if (!(/^(true|1)$/i.test(options["data-show-count"]) && button.hostname === "github.com")) { + return callback(); + } + match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); + if (!(match && !match[6])) { + return callback(); + } + if (match[2]) { + api = "repos/" + match[1] + "/" + match[2]; + if (match[3]) { + property = "subscribers_count"; + href = "watchers"; + } else if (match[4]) { + property = "forks_count"; + href = "network"; + } else if (match[5]) { + property = "open_issues_count"; + href = "issues"; + } else { + property = "stargazers_count"; + href = "stargazers"; } - }); - } else { - if (callback) { - callback(container); + } else { + api = "users/" + match[1]; + href = property = "followers"; } - } + fetch.call(this, apiBaseURL + api, function(error, json) { + var a, data, span; + if (!error) { + data = json[property]; + a = createElement("a"); + a.href = json.html_url + "/" + href; + a.target = "_blank"; + a.className = "social-count"; + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.appendChild(createElement("b")); + a.appendChild(createElement("i")); + span = a.appendChild(createElement("span")); + span.appendChild(document.createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); + button.parentNode.insertBefore(a, button.nextSibling); + } + callback(); + }); + })(); }; - var render$4; + var render$1; /* istanbul ignore next */ - render$4 = function() { + render$1 = function() { var anchor, anchors, i, j, len, len1, ref; anchors = []; if (document.querySelectorAll) { @@ -357,7 +339,7 @@ } for (j = 0, len1 = anchors.length; j < len1; j++) { anchor = anchors[j]; - render$5(anchor); + render$2(anchor); } }; @@ -391,20 +373,20 @@ el.style.height = size[1] + "px"; }; - var render$5; + var render$2; /* istanbul ignore next */ - render$5 = function(targetNode, options) { - var host, iframe, name, ref, root, title, value; + render$2 = function(targetNode, options) { + var HTMLElement, host, iframe, name, ref, root, title, value; if (targetNode == null) { - return render$4(); + return render$1(); } if (options == null) { options = parseOptions(targetNode); } - if (HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { + if ((HTMLElement = window.HTMLElement) && HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { host = createElement("span"); if (title = options.title) { host.title = title; @@ -412,7 +394,7 @@ root = host.attachShadow({ mode: "closed" }); - render$3(root, options); + render(root, options); targetNode.parentNode.replaceChild(host, targetNode); } else { iframe = createElement("iframe"); @@ -434,7 +416,7 @@ onceEvent(iframe, "load", function() { var contentWindow; contentWindow = iframe.contentWindow; - render$3.call(contentWindow, contentWindow.document.body, options, function(container) { + render.call(contentWindow, contentWindow.document.body, options, function(container) { var size; size = get(container); iframe.parentNode.removeChild(iframe); @@ -451,18 +433,18 @@ if (typeof define === "function" && define.amd) { define([], { - render: render$5 + render: render$2 }); } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { - exports.render = render$5; + exports.render = render$2; } else { if (currentScriptURL) { setBaseURL(currentScriptURL.replace(/[^\/]*([?#].*)?$/, "")); } if (baseURL + "buttons.html" === document.location.href.replace(/[?#].*$/, "")) { - render$3(document.body, parse(document.location.hash.replace(/^#/, ""))); + render(document.body, parse(document.location.hash.replace(/^#/, ""))); } else { - defer(render$4); + defer(render$1); } } diff --git a/dist/buttons.min.js b/dist/buttons.min.js index e64ff37c..c371b4bc 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var d,l,e,t,o,s=window.document,h=window.encodeURIComponent,c=window.decodeURIComponent,r=window.Math,p=function(e){return s.createElement(e)},u=function(e){return s.createTextNode(e)};l="github-button",d=(/^http:/.test(s.location)?"http":"https")+"://buttons.github.io/",e=function(e){d=e},t="currentScript",o=!{}.hasOwnProperty.call(s,t)&&s[t]&&delete s[t]&&s[t]?s[t].src:void 0;var f,g,n;f=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},g=function(t,o,n){var r;f(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},n=function(e){var t,o;/m/.test(s.readyState)||!/g/.test(s.readyState)&&!s.documentElement.doScroll?setTimeout(e):s.addEventListener?(o=0,g(s,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),g(window,"load",t)):(t=function(){/m/.test(s.readyState)&&(s.detachEvent("onreadystatechange",t),e())},s.attachEvent("onreadystatechange",t))};var a,i="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n";a=function(e){var t;(t=p("style")).type="text/css",e.appendChild(t),t.styleSheet?t.styleSheet.cssText=i:t.appendChild(u(i))};var b,m,v,w,x,C,y,F,k,z,E,_,M={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),M.hasOwnProperty(e)||(e="mark-github"),'"},m=function(e,t){var o,n;return(o=p("a")).href=t.href,o.target="_blank",/\.github\.com$/.test("."+o.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(o.href)&&(o.target="_top"):(o.href="#",o.target="_self"),o.className="btn",(n=t["aria-label"])&&o.setAttribute("aria-label",n),o.innerHTML=b(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),o.appendChild(u(" ")),o.appendChild(p("span")).appendChild(u(t["data-text"]||"")),e.appendChild(o)},w={},v=function(e,t){var o,n,r,a,i,l,c,d;1<(l=w[e]||(w[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete w[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,JSON.parse(d.responseText))}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=p("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},x=function(r,e){var t,a,i,o,l;return a=function(){e&&e()},"github.com"!==r.hostname?a():!(o=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||o[6]?a():(o[2]?(t="repos/"+o[1]+"/"+o[2],o[3]?(l="subscribers_count",i="watchers"):o[4]?(l="forks_count",i="network"):o[5]?(l="open_issues_count",i="issues"):(l="stargazers_count",i="stargazers")):(t="users/"+o[1],i=l="followers"),void v.call(this,"https://api.github.com/"+t,function(e,t){var o,n;e||(n=t[l],(o=p("a")).href=t.html_url+"/"+i,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+l.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(p("b")),o.appendChild(p("i")),o.appendChild(p("span")).appendChild(u((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()}))},C=function(e,t,o){var n,r;t&&(a(e),(r=e.appendChild(s.createElement("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),n=m(r,t),/^(true|1)$/i.test(t["data-show-count"])?x.call(this,n,function(){o&&o(r)}):o&&o(r))},y=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},v={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=v[e]||(v[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete v[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,n,c,r,d,a,s,h;o&&(d=e.ownerDocument,r=function(e){return d.createTextNode(e)},(a=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=F:a.appendChild(r(F)),(n=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(n)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(r(" ")),s.appendChild(c("span")).appendChild(r(o["data-text"]||"")),i=n.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o document.createElement tag -export createTextNode = (text) -> document.createTextNode text diff --git a/src/button.coffee b/src/button.coffee deleted file mode 100644 index 9723de67..00000000 --- a/src/button.coffee +++ /dev/null @@ -1,37 +0,0 @@ -import { - document - createElement - createTextNode -} from "./alias" -import { - octicon -} from "./octicons" - -render = (root, options) -> - a = createElement "a" - a.href = options.href - a.target = "_blank" - - if not /\.github\.com$/.test ".#{a.hostname}" - a.href = "#" - a.target = "_self" - else if /// - ^https?://( - (gist\.)?github\.com/[^/?#]+/[^/?#]+/archive/ | - github\.com/[^/?#]+/[^/?#]+/releases/download/ | - codeload\.github\.com/ - ) - ///.test a.href - a.target = "_top" - - a.className = "btn" - a.setAttribute "aria-label", ariaLabel if ariaLabel = options["aria-label"] - a.innerHTML = octicon options["data-icon"], if /^large$/i.test options["data-size"] then 16 else 14 - a.appendChild createTextNode " " - span = a.appendChild createElement "span" - span.appendChild createTextNode options["data-text"] or "" - root.appendChild a - -export { - render -} diff --git a/src/container.coffee b/src/container.coffee index 96f34068..58a8ea68 100644 --- a/src/container.coffee +++ b/src/container.coffee @@ -30,7 +30,7 @@ render = (targetNode, options) -> return batchRender() unless targetNode? options = parseOptions targetNode unless options? - if HTMLElement::attachShadow and !HTMLElement::attachShadow:: + if (HTMLElement = window.HTMLElement) and HTMLElement::attachShadow and !HTMLElement::attachShadow:: host = createElement "span" host.title = title if title = options.title root = host.attachShadow mode: "closed" diff --git a/src/content.coffee b/src/content.coffee index 4f3ad443..7f2c2feb 100644 --- a/src/content.coffee +++ b/src/content.coffee @@ -1,30 +1,113 @@ +import css from "../assets/css/buttons.css" import { - document -} from "./alias" + octicon +} from "./octicons" import { - render as renderStyle -} from "./style" + apiBaseURL +} from "./config" import { - render as renderButton -} from "./button" -import { - render as renderSocialCount -} from "./social-count" + fetch +} from "./fetch" -render = (root, options, callback) -> +render = (root, options, func) -> return unless options - renderStyle root + document = root.ownerDocument + createElement = (tag) -> document.createElement tag + createTextNode = (text) -> document.createTextNode text + + style = createElement "style" + style.type = "text/css" + root.appendChild style + ### istanbul ignore if ### + if style.styleSheet + style.styleSheet.cssText = css + else + style.appendChild createTextNode css - container = root.appendChild document.createElement "div" + container = root.appendChild createElement "div" container.className = "widget" + (if /^large$/i.test options["data-size"] then " large" else "") - button = renderButton container, options - if /^(true|1)$/i.test options["data-show-count"] - renderSocialCount.call @, button, -> - callback container if callback + + callback = -> + func container if func + return + + button = do -> + a = createElement "a" + a.href = options.href + a.target = "_blank" + + if not /\.github\.com$/.test ".#{a.hostname}" + a.href = "#" + a.target = "_self" + else if /// + ^https?://( + (gist\.)?github\.com/[^/?#]+/[^/?#]+/archive/ | + github\.com/[^/?#]+/[^/?#]+/releases/download/ | + codeload\.github\.com/ + ) + ///.test a.href + a.target = "_top" + + a.className = "btn" + a.setAttribute "aria-label", ariaLabel if ariaLabel = options["aria-label"] + a.innerHTML = octicon options["data-icon"], if /^large$/i.test options["data-size"] then 16 else 14 + a.appendChild createTextNode " " + span = a.appendChild createElement "span" + span.appendChild createTextNode options["data-text"] or "" + container.appendChild a + + do -> + return callback() unless /^(true|1)$/i.test(options["data-show-count"]) and button.hostname is "github.com" + + match = button.pathname.replace(/^(?!\/)/, "/").match /// + ^/([^/?#]+) + (?: + /([^/?#]+) + (?: + /(?:(subscription)|(fork)|(issues)|([^/?#]+)) + )? + )? + (?:[/?#]|$) + /// + + return callback() unless match and not match[6] + + if match[2] + api = "repos/#{match[1]}/#{match[2]}" + if match[3] + property = "subscribers_count" + href = "watchers" + else if match[4] + property = "forks_count" + href = "network" + else if match[5] + property = "open_issues_count" + href = "issues" + else + property = "stargazers_count" + href = "stargazers" + else + api = "users/#{match[1]}" + href = property = "followers" + + fetch.call @, apiBaseURL + api, (error, json) -> + if !error + data = json[property] + + a = createElement "a" + a.href = json.html_url + "/" + href + a.target = "_blank" + a.className = "social-count" + a.setAttribute "aria-label", "#{data} #{property.replace(/_count$/, "").replace("_", " ")} on GitHub" + a.appendChild createElement "b" + a.appendChild createElement "i" + span = a.appendChild createElement "span" + span.appendChild document.createTextNode "#{data}".replace /\B(?=(\d{3})+(?!\d))/g, "," + button.parentNode.insertBefore a, button.nextSibling + callback() return - else - callback container if callback + return return export { diff --git a/src/fetch.coffee b/src/fetch.coffee index 907987e0..843fcaa2 100644 --- a/src/fetch.coffee +++ b/src/fetch.coffee @@ -27,7 +27,7 @@ fetch = (url, func) -> onEvent xhr, "abort", callback onEvent xhr, "error", callback onEvent xhr, "load", -> - callback xhr.status isnt 200, JSON.parse xhr.responseText + callback xhr.status isnt 200, try JSON.parse xhr.responseText return xhr.open "GET", url @@ -40,7 +40,7 @@ fetch = (url, func) -> callback json.meta.status isnt 200, json.data return - script = createElement "script" + script = contentWindow.document.createElement "script" script.async = true script.src = url + (if /\?/.test url then "&" else "?") + "callback=_" diff --git a/src/social-count.coffee b/src/social-count.coffee deleted file mode 100644 index 0203a715..00000000 --- a/src/social-count.coffee +++ /dev/null @@ -1,71 +0,0 @@ -import { - apiBaseURL -} from "./config" -import { - document - createElement - createTextNode -} from "./alias" -import { - fetch -} from "./fetch" - -render = (button, func) -> - callback = -> - func() if func - return - - return callback() unless button.hostname is "github.com" - - match = button.pathname.replace(/^(?!\/)/, "/").match /// - ^/([^/?#]+) - (?: - /([^/?#]+) - (?: - /(?:(subscription)|(fork)|(issues)|([^/?#]+)) - )? - )? - (?:[/?#]|$) - /// - - return callback() unless match and not match[6] - - if match[2] - api = "repos/#{match[1]}/#{match[2]}" - if match[3] - property = "subscribers_count" - href = "watchers" - else if match[4] - property = "forks_count" - href = "network" - else if match[5] - property = "open_issues_count" - href = "issues" - else - property = "stargazers_count" - href = "stargazers" - else - api = "users/#{match[1]}" - href = property = "followers" - - fetch.call @, apiBaseURL + api, (error, json) -> - if !error - data = json[property] - - a = createElement "a" - a.href = json.html_url + "/" + href - a.target = "_blank" - a.className = "social-count" - a.setAttribute "aria-label", "#{data} #{property.replace(/_count$/, "").replace("_", " ")} on GitHub" - a.appendChild createElement "b" - a.appendChild createElement "i" - span = a.appendChild createElement "span" - span.appendChild createTextNode "#{data}".replace /\B(?=(\d{3})+(?!\d))/g, "," - button.parentNode.insertBefore a, button.nextSibling - callback() - return - return - -export { - render -} diff --git a/src/style.coffee b/src/style.coffee deleted file mode 100644 index 284c6e56..00000000 --- a/src/style.coffee +++ /dev/null @@ -1,22 +0,0 @@ -import css from "../assets/css/buttons.css" -import { - createElement - createTextNode -} from "./alias" - -render = (root) -> - style = createElement "style" - style.type = "text/css" - root.appendChild style - - ### istanbul ignore if ### - if style.styleSheet - style.styleSheet.cssText = css - else - style.appendChild createTextNode css - - return - -export { - render -} diff --git a/test/unit/alias.spec.coffee b/test/unit/alias.spec.coffee index dbb9675b..89c73f56 100644 --- a/test/unit/alias.spec.coffee +++ b/test/unit/alias.spec.coffee @@ -28,8 +28,3 @@ describe "Alias", -> element = createElement 'div' expect element.nodeType .to.equal element.ELEMENT_NODE - - it "should create an alias for document.createTextNode()", -> - text = createTextNode 'hello world' - expect text.nodeType - .to.equal text.TEXT_NODE diff --git a/test/unit/button.spec.coffee b/test/unit/button.spec.coffee deleted file mode 100644 index ba988541..00000000 --- a/test/unit/button.spec.coffee +++ /dev/null @@ -1,101 +0,0 @@ -import { - render -} from "@/button" - -describe "Button", -> - root = document.body - - describe "render(root, config)", -> - beforeEach -> - sinon.stub root, "appendChild" - - afterEach -> - root.appendChild.restore() - - it "should append the button to root when the necessary config is given", -> - render root, {} - expect root.appendChild - .to.have.been.calledOnce - button = root.appendChild.args[0][0] - expect button - .to.have.property "className" - .and.equal "btn" - - it "should append the button with given href", -> - config = "href": "https://ntkme.github.com/" - render root, config - button = root.appendChild.args[0][0] - expect button.getAttribute "href" - .to.equal config.href - - it "should create a button with href # if domain is not github", -> - render root, "href": "https://twitter/ntkme" - button = root.appendChild.args[0][0] - expect button - .to.have.property "href" - .to.equal document.location.href + "#" - expect button - .to.have.property "target" - .to.equal "_self" - - it "should create an anchor with href # if url contains javascript", -> - for i, protocol of [ - "javascript:" - "JAVASCRIPT:" - "JavaScript:" - " javascript:" - " javascript:" - "\tjavascript:" - "\njavascript:" - "\rjavascript:" - "\fjavascript:" - ] - render root, "href": protocol - button = root.appendChild.args[i][0] - expect button - .to.have.property "href" - .to.equal document.location.href + "#" - expect button - .to.have.property "target" - .to.equal "_self" - - it "should create an anchor with target _top if url is a download link", -> - for i, url of [ - "https://github.com/ntkme/github-buttons/archive/master.zip" - "https://codeload.github.com/ntkme/github-buttons/zip/master" - "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip" - ] - render root, "href": url - button = root.appendChild.args[i][0] - expect button - .to.have.property "target" - .to.equal "_top" - - it "should append the button with the default icon", -> - render root, {} - button = root.appendChild.args[0][0] - expect " #{button.firstChild.getAttribute "class"} ".indexOf " octicon " - .to.be.at.least 0 - expect " #{button.firstChild.getAttribute "class"} ".indexOf " octicon-mark-github " - .to.be.at.least 0 - - it "should append the button with given icon", -> - config = "data-icon": "octicon-star" - render root, config - button = root.appendChild.args[0][0] - expect " #{button.firstChild.getAttribute "class"} ".indexOf " #{config["data-icon"]} " - .to.be.at.least 0 - - it "should append the button with given text", -> - config = "data-text": "Follow" - render root, config - button = root.appendChild.args[0][0] - expect button.lastChild.innerHTML - .to.equal config["data-text"] - - it "should append the button with given aria label", -> - config = "aria-label": "GitHub" - render root, config - button = root.appendChild.args[0][0] - expect button.getAttribute "aria-label" - .to.equal config["aria-label"] diff --git a/test/unit/content.spec.coffee b/test/unit/content.spec.coffee index 3b95ddb8..efea9957 100644 --- a/test/unit/content.spec.coffee +++ b/test/unit/content.spec.coffee @@ -1,8 +1,13 @@ import { render } from "@/content" +import { + setApiBaseURL +} from "@/config" + +setApiBaseURL "/base/test/fixtures/api.github.com/" -describe "Frame Content", -> +describe "Content", -> root = null beforeEach -> @@ -16,40 +21,262 @@ describe "Frame Content", -> it "should do nothing when no option given", -> render root - it "should call Style::render()", -> + it "should render stylesheet", -> render root, {} - expect root.getElementsByTagName("style").length - .to.equal 1 + expect root.querySelector "style" + .be.an.instanceof HTMLElement - it "should add widget to container.className", -> + it "should create a container with className widget", -> render root, {} - expect root.getElementsByTagName("div")[0].className - .to.equal "widget" + expect root.querySelector ".widget" + .be.an.instanceof HTMLElement + expect root.querySelector ".widget.large" + .be.null it "should add large to container.className when data-size is large", -> render root, "data-size": "large" - expect root.getElementsByTagName("div")[0].className - .to.equal "widget large" - - it "should call Button::render()", -> - render root, "href": "https://google.com/" - - it "should call SocialCount::render() when data-show-count is true", -> - render root, - "href": "https://google.com/" - "data-show-count": true - - it "should call callback function with created container", (done) -> - render root, {}, (el) -> - expect el.tagName - .to.equal "DIV" - done() - - it "should call callback function with created container when data-show-count is true", (done) -> - render root, - "href": "https://google.com/" - "data-show-count": true - , (el) -> - expect el.tagName - .to.equal "DIV" + expect root.querySelector ".widget.large" + .be.an.instanceof HTMLElement + + it "should append the button to container when the necessary config is given", -> + render root, {} + expect root.querySelector ".btn" + .be.an.instanceof HTMLElement + + it "should callback with container", (done) -> + render root, {}, (container) -> + expect container + .be.an.instanceof HTMLElement + done() + + it "should append the button with given href", -> + config = "href": "https://ntkme.github.com/" + render root, config + expect root.querySelector(".btn").getAttribute "href" + .to.equal config.href + + it "should create a button with href # if domain is not github", -> + render root, "href": "https://twitter/ntkme" + expect root.querySelector(".btn").href + .to.equal document.location.href + "#" + expect root.querySelector(".btn").target + .to.equal "_self" + + it "should create an anchor with href # if url contains javascript", -> + render root, "href": protocol for protocol in [ + "javascript:" + "JAVASCRIPT:" + "JavaScript:" + " javascript:" + " javascript:" + "\tjavascript:" + "\njavascript:" + "\rjavascript:" + "\fjavascript:" + ] + for btn in root.querySelectorAll ".btn" + expect btn.href + .to.equal document.location.href + "#" + expect btn.target + .to.equal "_self" + + it "should create an anchor with target _top if url is a download link", -> + render root, "href": url for url in [ + "https://github.com/ntkme/github-buttons/archive/master.zip" + "https://codeload.github.com/ntkme/github-buttons/zip/master" + "https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip" + ] + for btn in root.querySelectorAll ".btn" + expect btn + .to.have.property "target" + .to.equal "_top" + + it "should append the button with the default icon", -> + render root, {} + expect root.querySelector(".btn").querySelector(".octicon.octicon-mark-github") + .be.an.instanceof SVGElement + + it "should append the button with given icon", -> + render root, "data-icon": "octicon-star" + expect root.querySelector(".btn").querySelector(".octicon.octicon-star") + .be.an.instanceof SVGElement + + it "should append the button with the default if given icon is invalid", -> + render root, "data-icon": "null" + expect root.querySelector(".btn").querySelector(".octicon.octicon-mark-github") + .be.an.instanceof SVGElement + + it "should append the button with given text", -> + config = "data-text": "Follow" + render root, config + expect root.querySelector(".btn").lastChild.innerHTML + .to.equal config["data-text"] + + it "should append the button with given aria label", -> + config = "aria-label": "GitHub" + render root, config + expect root.querySelector(".btn").getAttribute "aria-label" + .to.equal config["aria-label"] + + + it "should append the count when a known button type is given", (done) -> + config = + "href": "https://github.com/ntkme" + "data-show-count": "true" + render root, config, (container) -> + expect container.querySelector(".social-count") + .be.an.instanceof HTMLElement + done() + + it "should append the count for follow button", (done) -> + config = + "href": "https://github.com/ntkme" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/followers" + expect count.lastChild.innerHTML + .to.equal "58" + expect count.getAttribute "aria-label" + .to.equal "58 followers on GitHub" + done() + + it "should append the count for watch button", (done) -> + config = + "href": "https://github.com/ntkme/github-buttons/subscription" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/github-buttons/watchers" + expect count.lastChild.innerHTML + .to.equal "18" + expect count.getAttribute "aria-label" + .to.equal "18 subscribers on GitHub" + done() + + it "should append the count for star button", (done) -> + config = + "href": "https://github.com/ntkme/github-buttons" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/github-buttons/stargazers" + expect count.lastChild.innerHTML + .to.equal "397" + expect count.getAttribute "aria-label" + .to.equal "397 stargazers on GitHub" + done() + + it "should append the count for fork button", (done) -> + config = + "href": "https://github.com/ntkme/github-buttons/fork" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/github-buttons/network" + expect count.lastChild.innerHTML + .to.equal "60" + expect count.getAttribute "aria-label" + .to.equal "60 forks on GitHub" + done() + + it "should append the count for issue button", (done) -> + config = + "href": "https://github.com/ntkme/github-buttons/issues" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/github-buttons/issues" + expect count.lastChild.innerHTML + .to.equal "1" + expect count.getAttribute "aria-label" + .to.equal "1 open issues on GitHub" + done() + + it "should append the count for issue button when it links to new issue", (done) -> + config = + "href": "https://github.com/ntkme/github-buttons/issues/new" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/github-buttons/issues" + expect count.lastChild.innerHTML + .to.equal "1" + expect count.getAttribute "aria-label" + .to.equal "1 open issues on GitHub" + done() + + it "should append the count for button whose link has a tailing slash", (done) -> + config = + "href": "https://github.com/ntkme/" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/followers" + done() + + it "should append the count for button whose link has a query", (done) -> + config = + "href": "https://github.com/ntkme?tab=repositories" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/followers" + done() + + it "should append the count for button whose link has a hash", (done) -> + config = + "href": "https://github.com/ntkme#github-buttons" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/followers" + done() + + it "should append the count for button whose link has both a tailing slash and a query", (done) -> + config = + "href": "https://github.com/ntkme/?tab=repositories" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/followers" + done() + + it "should append the count for button whose link has both a tailing slash and a hash", (done) -> + config = + "href": "https://github.com/ntkme/#github-buttons" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/followers" + done() + + it "should append the count for button whose link has a tailing slash, a query, and a hash", (done) -> + config = + "href": "https://github.com/ntkme/?tab=repositories#github-buttons" + "data-show-count": "true" + render root, config, (container) -> + count = container.querySelector(".social-count") + expect count.href + .to.equal "https://github.com/ntkme/followers" + done() + + it "should not append the count for unknown button type", (done) -> + config = + "href": "https://github.com/" + "data-show-count": "true" + render root, config, (container) -> + expect container.querySelector(".social-count") + .to.be.null done() diff --git a/test/unit/fetch.spec.coffee b/test/unit/fetch.spec.coffee new file mode 100644 index 00000000..fadec5e8 --- /dev/null +++ b/test/unit/fetch.spec.coffee @@ -0,0 +1,46 @@ +import { + fetch +} from "@/fetch" + +describe "Fetch", -> + beforeEach -> + sinon.spy JSON, "parse" + + afterEach -> + JSON.parse.restore() + + describe "fetch(url, func)", -> + it "should fetch url as json", (done) -> + fetch "/base/test/fixtures/api.github.com/repos/ntkme/github-buttons", (error, data) -> + expect !!error + .to.be.false + done() + expect data.owner.login + .to.equal "ntkme" + done() + + it "should handle error", (done) -> + fetch "/404", (error, data) -> + expect !!error + .to.be.true + done() + + it "should combine identical pending requests", -> + Promise.all([ + new Promise (resolve, reject) -> + fetch "/base/test/fixtures/api.github.com/users/ntkme", (error, data) -> + expect data.login + .to.equal "ntkme" + resolve() + return + , + new Promise (resolve, reject) -> + fetch "/base/test/fixtures/api.github.com/users/ntkme", (error, data) -> + expect data.login + .to.equal "ntkme" + resolve() + return + ]).then -> + expect JSON.parse + .to.be.calledOnce + diff --git a/test/unit/jsonp.spec.coffee b/test/unit/jsonp.spec.coffee index 9c26e1a5..81ff467f 100644 --- a/test/unit/jsonp.spec.coffee +++ b/test/unit/jsonp.spec.coffee @@ -3,7 +3,7 @@ import { } from "@/fetch" describe "JSON-P", -> - describe "fetch(url, func, hook)", -> + describe "fetch(url, func)", -> jsonp = fetch XMLHttpRequest = window.XMLHttpRequest @@ -88,4 +88,3 @@ describe "JSON-P", -> done() window._ response - diff --git a/test/unit/social-count.spec.coffee b/test/unit/social-count.spec.coffee deleted file mode 100644 index aaa80ad1..00000000 --- a/test/unit/social-count.spec.coffee +++ /dev/null @@ -1,145 +0,0 @@ -import { - setApiBaseURL -} from "@/config" -import { - render -} from "@/social-count" - -setApiBaseURL "/base/test/fixtures/api.github.com/" - -describe "Social Sount", -> - describe "render(button)", -> - button = null - head = document.getElementsByTagName("head")[0] - - beforeEach -> - button = document.body.appendChild document.createElement "a" - - afterEach -> - button.parentNode.removeChild button - - testRenderCount = (url, func) -> - sinon.stub document.body, "insertBefore" - .callsFake -> - document.body.insertBefore.restore() - func.apply null, arguments - return - button.href = url - render button - - it "should append the count when a known button type is given", (done) -> - testRenderCount "https://github.com/ntkme", (count) -> - expect count - .to.have.property "className" - .and.equal "social-count" - done() - - it "should append the count for follow button", (done) -> - testRenderCount "https://github.com/ntkme", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/followers" - expect count.lastChild.innerHTML - .to.equal "58" - expect count.getAttribute "aria-label" - .to.equal "58 followers on GitHub" - done() - - it "should append the count for watch button", (done) -> - testRenderCount "https://github.com/ntkme/github-buttons/subscription", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/github-buttons/watchers" - expect count.lastChild.innerHTML - .to.equal "18" - expect count.getAttribute "aria-label" - .to.equal "18 subscribers on GitHub" - done() - - it "should append the count for star button", (done) -> - testRenderCount "https://github.com/ntkme/github-buttons", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/github-buttons/stargazers" - expect count.lastChild.innerHTML - .to.equal "397" - expect count.getAttribute "aria-label" - .to.equal "397 stargazers on GitHub" - done() - - it "should append the count for fork button", (done) -> - testRenderCount "https://github.com/ntkme/github-buttons/fork", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/github-buttons/network" - expect count.lastChild.innerHTML - .to.equal "60" - expect count.getAttribute "aria-label" - .to.equal "60 forks on GitHub" - done() - - it "should append the count for issue button", (done) -> - testRenderCount "https://github.com/ntkme/github-buttons/issues", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/github-buttons/issues" - expect count.lastChild.innerHTML - .to.equal "1" - expect count.getAttribute "aria-label" - .to.equal "1 open issues on GitHub" - done() - - it "should append the count for issue button when it links to new issue", (done) -> - testRenderCount "https://github.com/ntkme/github-buttons/issues/new", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/github-buttons/issues" - expect count.lastChild.innerHTML - .to.equal "1" - expect count.getAttribute "aria-label" - .to.equal "1 open issues on GitHub" - done() - - it "should append the count for button whose link has a tailing slash", (done) -> - testRenderCount "https://github.com/ntkme/", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/followers" - done() - - it "should append the count for button whose link has a query", (done) -> - testRenderCount "https://github.com/ntkme?tab=repositories", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/followers" - done() - - it "should append the count for button whose link has a hash", (done) -> - testRenderCount "https://github.com/ntkme#github-buttons", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/followers" - done() - - it "should append the count for button whose link has both a tailing slash and a query", (done) -> - testRenderCount "https://github.com/ntkme/?tab=repositories", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/followers" - done() - - it "should append the count for button whose link has both a tailing slash and a hash", (done) -> - testRenderCount "https://github.com/ntkme/#github-buttons", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/followers" - done() - - it "should append the count for button whose link has a tailing slash, a query, and a hash", (done) -> - testRenderCount "https://github.com/ntkme/?tab=repositories#github-buttons", (count) -> - expect count.href - .to.equal "https://github.com/ntkme/followers" - done() - - it "should not append the count for unknown button type", -> - sinon.stub document.body, "insertBefore" - - button.href = "https://twitter.com/" - render button - button.href = "https://github.com/" - render button - button.href = "https://github.com/ntkme/github-buttons/test" - render button - expect document.body.insertBefore - .to.have.not.been.called - - document.body.insertBefore.restore() From 507a02062405bd2a46cc803ccacb1fc4c3b61d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 14 Jul 2018 22:08:21 -0700 Subject: [PATCH 0077/1193] Remove unnecessary return --- assets/js/app.js | 2 +- assets/js/app.min.js | 2 +- dist/buttons.common.js | 2 +- dist/buttons.esm.js | 2 +- dist/buttons.js | 2 +- dist/buttons.min.js | 2 +- src/container.coffee | 1 + 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 6f12bd84..6849135d 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -409,7 +409,7 @@ set(iframe, size); }); iframe.src = baseURL + "buttons.html#" + (stringify(options)); - return targetNode.parentNode.replaceChild(iframe, targetNode); + targetNode.parentNode.replaceChild(iframe, targetNode); }); }); document.body.appendChild(iframe); diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 2dceefe3..512d4d7b 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var u,s,t,e,o,d=window.document,h=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),p=function(t){return d.createElement(t)};s="github-button",u=(/^http:/.test(d.location)?"http":"https")+"://buttons.github.io/",t=function(t){u=t},e="currentScript",o=!{}.hasOwnProperty.call(d,e)&&d[e]&&delete d[e]&&d[e]?d[e].src:void 0;var f,g,n;f=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},g=function(e,o,n){var r;f(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(d.readyState)||!/g/.test(d.readyState)&&!d.documentElement.doScroll?setTimeout(t):d.addEventListener?(o=0,g(d,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),g(window,"load",e)):(e=function(){/m/.test(d.readyState)&&(d.detachEvent("onreadystatechange",e),t())},d.attachEvent("onreadystatechange",e))};var b,m,w,v,y,i,a,C,x,c,k="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n",l={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),l.hasOwnProperty(t)||(t="mark-github"),'"},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,f(l,"abort",n),f(l,"error",n),f(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",f(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(t,o,e){var a,s,n,c,r,l,i,u,d;o&&(l=t.ownerDocument,r=function(t){return l.createTextNode(t)},(i=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=k:i.appendChild(r(k)),(n=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(n)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(r(" ")),u.appendChild(c("span")).appendChild(r(o["data-text"]||"")),a=n.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),m.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},y=function(){var t,e,o,n,r,i,a;if(e=[],d.querySelectorAll)e=d.querySelectorAll("a."+s);else for(o=0,r=(a=d.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){d.activeElement!==this.$refs.user&&d.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=p("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),l.hasOwnProperty(t)||(t="mark-github"),'"},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,f(l,"abort",n),f(l,"error",n),f(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",f(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(t,o,e){var a,s,n,c,r,l,i,u,d;o&&(l=t.ownerDocument,r=function(t){return l.createTextNode(t)},(i=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=k:i.appendChild(r(k)),(n=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(n)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(r(" ")),u.appendChild(c("span")).appendChild(r(o["data-text"]||"")),a=n.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),m.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},y=function(){var t,e,o,n,r,i,a;if(e=[],d.querySelectorAll)e=d.querySelectorAll("a."+s);else for(o=0,r=(a=d.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){d.activeElement!==this.$refs.user&&d.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=p("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},v={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=v[e]||(v[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete v[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,n,c,r,d,a,s,h;o&&(d=e.ownerDocument,r=function(e){return d.createTextNode(e)},(a=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=F:a.appendChild(r(F)),(n=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(n)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(r(" ")),s.appendChild(c("span")).appendChild(r(o["data-text"]||"")),i=n.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},v={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=v[e]||(v[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete v[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,n,c,r,d,a,s,h;o&&(d=e.ownerDocument,r=function(e){return d.createTextNode(e)},(a=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=F:a.appendChild(r(F)),(n=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(n)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(r(" ")),s.appendChild(c("span")).appendChild(r(o["data-text"]||"")),i=n.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o return iframe.src = "#{baseURL}buttons.html##{stringifyQueryString options}" targetNode.parentNode.replaceChild iframe, targetNode + return return document.body.appendChild iframe return From f8471538898fce8089f4e240904c0cb2ba36e007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 14 Jul 2018 23:42:31 -0700 Subject: [PATCH 0078/1193] Avoid reflow for count in shadow DOM mode --- assets/js/app.js | 5 +++-- assets/js/app.min.js | 2 +- dist/buttons.common.js | 5 +++-- dist/buttons.esm.js | 5 +++-- dist/buttons.js | 5 +++-- dist/buttons.min.js | 2 +- src/container.coffee | 5 +++-- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 6849135d..ae4062ac 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -379,8 +379,9 @@ root = host.attachShadow({ mode: "closed" }); - render(root, options); - targetNode.parentNode.replaceChild(host, targetNode); + render(root, options, function() { + targetNode.parentNode.replaceChild(host, targetNode); + }); } else { iframe = createElement("iframe"); ref = { diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 512d4d7b..f98c1fef 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var u,s,t,e,o,d=window.document,h=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),p=function(t){return d.createElement(t)};s="github-button",u=(/^http:/.test(d.location)?"http":"https")+"://buttons.github.io/",t=function(t){u=t},e="currentScript",o=!{}.hasOwnProperty.call(d,e)&&d[e]&&delete d[e]&&d[e]?d[e].src:void 0;var f,g,n;f=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},g=function(e,o,n){var r;f(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(d.readyState)||!/g/.test(d.readyState)&&!d.documentElement.doScroll?setTimeout(t):d.addEventListener?(o=0,g(d,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),g(window,"load",e)):(e=function(){/m/.test(d.readyState)&&(d.detachEvent("onreadystatechange",e),t())},d.attachEvent("onreadystatechange",e))};var b,m,w,v,y,i,a,C,x,c,k="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n",l={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),l.hasOwnProperty(t)||(t="mark-github"),'"},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,f(l,"abort",n),f(l,"error",n),f(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",f(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(t,o,e){var a,s,n,c,r,l,i,u,d;o&&(l=t.ownerDocument,r=function(t){return l.createTextNode(t)},(i=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=k:i.appendChild(r(k)),(n=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(n)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(r(" ")),u.appendChild(c("span")).appendChild(r(o["data-text"]||"")),a=n.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),m.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},y=function(){var t,e,o,n,r,i,a;if(e=[],d.querySelectorAll)e=d.querySelectorAll("a."+s);else for(o=0,r=(a=d.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){d.activeElement!==this.$refs.user&&d.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=p("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),l.hasOwnProperty(t)||(t="mark-github"),'"},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,f(l,"abort",n),f(l,"error",n),f(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",f(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(t,o,e){var a,s,n,c,r,l,i,u,d;o&&(l=t.ownerDocument,r=function(t){return l.createTextNode(t)},(i=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=k:i.appendChild(r(k)),(n=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(n)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(r(" ")),u.appendChild(c("span")).appendChild(r(o["data-text"]||"")),a=n.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),m.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},y=function(){var t,e,o,n,r,i,a;if(e=[],d.querySelectorAll)e=d.querySelectorAll("a."+s);else for(o=0,r=(a=d.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){d.activeElement!==this.$refs.user&&d.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=p("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},v={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=v[e]||(v[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete v[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,n,c,r,d,a,s,h;o&&(d=e.ownerDocument,r=function(e){return d.createTextNode(e)},(a=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=F:a.appendChild(r(F)),(n=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(n)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(r(" ")),s.appendChild(c("span")).appendChild(r(o["data-text"]||"")),i=n.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},v={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=v[e]||(v[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete v[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,n,c,r,d,a,s,h;o&&(d=e.ownerDocument,r=function(e){return d.createTextNode(e)},(a=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=F:a.appendChild(r(F)),(n=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(n)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(r(" ")),s.appendChild(c("span")).appendChild(r(o["data-text"]||"")),i=n.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o host = createElement "span" host.title = title if title = options.title root = host.attachShadow mode: "closed" - renderContent root, options - targetNode.parentNode.replaceChild host, targetNode + renderContent root, options, -> + targetNode.parentNode.replaceChild host, targetNode + return else iframe = createElement "iframe" iframe.setAttribute name, value for name, value of { From 6f1a9b6055ccfc48adddb4fdada007e5d63e5496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 15 Jul 2018 11:42:28 -0700 Subject: [PATCH 0079/1193] Make variable name more clear --- assets/js/app.js | 14 ++++---- assets/js/app.min.js | 2 +- dist/buttons.common.js | 14 ++++---- dist/buttons.esm.js | 14 ++++---- dist/buttons.js | 14 ++++---- dist/buttons.min.js | 2 +- src/container.coffee | 4 +-- src/content.coffee | 8 ++--- test/unit/content.spec.coffee | 68 +++++++++++++++++------------------ 9 files changed, 70 insertions(+), 70 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index ae4062ac..8f859e6a 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -206,7 +206,7 @@ var render; render = function(root, options, func) { - var button, callback, container, createElement, createTextNode, document, style; + var button, callback, createElement, createTextNode, document, style, widget; if (!options) { return; } @@ -227,11 +227,11 @@ } else { style.appendChild(createTextNode(css)); } - container = root.appendChild(createElement("div")); - container.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); + widget = root.appendChild(createElement("div")); + widget.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); callback = function() { if (func) { - func(container); + func(widget); } }; button = (function() { @@ -253,7 +253,7 @@ a.appendChild(createTextNode(" ")); span = a.appendChild(createElement("span")); span.appendChild(createTextNode(options["data-text"] || "")); - return container.appendChild(a); + return widget.appendChild(a); })(); (function() { var api, href, match, property; @@ -402,9 +402,9 @@ onceEvent(iframe, "load", function() { var contentWindow; contentWindow = iframe.contentWindow; - render.call(contentWindow, contentWindow.document.body, options, function(container) { + render.call(contentWindow, contentWindow.document.body, options, function(widget) { var size; - size = get(container); + size = get(widget); iframe.parentNode.removeChild(iframe); onceEvent(iframe, "load", function() { set(iframe, size); diff --git a/assets/js/app.min.js b/assets/js/app.min.js index f98c1fef..f17faca1 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var u,s,t,e,o,d=window.document,h=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),p=function(t){return d.createElement(t)};s="github-button",u=(/^http:/.test(d.location)?"http":"https")+"://buttons.github.io/",t=function(t){u=t},e="currentScript",o=!{}.hasOwnProperty.call(d,e)&&d[e]&&delete d[e]&&d[e]?d[e].src:void 0;var f,g,n;f=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},g=function(e,o,n){var r;f(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(d.readyState)||!/g/.test(d.readyState)&&!d.documentElement.doScroll?setTimeout(t):d.addEventListener?(o=0,g(d,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),g(window,"load",e)):(e=function(){/m/.test(d.readyState)&&(d.detachEvent("onreadystatechange",e),t())},d.attachEvent("onreadystatechange",e))};var b,m,w,v,y,i,a,C,x,c,k="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n",l={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),l.hasOwnProperty(t)||(t="mark-github"),'"},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,f(l,"abort",n),f(l,"error",n),f(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",f(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(t,o,e){var a,s,n,c,r,l,i,u,d;o&&(l=t.ownerDocument,r=function(t){return l.createTextNode(t)},(i=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(i),i.styleSheet?i.styleSheet.cssText=k:i.appendChild(r(k)),(n=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(n)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(r(" ")),u.appendChild(c("span")).appendChild(r(o["data-text"]||"")),a=n.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),m.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},y=function(){var t,e,o,n,r,i,a;if(e=[],d.querySelectorAll)e=d.querySelectorAll("a."+s);else for(o=0,r=(a=d.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){d.activeElement!==this.$refs.user&&d.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=p("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),l.hasOwnProperty(t)||(t="mark-github"),'"},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,f(l,"abort",n),f(l,"error",n),f(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",f(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=k:r.appendChild(n(k)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),m.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},y=function(){var t,e,o,n,r,i,a;if(e=[],d.querySelectorAll)e=d.querySelectorAll("a."+s);else for(o=0,r=(a=d.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){d.activeElement!==this.$refs.user&&d.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=p("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},v={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=v[e]||(v[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete v[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,n,c,r,d,a,s,h;o&&(d=e.ownerDocument,r=function(e){return d.createTextNode(e)},(a=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(a),a.styleSheet?a.styleSheet.cssText=F:a.appendChild(r(F)),(n=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(n)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(r(" ")),s.appendChild(c("span")).appendChild(r(o["data-text"]||"")),i=n.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},v={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=v[e]||(v[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete v[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=F:r.appendChild(n(F)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o iframe.title = title if title = options.title onceEvent iframe, "load", -> contentWindow = iframe.contentWindow - renderContent.call contentWindow, contentWindow.document.body, options, (container) -> - size = getSize container + renderContent.call contentWindow, contentWindow.document.body, options, (widget) -> + size = getSize widget iframe.parentNode.removeChild iframe onceEvent iframe, "load", -> setSize iframe, size diff --git a/src/content.coffee b/src/content.coffee index 7f2c2feb..c5c6b5d2 100644 --- a/src/content.coffee +++ b/src/content.coffee @@ -25,11 +25,11 @@ render = (root, options, func) -> else style.appendChild createTextNode css - container = root.appendChild createElement "div" - container.className = "widget" + (if /^large$/i.test options["data-size"] then " large" else "") + widget = root.appendChild createElement "div" + widget.className = "widget" + (if /^large$/i.test options["data-size"] then " large" else "") callback = -> - func container if func + func widget if func return button = do -> @@ -55,7 +55,7 @@ render = (root, options, func) -> a.appendChild createTextNode " " span = a.appendChild createElement "span" span.appendChild createTextNode options["data-text"] or "" - container.appendChild a + widget.appendChild a do -> return callback() unless /^(true|1)$/i.test(options["data-show-count"]) and button.hostname is "github.com" diff --git a/test/unit/content.spec.coffee b/test/unit/content.spec.coffee index efea9957..a6b759c7 100644 --- a/test/unit/content.spec.coffee +++ b/test/unit/content.spec.coffee @@ -26,26 +26,26 @@ describe "Content", -> expect root.querySelector "style" .be.an.instanceof HTMLElement - it "should create a container with className widget", -> + it "should create a widget with className widget", -> render root, {} expect root.querySelector ".widget" .be.an.instanceof HTMLElement expect root.querySelector ".widget.large" .be.null - it "should add large to container.className when data-size is large", -> + it "should add large to widget.className when data-size is large", -> render root, "data-size": "large" expect root.querySelector ".widget.large" .be.an.instanceof HTMLElement - it "should append the button to container when the necessary config is given", -> + it "should append the button to widget when the necessary config is given", -> render root, {} expect root.querySelector ".btn" .be.an.instanceof HTMLElement - it "should callback with container", (done) -> - render root, {}, (container) -> - expect container + it "should callback with widget", (done) -> + render root, {}, (widget) -> + expect widget .be.an.instanceof HTMLElement done() @@ -123,8 +123,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme" "data-show-count": "true" - render root, config, (container) -> - expect container.querySelector(".social-count") + render root, config, (widget) -> + expect widget.querySelector(".social-count") .be.an.instanceof HTMLElement done() @@ -132,8 +132,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/followers" expect count.lastChild.innerHTML @@ -146,8 +146,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/github-buttons/subscription" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/github-buttons/watchers" expect count.lastChild.innerHTML @@ -160,8 +160,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/github-buttons" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/github-buttons/stargazers" expect count.lastChild.innerHTML @@ -174,8 +174,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/github-buttons/fork" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/github-buttons/network" expect count.lastChild.innerHTML @@ -188,8 +188,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/github-buttons/issues" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/github-buttons/issues" expect count.lastChild.innerHTML @@ -202,8 +202,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/github-buttons/issues/new" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/github-buttons/issues" expect count.lastChild.innerHTML @@ -216,8 +216,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/followers" done() @@ -226,8 +226,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme?tab=repositories" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/followers" done() @@ -236,8 +236,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme#github-buttons" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/followers" done() @@ -246,8 +246,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/?tab=repositories" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/followers" done() @@ -256,8 +256,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/#github-buttons" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/followers" done() @@ -266,8 +266,8 @@ describe "Content", -> config = "href": "https://github.com/ntkme/?tab=repositories#github-buttons" "data-show-count": "true" - render root, config, (container) -> - count = container.querySelector(".social-count") + render root, config, (widget) -> + count = widget.querySelector(".social-count") expect count.href .to.equal "https://github.com/ntkme/followers" done() @@ -276,7 +276,7 @@ describe "Content", -> config = "href": "https://github.com/" "data-show-count": "true" - render root, config, (container) -> - expect container.querySelector(".social-count") + render root, config, (widget) -> + expect widget.querySelector(".social-count") .to.be.null done() From e5f7eb6ab925adfc127fc65b76cee598adc11cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 15 Jul 2018 12:12:10 -0700 Subject: [PATCH 0080/1193] Set iframe title right before replace target node --- assets/js/app.js | 13 ++++++------- assets/js/app.min.js | 2 +- dist/buttons.common.js | 13 ++++++------- dist/buttons.esm.js | 13 ++++++------- dist/buttons.js | 13 ++++++------- dist/buttons.min.js | 2 +- src/container.coffee | 5 ++--- 7 files changed, 28 insertions(+), 33 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 8f859e6a..e2aed3cd 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -364,7 +364,7 @@ /* istanbul ignore next */ render$2 = function(targetNode, options) { - var HTMLElement, host, iframe, name, ref, root, title, value; + var HTMLElement, host, iframe, name, ref, title, value; if (targetNode == null) { return render$1(); } @@ -376,10 +376,9 @@ if (title = options.title) { host.title = title; } - root = host.attachShadow({ + render(host.attachShadow({ mode: "closed" - }); - render(root, options, function() { + }), options, function() { targetNode.parentNode.replaceChild(host, targetNode); }); } else { @@ -396,9 +395,6 @@ set(iframe, [1, 0]); iframe.style.border = "none"; iframe.src = "javascript:0"; - if (title = options.title) { - iframe.title = title; - } onceEvent(iframe, "load", function() { var contentWindow; contentWindow = iframe.contentWindow; @@ -410,6 +406,9 @@ set(iframe, size); }); iframe.src = baseURL + "buttons.html#" + (stringify(options)); + if (title = options.title) { + iframe.title = title; + } targetNode.parentNode.replaceChild(iframe, targetNode); }); }); diff --git a/assets/js/app.min.js b/assets/js/app.min.js index f17faca1..143fc5be 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var u,s,t,e,o,d=window.document,h=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),p=function(t){return d.createElement(t)};s="github-button",u=(/^http:/.test(d.location)?"http":"https")+"://buttons.github.io/",t=function(t){u=t},e="currentScript",o=!{}.hasOwnProperty.call(d,e)&&d[e]&&delete d[e]&&d[e]?d[e].src:void 0;var f,g,n;f=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},g=function(e,o,n){var r;f(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(d.readyState)||!/g/.test(d.readyState)&&!d.documentElement.doScroll?setTimeout(t):d.addEventListener?(o=0,g(d,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),g(window,"load",e)):(e=function(){/m/.test(d.readyState)&&(d.detachEvent("onreadystatechange",e),t())},d.attachEvent("onreadystatechange",e))};var b,m,w,v,y,i,a,C,x,c,k="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n",l={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),l.hasOwnProperty(t)||(t="mark-github"),'"},w={},m=function(t,e){var o,n,r,i,a,s,c,l;1<(s=w[t]||(w[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete w[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,f(l,"abort",n),f(l,"error",n),f(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",f(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=k:r.appendChild(n(k)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),m.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},y=function(){var t,e,o,n,r,i,a;if(e=[],d.querySelectorAll)e=d.querySelectorAll("a."+s);else for(o=0,r=(a=d.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){d.activeElement!==this.$refs.user&&d.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=p("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(t)||(t="mark-github"),'"},m={},b=function(t,e){var o,n,r,i,a,s,c,l;1<(s=m[t]||(m[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete m[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=x:r.appendChild(n(x)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),b.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},v={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=v[e]||(v[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete v[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=F:r.appendChild(n(F)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},m={},b=function(e,t){var o,n,r,a,i,l,c,d;1<(l=m[e]||(m[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete m[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,u(d,"abort",n),u(d,"error",n),u(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",u(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&u(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=F:r.appendChild(n(F)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),b.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},w=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o if (HTMLElement = window.HTMLElement) and HTMLElement::attachShadow and !HTMLElement::attachShadow:: host = createElement "span" host.title = title if title = options.title - root = host.attachShadow mode: "closed" - renderContent root, options, -> + renderContent (host.attachShadow mode: "closed"), options, -> targetNode.parentNode.replaceChild host, targetNode return else @@ -47,7 +46,6 @@ render = (targetNode, options) -> setSize iframe, [1, 0] iframe.style.border = "none" iframe.src = "javascript:0" - iframe.title = title if title = options.title onceEvent iframe, "load", -> contentWindow = iframe.contentWindow renderContent.call contentWindow, contentWindow.document.body, options, (widget) -> @@ -57,6 +55,7 @@ render = (targetNode, options) -> setSize iframe, size return iframe.src = "#{baseURL}buttons.html##{stringifyQueryString options}" + iframe.title = title if title = options.title targetNode.parentNode.replaceChild iframe, targetNode return return From 8b41a793e4e73636cf4d2286ab6facba255b252b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 15 Jul 2018 13:18:41 -0700 Subject: [PATCH 0081/1193] Improve text alignment --- assets/css/buttons.css | 2 +- assets/js/app.js | 2 +- assets/js/app.min.js | 2 +- assets/scss/buttons.scss | 11 ++--------- dist/buttons.common.js | 2 +- dist/buttons.esm.js | 2 +- dist/buttons.js | 2 +- dist/buttons.min.js | 2 +- 8 files changed, 9 insertions(+), 16 deletions(-) diff --git a/assets/css/buttons.css b/assets/css/buttons.css index d15453d2..fe103cf5 100644 --- a/assets/css/buttons.css +++ b/assets/css/buttons.css @@ -1 +1 @@ -body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px} +body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px} diff --git a/assets/js/app.js b/assets/js/app.js index e2aed3cd..faf75a8f 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -126,7 +126,7 @@ return options; }; - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 143fc5be..cd1c477d 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)};s="github-button",l=(/^http:/.test(u.location)?"http":"https")+"://buttons.github.io/",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,n;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var g,b,m,w,v,i,a,y,C,c,x="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n",k={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(t)||(t="mark-github"),'"},m={},b=function(t,e){var o,n,r,i,a,s,c,l;1<(s=m[t]||(m[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete m[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=x:r.appendChild(n(x)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),b.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(t)||(t="mark-github"),'"},m={},b=function(t,e){var o,n,r,i,a,s,c,l;1<(s=m[t]||(m[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete m[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=x:r.appendChild(n(x)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),b.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0"},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index d94b4b74..547378e4 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -79,7 +79,7 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; -var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; +var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.js b/dist/buttons.js index 0ec9c64e..ae7fb132 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -141,7 +141,7 @@ return options; }; - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.min.js b/dist/buttons.min.js index ee769da2..d2ed9e01 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var d,l,e,t,o,s=window.document,h=window.encodeURIComponent,c=window.decodeURIComponent,r=window.Math,p=function(e){return s.createElement(e)};l="github-button",d=(/^http:/.test(s.location)?"http":"https")+"://buttons.github.io/",e=function(e){d=e},t="currentScript",o=!{}.hasOwnProperty.call(s,t)&&s[t]&&delete s[t]&&s[t]?s[t].src:void 0;var u,f,n;u=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},f=function(t,o,n){var r;u(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},n=function(e){var t,o;/m/.test(s.readyState)||!/g/.test(s.readyState)&&!s.documentElement.doScroll?setTimeout(e):s.addEventListener?(o=0,f(s,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),f(window,"load",t)):(t=function(){/m/.test(s.readyState)&&(s.detachEvent("onreadystatechange",t),e())},s.attachEvent("onreadystatechange",t))};var g,b,m,v,w,a,i,x,C,y,F="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn span,.social-count span{vertical-align:1px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn span,.large .social-count span{vertical-align:0}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:16px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n",k={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},m={},b=function(e,t){var o,n,r,a,i,l,c,d;1<(l=m[e]||(m[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete m[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,u(d,"abort",n),u(d,"error",n),u(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",u(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&u(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=F:r.appendChild(n(F)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),b.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},w=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},m={},b=function(e,t){var o,n,r,a,i,l,c,d;1<(l=m[e]||(m[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete m[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,u(d,"abort",n),u(d,"error",n),u(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",u(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&u(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=F:r.appendChild(n(F)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),b.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},w=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o Date: Sun, 15 Jul 2018 13:41:07 -0700 Subject: [PATCH 0082/1193] Fix clickable area of triangle --- assets/css/buttons.css | 2 +- assets/js/app.js | 2 +- assets/js/app.min.js | 2 +- assets/scss/buttons.scss | 5 +++-- dist/buttons.common.js | 2 +- dist/buttons.esm.js | 2 +- dist/buttons.js | 2 +- dist/buttons.min.js | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/assets/css/buttons.css b/assets/css/buttons.css index fe103cf5..fc30a876 100644 --- a/assets/css/buttons.css +++ b/assets/css/buttons.css @@ -1 +1 @@ -body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px} +body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0} diff --git a/assets/js/app.js b/assets/js/app.js index faf75a8f..bb448f01 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -126,7 +126,7 @@ return options; }; - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index cd1c477d..2d586259 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)};s="github-button",l=(/^http:/.test(u.location)?"http":"https")+"://buttons.github.io/",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,n;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var g,b,m,w,v,i,a,y,C,c,x="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n",k={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(t)||(t="mark-github"),'"},m={},b=function(t,e){var o,n,r,i,a,s,c,l;1<(s=m[t]||(m[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete m[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=x:r.appendChild(n(x)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),b.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(t)||(t="mark-github"),'"},m={},b=function(t,e){var o,n,r,i,a,s,c,l;1<(s=m[t]||(m[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete m[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=C:r.appendChild(n(C)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),b.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0"},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index 547378e4..2f7aa4ab 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -79,7 +79,7 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; -var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; +var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.js b/dist/buttons.js index ae7fb132..dc09b10b 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -141,7 +141,7 @@ return options; }; - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.min.js b/dist/buttons.min.js index d2ed9e01..7dc856da 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var d,l,e,t,o,s=window.document,h=window.encodeURIComponent,c=window.decodeURIComponent,r=window.Math,p=function(e){return s.createElement(e)};l="github-button",d=(/^http:/.test(s.location)?"http":"https")+"://buttons.github.io/",e=function(e){d=e},t="currentScript",o=!{}.hasOwnProperty.call(s,t)&&s[t]&&delete s[t]&&s[t]?s[t].src:void 0;var u,f,n;u=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},f=function(t,o,n){var r;u(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},n=function(e){var t,o;/m/.test(s.readyState)||!/g/.test(s.readyState)&&!s.documentElement.doScroll?setTimeout(e):s.addEventListener?(o=0,f(s,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),f(window,"load",t)):(t=function(){/m/.test(s.readyState)&&(s.detachEvent("onreadystatechange",t),e())},s.attachEvent("onreadystatechange",t))};var g,b,m,v,w,a,i,x,C,y,F="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:4px solid transparent}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px}\n",k={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},m={},b=function(e,t){var o,n,r,a,i,l,c,d;1<(l=m[e]||(m[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete m[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,u(d,"abort",n),u(d,"error",n),u(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",u(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&u(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=F:r.appendChild(n(F)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),b.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},w=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},m={},b=function(e,t){var o,n,r,a,i,l,c,d;1<(l=m[e]||(m[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete m[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,u(d,"abort",n),u(d,"error",n),u(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",u(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&u(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=F:r.appendChild(n(F)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),b.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},v=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o Date: Sun, 15 Jul 2018 13:48:38 -0700 Subject: [PATCH 0083/1193] Update dependencies --- index.html | 2 +- package-lock.json | 364 ++++++++++++++++++++-------------------------- package.json | 12 +- 3 files changed, 161 insertions(+), 217 deletions(-) diff --git a/index.html b/index.html index ed3b52f7..7787be16 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ github:buttons - + diff --git a/package-lock.json b/package-lock.json index e418a010..328c3414 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,18 +5,18 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", - "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.53.tgz", + "integrity": "sha1-mA0VYLhjV1v1o3eSUDfgEy71kh4=", "dev": true, "requires": { - "@babel/highlight": "7.0.0-beta.51" + "@babel/highlight": "7.0.0-beta.53" } }, "@babel/highlight": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", - "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.53.tgz", + "integrity": "sha1-9OlS2tF4fSBeGI0+OEzc5JyjaPs=", "dev": true, "requires": { "chalk": "^2.0.0", @@ -70,6 +70,12 @@ "samsam": "1.3.0" } }, + "@sinonjs/samsam": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.0.0.tgz", + "integrity": "sha512-D7VxhADdZbDJ0HjUTMnSQ5xIGb4H2yWpg8k9Sf1T08zfFiQYlaxM8LZydpR4FQ2E6LZJX8IlabNZ5io4vdChwg==", + "dev": true + }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -77,9 +83,9 @@ "dev": true }, "@types/node": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.1.tgz", - "integrity": "sha512-AFLl1IALIuyt6oK4AYZsgWVJ/5rnyzQWud7IebaZWWV3YmgtPZkQmYio9R5Ze/2pdd7XfqF5bP+hWS11mAKoOQ==", + "version": "10.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", + "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==", "dev": true }, "@webassemblyjs/ast": { @@ -386,9 +392,9 @@ "dev": true }, "agent-base": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", - "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", "dev": true, "requires": { "es6-promisify": "^5.0.0" @@ -1120,14 +1126,15 @@ } }, "browserify-des": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.1.tgz", - "integrity": "sha512-zy0Cobe3hhgpiOM32Tj7KQ3Vl91m0njwsjzZQK1L+JDf11dzP9qIvjreVinsvXrgfjhStXwUWAEpB9D7Gwmayw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "browserify-rsa": { @@ -1463,14 +1470,15 @@ "dev": true }, "codecov": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.2.tgz", - "integrity": "sha512-9ljtIROIjPIUmMRqO+XuDITDoV8xRrZmA0jcEq6p2hg2+wY9wGmLfreAZGIL72IzUfdEDZaU8+Vjidg1fBQ8GQ==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.0.4.tgz", + "integrity": "sha512-KJyzHdg9B8U9LxXa7hS6jnEW5b1cNckLYc2YpnJ1nEFiOW+/iSzDHp+5MYEIQd9fN3/tC6WmGZmYiwxzkuGp/A==", "dev": true, "requires": { - "argv": "0.0.2", - "request": "^2.81.0", - "urlgrey": "0.4.4" + "argv": "^0.0.2", + "ignore-walk": "^3.0.1", + "request": "^2.87.0", + "urlgrey": "^0.4.4" } }, "coffee-loader": { @@ -2251,9 +2259,9 @@ "dev": true }, "escodegen": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.10.0.tgz", - "integrity": "sha512-fjUOf8johsv23WuIKdNQU4P9t9jhQ4Qzx6pC2uW890OloK3Zs1ZAoCNpg/2larNF501jLl3UNy0kIRcF6VI22g==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", + "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", "dev": true, "optional": true, "requires": { @@ -2274,9 +2282,9 @@ } }, "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -2643,9 +2651,9 @@ } }, "follow-redirects": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz", - "integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.1.tgz", + "integrity": "sha512-v9GI1hpaqq1ZZR6pBD1+kI7O24PhDvNGNodjS3MdcEqyrahCp8zbtpv+2B/krUnSmUH80lbAS7MrdeK5IylgKg==", "dev": true, "requires": { "debug": "^3.1.0" @@ -3362,21 +3370,23 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true + "dev": true, + "optional": true }, "generate-object-property": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", "dev": true, + "optional": true, "requires": { "is-property": "^1.0.0" } }, "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, "get-func-name": { @@ -3659,13 +3669,13 @@ } }, "hash.js": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.4.tgz", - "integrity": "sha512-A6RlQvvZEtFS5fLU43IDu0QUmBy+fDO9VMdTXvufKwIkt/rFfvICAViCax5fbDO4zdNzaC3/27ZhKUok5bAJyw==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", + "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", "dev": true, "requires": { "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.1" } }, "hawk": { @@ -3715,9 +3725,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", - "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, "http-errors": { @@ -3845,6 +3855,15 @@ "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", "dev": true }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -4069,13 +4088,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true + "dev": true, + "optional": true }, "is-my-json-valid": { "version": "2.17.2", "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", "dev": true, + "optional": true, "requires": { "generate-function": "^2.0.0", "generate-object-property": "^1.1.0", @@ -4129,7 +4150,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true + "dev": true, + "optional": true }, "is-stream": { "version": "1.1.0", @@ -4305,9 +4327,9 @@ } }, "js-base64": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.5.tgz", - "integrity": "sha512-aUnNwqMOXw3yvErjMPSQu6qIIzUmT1e5KcU1OZxRDU1g/am6mzBvcrmLAYwzmB59BHPrh5/tKaiF4OPhqRWESQ==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.6.tgz", + "integrity": "sha512-O9SR2NVICx6rCqh1qsU91QZ5IoNa+2T1ROJ0OQlfvATKGmnjsAvg3r0E5ufPZ4a95jdKTPXhFWiE/sOZ7a5Rtg==", "dev": true }, "js-tokens": { @@ -4327,9 +4349,9 @@ }, "dependencies": { "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true } } @@ -4396,7 +4418,8 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true + "dev": true, + "optional": true }, "jsprim": { "version": "1.4.1", @@ -4584,13 +4607,10 @@ "dev": true }, "karma-sinon-chai": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/karma-sinon-chai/-/karma-sinon-chai-1.3.4.tgz", - "integrity": "sha512-Oatu8tdkfWaSveM809euI6KGcNJRdoXFilz9ozSf+vPwrM73kncu54nsfkLcMqR/iht3PXASAGK9La5oU2xDKQ==", - "dev": true, - "requires": { - "lolex": "^1.6.0" - } + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/karma-sinon-chai/-/karma-sinon-chai-2.0.2.tgz", + "integrity": "sha512-SDgh6V0CUd+7ruL1d3yG6lFzmJNGRNQuEuCYXLaorruNP9nwQfA7hpsp4clx4CbOo5Gsajh3qUOT7CrVStUKMw==", + "dev": true }, "karma-sourcemap-loader": { "version": "0.3.7", @@ -4821,9 +4841,9 @@ } }, "log4js": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.10.0.tgz", - "integrity": "sha512-NnhN9PjFF9zhxinAjlmDYvkqqrIW+yA3LLJAoTJ3fs6d1zru86OqQHfsxiUcc1kRq3z+faGR4DeyXUfiNbVxKQ==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.11.0.tgz", + "integrity": "sha512-z1XdwyGFg8/WGkOyF6DPJjivCWNLKrklGdViywdYnSKOvgtEBo2UyEMZS5sD2mZrQlU3TvO8wDWLc8mzE1ncBQ==", "dev": true, "requires": { "amqplib": "^0.5.2", @@ -4986,9 +5006,9 @@ } }, "lolex": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.6.0.tgz", - "integrity": "sha1-OpoCg0UqR9dDnnJzG54H1zhuSfY=", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", + "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", "dev": true }, "long": { @@ -5004,12 +5024,12 @@ "dev": true }, "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { - "js-tokens": "^3.0.0" + "js-tokens": "^3.0.0 || ^4.0.0" } }, "loud-rejection": { @@ -5442,14 +5462,6 @@ "lolex": "^2.3.2", "path-to-regexp": "^1.7.0", "text-encoding": "^0.6.4" - }, - "dependencies": { - "lolex": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", - "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", - "dev": true - } } }, "node-gyp": { @@ -5614,9 +5626,9 @@ } }, "node-sass": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.0.tgz", - "integrity": "sha512-QFHfrZl6lqRU3csypwviz2XLgGNOoWQbo2GOvtsfQqOfL4cy1BtWnhx/XUeAO9LT3ahBzSRXcEO6DdvAH9DzSg==", + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.2.tgz", + "integrity": "sha512-LdxoJLZutx0aQXHtWIYwJKMj+9pTjneTcLWJgzf2XbGu0q5pRNqW5QvFCEdm3mc5rJOdru/mzln5d0EZLacf6g==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -5634,104 +5646,10 @@ "nan": "^2.10.0", "node-gyp": "^3.3.1", "npmlog": "^4.0.0", - "request": "~2.79.0", + "request": "2.87.0", "sass-graph": "^2.2.4", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" - }, - "dependencies": { - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=", - "dev": true - }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", - "dev": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "qs": "~6.3.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1", - "uuid": "^3.0.0" - } - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true - } } }, "nodemailer": { @@ -5969,9 +5887,9 @@ } }, "octicons": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/octicons/-/octicons-7.3.0.tgz", - "integrity": "sha512-UVjlkmUL15Ef/7Rd72Io634Bdl61QgSMasAZpvXPoR2XNFj1RelAyhl4QJuR1hBGlPWFDR7KFj2jEzsFax2IUg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/octicons/-/octicons-8.0.0.tgz", + "integrity": "sha512-ihUXutjRepJAAhQ9jm2VhqJ1OqiFTn6URQ6jEdz+tKcjysPoEoiiYxJG9E+yVzwEeDcfhMWBx2yPfttkl1ZsYg==", "dev": true, "requires": { "object-assign": "^4.1.1" @@ -6116,6 +6034,17 @@ "requires": { "ms": "2.0.0" } + }, + "socks-proxy-agent": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", + "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", + "dev": true, + "optional": true, + "requires": { + "agent-base": "^4.1.0", + "socks": "^1.1.10" + } } } }, @@ -6424,9 +6353,9 @@ } }, "proxy-agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.0.tgz", - "integrity": "sha512-g6n6vnk8fRf705ShN+FEXFG/SDJaW++lSs0d9KaJh4uBWW/wi7en4Cpo5VYQW3SZzAE121lhB/KLQrbURoubZw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.1.tgz", + "integrity": "sha512-mAZexaz9ZxQhYPWfAjzlrloEjW+JHiBFryE4AJXFDTnaXfmH/FKqC1swTRKuEPbHWz02flQNXFOyDUF7zfEG6A==", "dev": true, "optional": true, "requires": { @@ -6437,7 +6366,7 @@ "lru-cache": "^4.1.2", "pac-proxy-agent": "^2.0.1", "proxy-from-env": "^1.0.0", - "socks-proxy-agent": "^3.0.0" + "socks-proxy-agent": "^4.0.1" }, "dependencies": { "debug": { @@ -6911,9 +6840,9 @@ "dev": true }, "uglify-js": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.3.tgz", - "integrity": "sha512-RbOgGjF04sFUNSi8xGOTB9AmtVmMmVVAL5a7lxIgJ8urejJen+priq0ooRIHHa8AXI/dSvNF9yYMz9OP4PhybQ==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.4.tgz", + "integrity": "sha512-RiB1kNcC9RMyqwRrjXC+EjgLoXULoDnCaOnEDzUCHkBN0bHwmtF5rzDMiDWU29gu0kXCRRWwtcTAVFWRECmU2Q==", "dev": true, "requires": { "commander": "~2.16.0", @@ -7435,12 +7364,13 @@ "dev": true }, "sinon": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.0.tgz", - "integrity": "sha512-BSt7qfCyoqMcPVK0c+olyjaa2DB0DTyOBpHmGC3goiHmNa8NE+4/ZJlUi693VS0WPgvR0rc6nYvASXYZMiibhw==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.3.tgz", + "integrity": "sha512-yeTza8xIZZdiXntCHJAzKll/sSYE+DuJOS8hiSapzaLqdW8eCNVVC9je9SZYYTkPm2bLts9x6UYxwuMAVVrM6Q==", "dev": true, "requires": { "@sinonjs/formatio": "^2.0.0", + "@sinonjs/samsam": "^2.0.0", "diff": "^3.5.0", "lodash.get": "^4.4.2", "lolex": "^2.4.2", @@ -7455,12 +7385,6 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "lolex": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.0.tgz", - "integrity": "sha512-uJkH2e0BVfU5KOJUevbTOtpDduooSarH5PopO+LfM/vZf8Z9sJzODqKev804JYM2i++ktJfUmC1le4LwFQ1VMg==", - "dev": true - }, "supports-color": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", @@ -7492,7 +7416,8 @@ "version": "1.1.15", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", - "dev": true + "dev": true, + "optional": true }, "smtp-connection": { "version": "2.12.0", @@ -7694,19 +7619,41 @@ "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", "dev": true, + "optional": true, "requires": { "ip": "^1.1.4", "smart-buffer": "^1.0.13" } }, "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", + "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", "dev": true, + "optional": true, "requires": { - "agent-base": "^4.1.0", - "socks": "^1.1.10" + "agent-base": "~4.2.0", + "socks": "~2.2.0" + }, + "dependencies": { + "smart-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", + "integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", + "dev": true, + "optional": true + }, + "socks": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.1.tgz", + "integrity": "sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w==", + "dev": true, + "optional": true, + "requires": { + "ip": "^1.1.5", + "smart-buffer": "^4.0.1" + } + } } }, "source-list-map": { @@ -8473,13 +8420,10 @@ "dev": true }, "use": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", - "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true }, "useragent": { "version": "2.2.1", @@ -8581,9 +8525,9 @@ } }, "webpack": { - "version": "4.15.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.15.0.tgz", - "integrity": "sha512-S2fpUI4WLg9gsg1CZ9SE790C1fI2zbxiBCdl9xAnttdLjXhzfCYSYu+TeSEz6ZrLcmQ8RpJoieOAAS0p27nTog==", + "version": "4.16.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.16.0.tgz", + "integrity": "sha512-oNx9djAd6uAcccyfqN3hyXLNMjZHiRySZmBQ4c8FNmf1SNJGhx7n9TSvHNyXxgToRdH65g/Q97s94Ip9N6F7xg==", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.13", diff --git a/package.json b/package.json index 3238b48a..99ca79c4 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "chai": "^4.1.2", - "codecov": "^3.0.2", + "codecov": "^3.0.4", "coffee-loader": "^0.9.0", "coffeelint": "^2.1.0", "coffeescript": "^1.12.7", @@ -49,21 +49,21 @@ "karma-mocha-reporter": "^2.2.5", "karma-safari-launcher": "^1.0.0", "karma-sinon": "^1.0.5", - "karma-sinon-chai": "^1.3.4", + "karma-sinon-chai": "^2.0.2", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^3.0.0", "mocha": "^5.2.0", - "node-sass": "^4.9.0", - "octicons": "^7.3.0", + "node-sass": "^4.9.2", + "octicons": "^8.0.0", "raw-loader": "^0.5.1", "rollup": "^0.62.0", "rollup-plugin-coffee-script": "^2.0.0", "rollup-plugin-node-resolve": "^3.3.0", "rollup-plugin-uglify": "^4.0.0", "rollup-watch": "^4.3.1", - "sinon": "^6.1.0", + "sinon": "^6.1.3", "sinon-chai": "^3.2.0", - "webpack": "^4.15.0" + "webpack": "^4.16.0" }, "engines": { "node": ">=6.5.0" From 04b0c86147fda3addfc1e6e861114027373f47d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 15 Jul 2018 13:55:35 -0700 Subject: [PATCH 0084/1193] Fix broken overlay on button generator --- assets/css/main.css | 2 +- assets/scss/main.scss | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index f9fe2494..34eb07ef 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1 +1 @@ -html{position:relative;min-height:100%}.header{border-bottom:1px solid #e5e5e5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-brand{cursor:pointer}.octicon-logo-github{color:#000}.logo{line-height:24px;vertical-align:bottom}.logo-colon{color:#afafaf}.logo-buttons{color:#4ea6ea}.main{padding-bottom:57px}.footer{position:absolute;bottom:0;width:100%;height:57px;overflow-y:hidden;border-top:1px solid #e5e5e5}.form-check-label:before{position:absolute;display:block;width:100%;height:100%;content:''}p{overflow-x:auto;overflow-y:hidden}textarea,textarea[readonly]{font-family:monospace, sans-serif;font-size:11px;cursor:pointer;background-color:#fff !important;resize:none}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor} +html{position:relative;min-height:100%}.header{border-bottom:1px solid #e5e5e5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-brand{cursor:pointer}.octicon-logo-github{color:#000}.logo{line-height:24px;vertical-align:bottom}.logo-colon{color:#afafaf}.logo-buttons{color:#4ea6ea}.main{padding-bottom:57px}.footer{position:absolute;bottom:0;width:100%;height:57px;overflow-y:hidden;border-top:1px solid #e5e5e5}.form-check-label::before{position:absolute;z-index:1;display:block;width:100%;height:100%;content:''}p{overflow-x:auto;overflow-y:hidden}textarea,textarea[readonly]{font-family:monospace, sans-serif;font-size:11px;cursor:pointer;background-color:#fff !important;resize:none}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor} diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 57a45e96..1f5f69e2 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -36,8 +36,9 @@ html { overflow-y: hidden; border-top: 1px solid #e5e5e5; } -.form-check-label:before { +.form-check-label::before { position: absolute; + z-index: 1; display: block; width: 100%; height: 100%; From 9947aa85b8cc50e4f12c817a1b0650855d307eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 15 Jul 2018 14:34:32 -0700 Subject: [PATCH 0085/1193] Fix octicon vertical-align in button generator --- assets/css/main.css | 2 +- assets/scss/main.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 34eb07ef..5e7a6bd9 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1 +1 @@ -html{position:relative;min-height:100%}.header{border-bottom:1px solid #e5e5e5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-brand{cursor:pointer}.octicon-logo-github{color:#000}.logo{line-height:24px;vertical-align:bottom}.logo-colon{color:#afafaf}.logo-buttons{color:#4ea6ea}.main{padding-bottom:57px}.footer{position:absolute;bottom:0;width:100%;height:57px;overflow-y:hidden;border-top:1px solid #e5e5e5}.form-check-label::before{position:absolute;z-index:1;display:block;width:100%;height:100%;content:''}p{overflow-x:auto;overflow-y:hidden}textarea,textarea[readonly]{font-family:monospace, sans-serif;font-size:11px;cursor:pointer;background-color:#fff !important;resize:none}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor} +html{position:relative;min-height:100%}.header{border-bottom:1px solid #e5e5e5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-brand{cursor:pointer}.octicon-logo-github{color:#000}.logo{line-height:24px;vertical-align:bottom}.logo-colon{color:#afafaf}.logo-buttons{color:#4ea6ea}.main{padding-bottom:57px}.footer{position:absolute;bottom:0;width:100%;height:57px;overflow-y:hidden;border-top:1px solid #e5e5e5}.form-check-label::before{position:absolute;z-index:1;display:block;width:100%;height:100%;content:''}p{overflow-x:auto;overflow-y:hidden}textarea,textarea[readonly]{font-family:monospace, sans-serif;font-size:11px;cursor:pointer;background-color:#fff !important;resize:none}.octicon{display:inline-block;vertical-align:text-top !important;fill:currentColor} diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 1f5f69e2..d0896d96 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -58,6 +58,6 @@ textarea[readonly] { } .octicon { display: inline-block; - vertical-align: text-top; + vertical-align: text-top !important; fill: currentColor; } From 165d80c0dd1c09f45642fd544f79dae3fefa175a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Mon, 16 Jul 2018 00:30:46 -0700 Subject: [PATCH 0086/1193] Update components --- README.md | 6 ++-- dist/react/README.md | 8 ++--- dist/react/{GitHubButton.js => index.js} | 0 dist/vue/GithubButton.vue | 38 ------------------------ dist/vue/README.md | 8 ++--- dist/vue/index.js | 19 ++++++++++++ 6 files changed, 29 insertions(+), 50 deletions(-) rename dist/react/{GitHubButton.js => index.js} (100%) delete mode 100644 dist/vue/GithubButton.vue create mode 100644 dist/vue/index.js diff --git a/README.md b/README.md index a295da0d..4f257ce9 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ The easiest way to get started is to use the **[github:button generator](https:/ ### Components -- [GithubButton.vue](dist/vue) for [Vue](https://vuejs.org) -- [GitHubButton.js](dist/react/) for [React](https://facebook.github.io/react/) -- [github-button.component.ts](dist/angular/) for [Angular](https://angular.io) +- [github-buttons/dist/vue](dist/vue/) for [Vue](https://vuejs.org) +- [github-buttons/dist/react](dist/react/) for [React](https://facebook.github.io/react/) +- [github-buttons/dist/angular](dist/angular/) for [Angular](https://angular.io) ### Basic Usage (without component) diff --git a/dist/react/README.md b/dist/react/README.md index 6a62875c..3478ad52 100644 --- a/dist/react/README.md +++ b/dist/react/README.md @@ -1,10 +1,8 @@ -GitHubButton.js ---------------- +GitHub Button for React +----------------------- ``` jsx -import GitHubButton from 'github-buttons/dist/react/GitHubButton'; +import GitHubButton from 'github-buttons/dist/react'; var githubButton = ; ``` - -You may have to copy `GitHubButton.js` to your project `src` folder for babel to work properly. diff --git a/dist/react/GitHubButton.js b/dist/react/index.js similarity index 100% rename from dist/react/GitHubButton.js rename to dist/react/index.js diff --git a/dist/vue/GithubButton.vue b/dist/vue/GithubButton.vue deleted file mode 100644 index a974cb04..00000000 --- a/dist/vue/GithubButton.vue +++ /dev/null @@ -1,38 +0,0 @@ - diff --git a/dist/vue/README.md b/dist/vue/README.md index c9a5d358..02d5a5fa 100644 --- a/dist/vue/README.md +++ b/dist/vue/README.md @@ -1,13 +1,13 @@ -GithubButton.vue ----------------- +GitHub Button for Vue +--------------------- ``` vue diff --git a/buttons.html b/buttons.html new file mode 120000 index 00000000..221e5109 --- /dev/null +++ b/buttons.html @@ -0,0 +1 @@ +dist/buttons.html \ No newline at end of file diff --git a/dist/buttons.html b/dist/buttons.html new file mode 100644 index 00000000..bd7a7498 --- /dev/null +++ b/dist/buttons.html @@ -0,0 +1 @@ + From c240a295bd0502dda31dcef13f351d3adc5a7b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Mon, 16 Jul 2018 21:10:27 -0700 Subject: [PATCH 0088/1193] Remove trailing slash from base url --- assets/js/app.js | 16 ++++++++++------ assets/js/app.min.js | 2 +- dist/buttons.common.js | 16 ++++++++++------ dist/buttons.esm.js | 16 ++++++++++------ dist/buttons.js | 22 +++++++++++++--------- dist/buttons.min.js | 2 +- src/alias.coffee | 1 + src/config.coffee | 8 ++++++-- src/container.coffee | 3 ++- src/content.coffee | 4 ++-- src/main.coffee | 8 +++++--- test/unit/alias.spec.coffee | 5 +++++ test/unit/config.spec.coffee | 7 ++++++- test/unit/content.spec.coffee | 2 +- 14 files changed, 73 insertions(+), 39 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index bb448f01..0b02182f 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -3,6 +3,8 @@ var document = window.document; + var location = document.location; + var encodeURIComponent = window.encodeURIComponent; var decodeURIComponent = window.decodeURIComponent; @@ -13,16 +15,18 @@ return document.createElement(tag); }; - var apiBaseURL, baseURL, buttonClass, setBaseURL; + var apiBaseURL, baseURL, buttonClass, htmlPath, setBaseURL; buttonClass = "github-button"; /* istanbul ignore next */ - baseURL = (/^http:/.test(document.location) ? "http" : "https") + "://buttons.github.io/"; + baseURL = (/^http:/.test(location) ? "http" : "https") + "://buttons.github.io"; + + htmlPath = "/buttons.html"; - apiBaseURL = "https://api.github.com/"; + apiBaseURL = "https://api.github.com/"; setBaseURL = function(url) { baseURL = url; @@ -265,7 +269,7 @@ return callback(); } if (match[2]) { - api = "repos/" + match[1] + "/" + match[2]; + api = "/repos/" + match[1] + "/" + match[2]; if (match[3]) { property = "subscribers_count"; href = "watchers"; @@ -280,7 +284,7 @@ href = "stargazers"; } } else { - api = "users/" + match[1]; + api = "/users/" + match[1]; href = property = "followers"; } fetch.call(this, apiBaseURL + api, function(error, json) { @@ -405,7 +409,7 @@ onceEvent(iframe, "load", function() { set(iframe, size); }); - iframe.src = baseURL + "buttons.html#" + (stringify(options)); + iframe.src = baseURL + htmlPath + "#" + stringify(options); if (title = options.title) { iframe.title = title; } diff --git a/assets/js/app.min.js b/assets/js/app.min.js index 2d586259..c8bd0182 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)};s="github-button",l=(/^http:/.test(u.location)?"http":"https")+"://buttons.github.io/",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,n;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},n=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var g,b,m,w,v,i,a,y,x,c,C="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n",k={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(t)||(t="mark-github"),'"},m={},b=function(t,e){var o,n,r,i,a,s,c,l;1<(s=m[t]||(m[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete m[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=C:r.appendChild(n(C)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="users/"+e[1],r=i="followers"),b.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),z.hasOwnProperty(t)||(t="mark-github"),'"},m={},b=function(t,e){var o,n,r,i,a,s,c,l;1<(s=m[t]||(m[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete m[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=k:r.appendChild(n(k)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="/repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="/users/"+e[1],r=i="followers"),b.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),k.hasOwnProperty(e)||(e="mark-github"),'"},m={},b=function(e,t){var o,n,r,a,i,l,c,d;1<(l=m[e]||(m[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete m[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,u(d,"abort",n),u(d,"error",n),u(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",u(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&u(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=F:r.appendChild(n(F)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="users/"+t[1],r=a="followers"),b.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},v=function(){var e,t,o,n,r,a,i;if(t=[],s.querySelectorAll)t=s.querySelectorAll("a."+l);else for(o=0,r=(i=s.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},w={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=w[e]||(w[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete w[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=z:r.appendChild(n(z)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="/repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="/users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o baseURL = url @@ -20,6 +23,7 @@ setApiBaseURL = (url) -> export { buttonClass baseURL + htmlPath apiBaseURL setBaseURL setApiBaseURL diff --git a/src/container.coffee b/src/container.coffee index ef0d110a..58888379 100644 --- a/src/container.coffee +++ b/src/container.coffee @@ -4,6 +4,7 @@ import { } from "./alias" import { baseURL + htmlPath } from "./config" import { parseOptions @@ -54,7 +55,7 @@ render = (targetNode, options) -> onceEvent iframe, "load", -> setSize iframe, size return - iframe.src = "#{baseURL}buttons.html##{stringifyQueryString options}" + iframe.src = baseURL + htmlPath + "#" + stringifyQueryString options iframe.title = title if title = options.title targetNode.parentNode.replaceChild iframe, targetNode return diff --git a/src/content.coffee b/src/content.coffee index c5c6b5d2..71ad290f 100644 --- a/src/content.coffee +++ b/src/content.coffee @@ -74,7 +74,7 @@ render = (root, options, func) -> return callback() unless match and not match[6] if match[2] - api = "repos/#{match[1]}/#{match[2]}" + api = "/repos/#{match[1]}/#{match[2]}" if match[3] property = "subscribers_count" href = "watchers" @@ -88,7 +88,7 @@ render = (root, options, func) -> property = "stargazers_count" href = "stargazers" else - api = "users/#{match[1]}" + api = "/users/#{match[1]}" href = property = "followers" fetch.call @, apiBaseURL + api, (error, json) -> diff --git a/src/main.coffee b/src/main.coffee index 74092201..057c9184 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -1,8 +1,10 @@ import { document + location } from "./alias" import { baseURL + htmlPath setBaseURL } from "./config" import { @@ -29,9 +31,9 @@ if typeof define is "function" and define.amd else if typeof exports is "object" and typeof exports.nodeName isnt "string" exports.render = renderContainer else - setBaseURL currentScriptURL.replace /[^/]*([?#].*)?$/, "" if currentScriptURL + setBaseURL currentScriptURL.replace /\/[^/]*([?#].*)?$/, "" if currentScriptURL - if baseURL + "buttons.html" is document.location.href.replace /[?#].*$/, "" - renderContent document.body, parseQueryString document.location.hash.replace /^#/, "" + if location.protocol + "//" + location.host + location.pathname is baseURL + htmlPath + renderContent document.body, parseQueryString location.hash.replace /^#/, "" else defer batchRender diff --git a/test/unit/alias.spec.coffee b/test/unit/alias.spec.coffee index 89c73f56..cc009f97 100644 --- a/test/unit/alias.spec.coffee +++ b/test/unit/alias.spec.coffee @@ -1,5 +1,6 @@ import { document + location encodeURIComponent decodeURIComponent Math @@ -12,6 +13,10 @@ describe "Alias", -> expect document .to.equal window.document + it "should export an alias for window.document", -> + expect location + .to.equal document.location + it "should export an alias for window.encodeURIComponent", -> expect encodeURIComponent .to.equal window.encodeURIComponent diff --git a/test/unit/config.spec.coffee b/test/unit/config.spec.coffee index 2d2931f3..10a7872c 100644 --- a/test/unit/config.spec.coffee +++ b/test/unit/config.spec.coffee @@ -1,5 +1,6 @@ import { baseURL + htmlPath setBaseURL } from "@/config" @@ -9,7 +10,11 @@ setBaseURL "/something/else" describe "Config", -> it "should export base url", -> expect originalBaseURL - .to.match ///^https?://buttons.github.io/$/// + .to.match ///^https?://buttons.github.io$/// + + it "should export html path", -> + expect htmlPath + .to.equal "/buttons.html" describe "setBaseURL(url)", -> it "should set relative base url when document.currentScript is safe to use", -> diff --git a/test/unit/content.spec.coffee b/test/unit/content.spec.coffee index a6b759c7..b8d5812f 100644 --- a/test/unit/content.spec.coffee +++ b/test/unit/content.spec.coffee @@ -5,7 +5,7 @@ import { setApiBaseURL } from "@/config" -setApiBaseURL "/base/test/fixtures/api.github.com/" +setApiBaseURL "/base/test/fixtures/api.github.com" describe "Content", -> root = null From 3e2812012f37b10b42e0aa34db220b935fe5ee36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Mon, 16 Jul 2018 21:50:54 -0700 Subject: [PATCH 0089/1193] Fix for ancient browsers --- assets/js/app.js | 5 +++-- assets/js/app.min.js | 2 +- dist/buttons.common.js | 5 +++-- dist/buttons.esm.js | 5 +++-- dist/buttons.js | 5 +++-- dist/buttons.min.js | 2 +- src/content.coffee | 3 ++- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 0b02182f..40a29006 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -210,10 +210,11 @@ var render; render = function(root, options, func) { - var button, callback, createElement, createTextNode, document, style, widget; + var button, callback, contentWindow, createElement, createTextNode, document, style, widget; if (!options) { return; } + contentWindow = this; document = root.ownerDocument; createElement = function(tag) { return document.createElement(tag); @@ -287,7 +288,7 @@ api = "/users/" + match[1]; href = property = "followers"; } - fetch.call(this, apiBaseURL + api, function(error, json) { + fetch.call(contentWindow, apiBaseURL + api, function(error, json) { var a, data, span; if (!error) { data = json[property]; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index c8bd0182..eee6bff5 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,n=u.location,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)};s="github-button",l=(/^http:/.test(n)?"http":"https")+"://buttons.github.io",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,i;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},i=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var g,b,m,w,v,a,c,y,x,C,k="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n",z={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};g=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),z.hasOwnProperty(t)||(t="mark-github"),'"},m={},b=function(t,e){var o,n,r,i,a,s,c,l;1<(s=m[t]||(m[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete m[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},w=function(t,o,e){var a,s,c,n,l,r,i,u,d;o&&(l=t.ownerDocument,n=function(t){return l.createTextNode(t)},(r=(c=function(t){return l.createElement(t)})("style")).type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=k:r.appendChild(n(k)),(i=t.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),s=function(){e&&e(i)},(u=c("a")).href=o.href,u.target="_blank",/\.github\.com$/.test("."+u.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(u.href)&&(u.target="_top"):(u.href="#",u.target="_self"),u.className="btn",(d=o["aria-label"])&&u.setAttribute("aria-label",d),u.innerHTML=g(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),u.appendChild(n(" ")),u.appendChild(c("span")).appendChild(n(o["data-text"]||"")),a=i.appendChild(u),function(){var t,r,e,i;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===a.hostname?!(e=a.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||e[6]?s():(e[2]?(t="/repos/"+e[1]+"/"+e[2],e[3]?(i="subscribers_count",r="watchers"):e[4]?(i="forks_count",r="network"):e[5]?(i="open_issues_count",r="issues"):(i="stargazers_count",r="stargazers")):(t="/users/"+e[1],r=i="followers"),b.call(this,"https://api.github.com/"+t,function(t,e){var o,n;t||(n=e[i],(o=c("a")).href=e.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+i.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(l.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),a.parentNode.insertBefore(o,a.nextSibling)),s()})):s()}())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),z.hasOwnProperty(t)||(t="mark-github"),'"},g={},w=function(t,e){var o,n,r,i,a,s,c,l;1<(s=g[t]||(g[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete g[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},b=function(t,e,o){var r,i,n,a,s,c,l,u,d,h,p,f,g,b;e&&(n=this,c=t.ownerDocument,s=function(t){return c.createTextNode(t)},(l=(a=function(t){return c.createElement(t)})("style")).type="text/css",t.appendChild(l),l.styleSheet?l.styleSheet.cssText=k:l.appendChild(s(k)),(u=t.appendChild(a("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),i=function(){o&&o(u)},(d=a("a")).href=e.href,d.target="_blank",/\.github\.com$/.test("."+d.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(d.href)&&(d.target="_top"):(d.href="#",d.target="_self"),d.className="btn",(h=e["aria-label"])&&d.setAttribute("aria-label",h),d.innerHTML=m(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),d.appendChild(s(" ")),d.appendChild(a("span")).appendChild(s(e["data-text"]||"")),r=u.appendChild(d),/^(true|1)$/i.test(e["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?i():(g[2]?(p="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count",f="watchers"):g[4]?(b="forks_count",f="network"):g[5]?(b="open_issues_count",f="issues"):(b="stargazers_count",f="stargazers")):(p="/users/"+g[1],f=b="followers"),w.call(n,"https://api.github.com/"+p,function(t,e){var o,n;t||(n=e[b],(o=a("a")).href=e.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(a("b")),o.appendChild(a("i")),o.appendChild(a("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()})):i())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};b=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},w={},m=function(e,t){var o,n,r,a,i,l,c,d;1<(l=w[e]||(w[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete w[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,o,t){var i,l,c,n,d,r,a,s,h;o&&(d=e.ownerDocument,n=function(e){return d.createTextNode(e)},(r=(c=function(e){return d.createElement(e)})("style")).type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=z:r.appendChild(n(z)),(a=e.appendChild(c("div"))).className="widget"+(/^large$/i.test(o["data-size"])?" large":""),l=function(){t&&t(a)},(s=c("a")).href=o.href,s.target="_blank",/\.github\.com$/.test("."+s.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(s.href)&&(s.target="_top"):(s.href="#",s.target="_self"),s.className="btn",(h=o["aria-label"])&&s.setAttribute("aria-label",h),s.innerHTML=b(o["data-icon"],/^large$/i.test(o["data-size"])?16:14),s.appendChild(n(" ")),s.appendChild(c("span")).appendChild(n(o["data-text"]||"")),i=a.appendChild(s),function(){var e,r,t,a;/^(true|1)$/i.test(o["data-show-count"])&&"github.com"===i.hostname?!(t=i.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||t[6]?l():(t[2]?(e="/repos/"+t[1]+"/"+t[2],t[3]?(a="subscribers_count",r="watchers"):t[4]?(a="forks_count",r="network"):t[5]?(a="open_issues_count",r="issues"):(a="stargazers_count",r="stargazers")):(e="/users/"+t[1],r=a="followers"),m.call(this,"https://api.github.com/"+e,function(e,t){var o,n;e||(n=t[a],(o=c("a")).href=t.html_url+"/"+r,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+a.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(c("b")),o.appendChild(c("i")),o.appendChild(c("span")).appendChild(d.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),i.parentNode.insertBefore(o,i.nextSibling)),l()})):l()}())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,h,p,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=z:d.appendChild(l(z)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(h=i("a")).href=t.href,h.target="_blank",/\.github\.com$/.test("."+h.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(h.href)&&(h.target="_top"):(h.href="#",h.target="_self"),h.className="btn",(p=t["aria-label"])&&h.setAttribute("aria-label",p),h.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),h.appendChild(l(" ")),h.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(h),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count",f="watchers"):g[4]?(b="forks_count",f="network"):g[5]?(b="open_issues_count",f="issues"):(b="stargazers_count",f="stargazers")):(u="/users/"+g[1],f=b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o return unless options + contentWindow = @ document = root.ownerDocument createElement = (tag) -> document.createElement tag createTextNode = (text) -> document.createTextNode text @@ -91,7 +92,7 @@ render = (root, options, func) -> api = "/users/#{match[1]}" href = property = "followers" - fetch.call @, apiBaseURL + api, (error, json) -> + fetch.call contentWindow, apiBaseURL + api, (error, json) -> if !error data = json[property] From bbeba87f7a798ee70f7aefc9f0d26387d000b448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Mon, 16 Jul 2018 22:26:20 -0700 Subject: [PATCH 0090/1193] Update .npmignore --- .npmignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index b6a14cea..5e8d39fb 100644 --- a/.npmignore +++ b/.npmignore @@ -3,7 +3,7 @@ /coverage/ /src/ /test/ -/*.html +/index.html /favicon.ico /coffeelint.json /karma.conf.js From f17ce807c8c207201345dd544341574269248774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 19 Jul 2018 02:19:06 -0700 Subject: [PATCH 0091/1193] Remove unused import --- test/unit/alias.spec.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/test/unit/alias.spec.coffee b/test/unit/alias.spec.coffee index cc009f97..1cd59280 100644 --- a/test/unit/alias.spec.coffee +++ b/test/unit/alias.spec.coffee @@ -5,7 +5,6 @@ import { decodeURIComponent Math createElement - createTextNode } from "@/alias" describe "Alias", -> From ba1379c64a31f4b7dfc61cbb1675317ab974ca98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 22 Jul 2018 22:49:54 -0700 Subject: [PATCH 0092/1193] Update vue component --- dist/vue/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dist/vue/index.js b/dist/vue/index.js index 2511c895..cc2534ee 100644 --- a/dist/vue/index.js +++ b/dist/vue/index.js @@ -3,17 +3,15 @@ import { render } from 'github-buttons' export default { name: 'github-button', render (h) { - return h('span', [ - h('a', { attrs: this.$attrs }, this.$slots.default) - ]) + return h('a', this.$slots.default) }, mounted () { - render(this._ = this.$el.lastChild) + render(this.$el.parentNode.insertBefore(this._ = document.createElement('span'), this.$el).appendChild(this.$el)) }, beforeUpdate () { - this.$el.replaceChild(this._, this.$el.lastChild) + this._.parentNode.replaceChild(this.$el, this._) }, updated () { - render(this._ = this.$el.lastChild) + render(this.$el.parentNode.insertBefore(this._ = document.createElement('span'), this.$el).appendChild(this.$el)) } } From 4fd814f425cdeb57c9938151c668c8f7c6f779bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Tue, 28 Aug 2018 19:03:53 -0700 Subject: [PATCH 0093/1193] Update dependencies --- package-lock.json | 2209 ++++++++++++--------------------------------- package.json | 12 +- 2 files changed, 608 insertions(+), 1613 deletions(-) diff --git a/package-lock.json b/package-lock.json index 328c3414..3979bd80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,18 +5,68 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0-beta.53", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.53.tgz", - "integrity": "sha1-mA0VYLhjV1v1o3eSUDfgEy71kh4=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", + "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", "dev": true, "requires": { - "@babel/highlight": "7.0.0-beta.53" + "@babel/highlight": "7.0.0-beta.51" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.51.tgz", + "integrity": "sha1-bHV1/952HQdIXgS67cA5LG2eMPY=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + }, + "dependencies": { + "jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", + "dev": true + } + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.51.tgz", + "integrity": "sha1-IbSHSiJ8+Z7K/MMKkDAtpaJkBWE=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.51.tgz", + "integrity": "sha1-MoGy0EWvlcFyzpGyCCXYXqRnZBE=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.51.tgz", + "integrity": "sha1-imw/ZsTSZTUvwHdIT59ugKUauXg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.51" } }, "@babel/highlight": { - "version": "7.0.0-beta.53", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.53.tgz", - "integrity": "sha1-9OlS2tF4fSBeGI0+OEzc5JyjaPs=", + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", + "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", "dev": true, "requires": { "chalk": "^2.0.0", @@ -44,16 +94,10 @@ "supports-color": "^5.3.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -61,6 +105,87 @@ } } }, + "@babel/parser": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.51.tgz", + "integrity": "sha1-J87C30Cd9gr1gnDtj2qlVAnqhvY=", + "dev": true + }, + "@babel/template": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.51.tgz", + "integrity": "sha1-lgKkCuvPNXrpZ34lMu9fyBD1+/8=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.51.tgz", + "integrity": "sha1-mB2vLOw0emIx06odnhgDsDqqpKg=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.51", + "@babel/generator": "7.0.0-beta.51", + "@babel/helper-function-name": "7.0.0-beta.51", + "@babel/helper-split-export-declaration": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.0.0-beta.51", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.51.tgz", + "integrity": "sha1-2AK3tUO1g2x3iqaReXq/APPZfqk=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + } + } + }, + "@sinonjs/commons": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.0.2.tgz", + "integrity": "sha512-WR3dlgqJP4QNrLC4iXN/5/2WaLQQ0VijOOkmflqFGVJ6wLEpbSjo7c0ZeGIdtY8Crk7xBBp87sM6+Mkerz7alw==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, "@sinonjs/formatio": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", @@ -83,9 +208,9 @@ "dev": true }, "@types/node": { - "version": "10.5.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz", - "integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q==", + "version": "10.9.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.3.tgz", + "integrity": "sha512-DOzWZKUnmFYG0KUOs+9HEBju2QhBU6oM2zeluunQNt0vnJvnkHvtDNlQPZDkTrkC5pZrNx1TPqeL137zciXZMQ==", "dev": true }, "@webassemblyjs/ast": { @@ -364,9 +489,9 @@ } }, "acorn": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", - "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz", + "integrity": "sha512-cJrKCNcr2kv8dlDnbw+JPUGjHZzo4myaxOLmpOX8a+rgX94YeTcTMv/LFJUSByRpc+i4GgVnnhLxvMu/2Y+rqw==", "dev": true }, "acorn-dynamic-import": { @@ -378,28 +503,12 @@ "acorn": "^5.0.0" } }, - "addressparser": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/addressparser/-/addressparser-1.0.1.tgz", - "integrity": "sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y=", - "dev": true, - "optional": true - }, "after": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", "dev": true }, - "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", @@ -446,49 +555,6 @@ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", "dev": true }, - "amqplib": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.5.2.tgz", - "integrity": "sha512-l9mCs6LbydtHqRniRwYkKdqxVa6XMz3Vw1fh+2gJaaVgTM6Jk3o8RccAKWKtlhT1US5sWrFh+KKxsVUALURSIA==", - "dev": true, - "optional": true, - "requires": { - "bitsyntax": "~0.0.4", - "bluebird": "^3.4.6", - "buffer-more-ints": "0.0.2", - "readable-stream": "1.x >=1.1.9", - "safe-buffer": "^5.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true, - "optional": true - } - } - }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -594,10 +660,13 @@ "dev": true }, "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", - "dev": true + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } }, "asn1.js": { "version": "4.10.1", @@ -654,13 +723,6 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "ast-types": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.5.tgz", - "integrity": "sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw==", - "dev": true, - "optional": true - }, "async": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", @@ -695,9 +757,9 @@ "dev": true }, "atob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, "aws-sign2": { @@ -707,33 +769,11 @@ "dev": true }, "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, - "axios": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.15.3.tgz", - "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", - "dev": true, - "optional": true, - "requires": { - "follow-redirects": "1.0.0" - }, - "dependencies": { - "follow-redirects": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.0.0.tgz", - "integrity": "sha1-jjQpjL0uF28lTv/sdaHHjMhJ/Tc=", - "dev": true, - "optional": true, - "requires": { - "debug": "^2.2.0" - } - } - } - }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -944,57 +984,6 @@ "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", "dev": true }, - "bitsyntax": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/bitsyntax/-/bitsyntax-0.0.4.tgz", - "integrity": "sha1-6xDMb4K4xJDj6FaY8H6D1G4MuoI=", - "dev": true, - "optional": true, - "requires": { - "buffer-more-ints": "0.0.2" - } - }, - "bl": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", - "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "~2.0.5" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true, - "optional": true - } - } - }, "blob": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.4.tgz", @@ -1040,15 +1029,6 @@ "type-is": "~1.6.16" } }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1182,16 +1162,32 @@ "isarray": "^1.0.0" } }, - "buffer-from": { + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", "dev": true }, - "buffer-more-ints": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-0.0.2.tgz", - "integrity": "sha1-JrOIXRD6E9t/wBquOquHAZngEkw=", + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "buffer-xor": { @@ -1200,22 +1196,6 @@ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, - "buildmail": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/buildmail/-/buildmail-4.0.1.tgz", - "integrity": "sha1-h393OLeHKYccmhBeO4N9K+EaenI=", - "dev": true, - "optional": true, - "requires": { - "addressparser": "1.0.1", - "libbase64": "0.1.0", - "libmime": "3.0.0", - "libqp": "1.1.0", - "nodemailer-fetch": "1.6.0", - "nodemailer-shared": "1.1.0", - "punycode": "1.4.1" - } - }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -1255,6 +1235,16 @@ "y18n": "^4.0.0" }, "dependencies": { + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", @@ -1529,24 +1519,24 @@ } }, "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { - "color-name": "1.1.1" + "color-name": "1.1.3" } }, "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "colors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.0.tgz", - "integrity": "sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", + "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", "dev": true }, "combine-lists": { @@ -1568,9 +1558,9 @@ } }, "commander": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz", - "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, "commondir": { @@ -1580,9 +1570,9 @@ "dev": true }, "compare-versions": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.0.tgz", - "integrity": "sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.3.1.tgz", + "integrity": "sha512-GkIcfJ9sDt4+gS+RWH3X+kR7ezuKdu3fg2oA9nRA8HZoqZwAKv3ml3TyfB9OyV2iFXxCw7q5XfV6SyPbSCT2pw==", "dev": true }, "component-bind": { @@ -1749,15 +1739,18 @@ "requires": { "lru-cache": "^4.0.1", "which": "^1.2.9" - } - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "dev": true, - "requires": { - "boom": "2.x.x" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + } } }, "crypto-browserify": { @@ -1818,13 +1811,6 @@ "assert-plus": "^1.0.0" } }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", - "dev": true, - "optional": true - }, "date-format": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz", @@ -1867,13 +1853,6 @@ "type-detect": "^4.0.0" } }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true, - "optional": true - }, "default-require-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", @@ -1884,13 +1863,12 @@ } }, "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "foreach": "^2.0.5", - "object-keys": "^1.0.8" + "object-keys": "^1.0.12" } }, "define-property": { @@ -1934,18 +1912,6 @@ } } }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "dev": true, - "optional": true, - "requires": { - "ast-types": "0.x.x", - "escodegen": "1.x.x", - "esprima": "3.x.x" - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2024,13 +1990,6 @@ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, - "double-ended-queue": { - "version": "2.1.0-0", - "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", - "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", - "dev": true, - "optional": true - }, "duplexify": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", @@ -2044,13 +2003,14 @@ } }, "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, "optional": true, "requires": { - "jsbn": "~0.1.0" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "ee-first": { @@ -2060,9 +2020,9 @@ "dev": true }, "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -2096,9 +2056,9 @@ } }, "engine.io": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz", - "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.0.tgz", + "integrity": "sha512-mRbgmAtQ4GAlKwuPnnAvXXwdPhEx+jkc0OBCLrXuD/CRvwNK3AxRSnqK4FSqmAMRRHryVJP8TopOvmEaA64fKw==", "dev": true, "requires": { "accepts": "~1.3.4", @@ -2106,7 +2066,6 @@ "cookie": "0.3.1", "debug": "~3.1.0", "engine.io-parser": "~2.1.0", - "uws": "~9.14.0", "ws": "~3.3.1" }, "dependencies": { @@ -2122,9 +2081,9 @@ } }, "engine.io-client": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.6.tgz", - "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", + "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", "dev": true, "requires": { "component-emitter": "1.2.1", @@ -2200,9 +2159,9 @@ } }, "es5-ext": { - "version": "0.10.45", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", - "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", + "version": "0.10.46", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz", + "integrity": "sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw==", "dev": true, "requires": { "es6-iterator": "~2.0.3", @@ -2221,21 +2180,6 @@ "es6-symbol": "^3.1.1" } }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", - "dev": true - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "dev": true, - "requires": { - "es6-promise": "^4.0.3" - } - }, "es6-symbol": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", @@ -2258,33 +2202,10 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "escodegen": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", - "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", - "dev": true, - "optional": true, - "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - } - } - }, "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -2292,9 +2213,9 @@ } }, "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esrecurse": { @@ -2434,9 +2355,9 @@ } }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, "extend-shallow": { @@ -2543,20 +2464,6 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true, - "optional": true - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -2651,9 +2558,9 @@ } }, "follow-redirects": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.1.tgz", - "integrity": "sha512-v9GI1hpaqq1ZZR6pBD1+kI7O24PhDvNGNodjS3MdcEqyrahCp8zbtpv+2B/krUnSmUH80lbAS7MrdeK5IylgKg==", + "version": "1.5.7", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.7.tgz", + "integrity": "sha512-NONJVIFiX7Z8k2WxfqBjtwqMifx7X42ORLFrOZ2LTKGj71G3C0kfdyTqGqr8fx5zSX6Foo/D95dgGWbPUiwnew==", "dev": true, "requires": { "debug": "^3.1.0" @@ -2685,12 +2592,6 @@ "for-in": "^1.0.1" } }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -3295,46 +3196,6 @@ "rimraf": "2" } }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "1.1.x", - "xregexp": "2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true, - "optional": true - } - } - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3366,23 +3227,6 @@ "globule": "^1.0.0" } }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=", - "dev": true, - "optional": true - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "dev": true, - "optional": true, - "requires": { - "is-property": "^1.0.0" - } - }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -3401,21 +3245,6 @@ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true }, - "get-uri": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.2.tgz", - "integrity": "sha512-ZD325dMZOgerGqF/rF6vZXyFGTAay62svjQIT+X/oU2PtxYpFxvSkbsdi+oxIrsNxlZVd4y8wUDqkaExWTI/Cw==", - "dev": true, - "optional": true, - "requires": { - "data-uri-to-buffer": "1", - "debug": "2", - "extend": "3", - "file-uri-to-path": "1", - "ftp": "~0.3.10", - "readable-stream": "2" - } - }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -3432,9 +3261,9 @@ } }, "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -3567,12 +3396,12 @@ "dev": true }, "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", "dev": true, "requires": { - "ajv": "^5.1.0", + "ajv": "^5.3.0", "har-schema": "^2.0.0" } }, @@ -3609,9 +3438,9 @@ "dev": true }, "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "has-symbols": { @@ -3678,35 +3507,12 @@ "minimalistic-assert": "^1.0.1" } }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "dev": true, - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, "he": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", "dev": true }, - "hipchat-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz", - "integrity": "sha1-ttJJdVQ3wZEII2d5nTupoPI7Ix4=", - "dev": true, - "optional": true, - "requires": { - "lodash": "^4.0.0", - "request": "^2.0.0" - } - }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -3718,12 +3524,6 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true - }, "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", @@ -3753,27 +3553,6 @@ "requires-port": "^1.0.0" } }, - "http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", - "dev": true, - "requires": { - "agent-base": "4", - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -3785,49 +3564,12 @@ "sshpk": "^1.7.0" } }, - "httpntlm": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.6.1.tgz", - "integrity": "sha1-rQFScUOi6Hc8+uapb1hla7UqNLI=", - "dev": true, - "requires": { - "httpreq": ">=0.4.22", - "underscore": "~1.7.0" - } - }, - "httpreq": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", - "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=", - "dev": true - }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", "dev": true }, - "https-proxy-agent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", - "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", - "dev": true, - "requires": { - "agent-base": "^4.1.0", - "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -3891,13 +3633,6 @@ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", "dev": true }, - "inflection": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", - "integrity": "sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=", - "dev": true, - "optional": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3929,12 +3664,6 @@ "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -4084,27 +3813,6 @@ "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", "dev": true }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==", - "dev": true, - "optional": true - }, - "is-my-json-valid": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", - "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", - "dev": true, - "optional": true, - "requires": { - "generate-function": "^2.0.0", - "generate-object-property": "^1.1.0", - "is-my-ip-valid": "^1.0.0", - "jsonpointer": "^4.0.0", - "xtend": "^4.0.0" - } - }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -4146,20 +3854,6 @@ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", "dev": true }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true, - "optional": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true, - "optional": true - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -4185,10 +3879,13 @@ "dev": true }, "isbinaryfile": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz", - "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=", - "dev": true + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } }, "isexe": { "version": "2.0.0", @@ -4209,9 +3906,9 @@ "dev": true }, "istanbul-api": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.1.tgz", - "integrity": "sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.6.tgz", + "integrity": "sha512-luJDnB1uJ5Qsg/WwusGfNXayQ4598yDgW5S0nUS85T576m1LVJzSqLrCDULkT6sTQXVKHa54093gNuCKumMCjQ==", "dev": true, "requires": { "async": "^2.1.4", @@ -4219,13 +3916,38 @@ "fileset": "^2.0.2", "istanbul-lib-coverage": "^1.2.0", "istanbul-lib-hook": "^1.2.0", - "istanbul-lib-instrument": "^1.10.1", + "istanbul-lib-instrument": "^2.1.0", "istanbul-lib-report": "^1.1.4", - "istanbul-lib-source-maps": "^1.2.4", - "istanbul-reports": "^1.3.0", + "istanbul-lib-source-maps": "^1.2.5", + "istanbul-reports": "^1.4.1", "js-yaml": "^3.7.0", "mkdirp": "^0.5.1", "once": "^1.4.0" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", + "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", + "dev": true, + "requires": { + "@babel/generator": "7.0.0-beta.51", + "@babel/parser": "7.0.0-beta.51", + "@babel/template": "7.0.0-beta.51", + "@babel/traverse": "7.0.0-beta.51", + "@babel/types": "7.0.0-beta.51", + "istanbul-lib-coverage": "^2.0.1", + "semver": "^5.5.0" + }, + "dependencies": { + "istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "dev": true + } + } + } } }, "istanbul-instrumenter-loader": { @@ -4282,6 +4004,12 @@ "supports-color": "^3.1.2" }, "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", @@ -4318,18 +4046,18 @@ } }, "istanbul-reports": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.3.0.tgz", - "integrity": "sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.0.tgz", + "integrity": "sha512-HeZG0WHretI9FXBni5wZ9DOgNziqDCEwetxnme5k1Vv5e81uTqcsy3fMH99gXGDGKr1ea87TyGseDMa2h4HEUA==", "dev": true, "requires": { - "handlebars": "^4.0.3" + "handlebars": "^4.0.11" } }, "js-base64": { - "version": "2.4.6", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.6.tgz", - "integrity": "sha512-O9SR2NVICx6rCqh1qsU91QZ5IoNa+2T1ROJ0OQlfvATKGmnjsAvg3r0E5ufPZ4a95jdKTPXhFWiE/sOZ7a5Rtg==", + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", + "integrity": "sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ==", "dev": true }, "js-tokens": { @@ -4346,14 +4074,6 @@ "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } } }, "jsbn": { @@ -4387,15 +4107,6 @@ "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", "dev": true }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -4408,19 +4119,6 @@ "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=", - "dev": true, - "optional": true - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4434,15 +4132,15 @@ } }, "just-extend": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", - "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-3.0.0.tgz", + "integrity": "sha512-Fu3T6pKBuxjWT/p4DkqGHFRsysc8OauWr4ZRTY9dIx07Y9O0RkoR5jcv28aeD1vuAwhm3nLkDurwLXoALp4DpQ==", "dev": true }, "karma": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.4.tgz", - "integrity": "sha512-32yhTwoi6BZgJZhR78GwhzyFABbYG/1WwQqYgY7Vh96Demvua2jM3+FyRltIMTUH/Kd5xaQvDw2L7jTvkYFeXg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/karma/-/karma-3.0.0.tgz", + "integrity": "sha512-ZTjyuDXVXhXsvJ1E4CnZzbCjSxD6sEdzEsFYogLuZM0yqvg/mgz+O+R1jb0J7uAQeuzdY8kJgx6hSNXLwFuHIQ==", "dev": true, "requires": { "bluebird": "^3.3.0", @@ -4460,15 +4158,15 @@ "http-proxy": "^1.13.0", "isbinaryfile": "^3.0.0", "lodash": "^4.17.4", - "log4js": "^2.5.3", - "mime": "^1.3.4", + "log4js": "^3.0.0", + "mime": "^2.3.1", "minimatch": "^3.0.2", "optimist": "^0.6.1", "qjobs": "^1.1.4", "range-parser": "^1.2.0", "rimraf": "^2.6.0", "safe-buffer": "^5.0.1", - "socket.io": "2.0.4", + "socket.io": "2.1.1", "source-map": "^0.6.1", "tmp": "0.0.33", "useragent": "2.2.1" @@ -4499,9 +4197,9 @@ } }, "karma-coverage-istanbul-reporter": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.1.tgz", - "integrity": "sha512-UcgrHkFehI5+ivMouD8NH/UOHiX4oCAtwaANylzPFdcAuD52fnCUuelacq2gh8tZ4ydhU3+xiXofSq7j5Ehygw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.2.tgz", + "integrity": "sha512-IIIrfsfYJKkAyyjRrBx8CZRl2UXi2OSrxKRAA95mkpOMF3Zw5FpjE+v79pWuwu1Keu0pdjcfElmmOuAEjFQshA==", "dev": true, "requires": { "istanbul-api": "^1.3.1", @@ -4568,12 +4266,6 @@ "supports-color": "^5.3.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -4584,9 +4276,9 @@ } }, "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -4657,48 +4349,6 @@ "invert-kv": "^1.0.0" } }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "optional": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "libbase64": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz", - "integrity": "sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY=", - "dev": true - }, - "libmime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/libmime/-/libmime-3.0.0.tgz", - "integrity": "sha1-UaGp50SOy9Ms2lRCFnW7IbwJPaY=", - "dev": true, - "requires": { - "iconv-lite": "0.4.15", - "libbase64": "0.1.0", - "libqp": "1.1.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", - "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=", - "dev": true - } - } - }, - "libqp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/libqp/-/libqp-1.1.0.tgz", - "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=", - "dev": true - }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -4823,16 +4473,10 @@ "supports-color": "^5.3.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -4841,23 +4485,15 @@ } }, "log4js": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.11.0.tgz", - "integrity": "sha512-z1XdwyGFg8/WGkOyF6DPJjivCWNLKrklGdViywdYnSKOvgtEBo2UyEMZS5sD2mZrQlU3TvO8wDWLc8mzE1ncBQ==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-3.0.5.tgz", + "integrity": "sha512-IX5c3G/7fuTtdr0JjOT2OIR12aTESVhsH6cEsijloYwKgcPRlO6DgOU72v0UFhWcoV1HN6+M3dwT89qVPLXm0w==", "dev": true, "requires": { - "amqplib": "^0.5.2", - "axios": "^0.15.3", - "circular-json": "^0.5.4", + "circular-json": "^0.5.5", "date-format": "^1.2.0", "debug": "^3.1.0", - "hipchat-notifier": "^1.1.0", - "loggly": "^1.1.0", - "mailgun-js": "^0.18.0", - "nodemailer": "^2.5.0", - "redis": "^2.7.1", - "semver": "^5.5.0", - "slack-node": "~0.2.0", + "rfdc": "^1.1.2", "streamroller": "0.7.0" }, "dependencies": { @@ -4872,129 +4508,6 @@ } } }, - "loggly": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/loggly/-/loggly-1.1.1.tgz", - "integrity": "sha1-Cg/B0/o6XsRP3HuJe+uipGlc6+4=", - "dev": true, - "optional": true, - "requires": { - "json-stringify-safe": "5.0.x", - "request": "2.75.x", - "timespan": "2.3.x" - }, - "dependencies": { - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true, - "optional": true - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=", - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.0.0.tgz", - "integrity": "sha1-bwrrrcxdoWwT4ezBETfYX5uIOyU=", - "dev": true, - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.11" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "dev": true, - "optional": true, - "requires": { - "chalk": "^1.1.1", - "commander": "^2.9.0", - "is-my-json-valid": "^2.12.4", - "pinkie-promise": "^2.0.0" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "optional": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=", - "dev": true, - "optional": true - }, - "qs": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", - "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=", - "dev": true, - "optional": true - }, - "request": { - "version": "2.75.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz", - "integrity": "sha1-0rgmiihtoT6qXQGt9dGMyQ9lfZM=", - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "bl": "~1.1.2", - "caseless": "~0.11.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.0.0", - "har-validator": "~2.0.6", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "node-uuid": "~1.4.7", - "oauth-sign": "~0.8.1", - "qs": "~6.2.0", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "~0.4.1" - } - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=", - "dev": true, - "optional": true - } - } - }, "loglevelnext": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", @@ -5043,55 +4556,10 @@ } }, "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "mailcomposer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mailcomposer/-/mailcomposer-4.0.1.tgz", - "integrity": "sha1-DhxEsqB890DuF9wUm6AJ8Zyt/rQ=", - "dev": true, - "optional": true, - "requires": { - "buildmail": "4.0.1", - "libmime": "3.0.0" - } - }, - "mailgun-js": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/mailgun-js/-/mailgun-js-0.18.1.tgz", - "integrity": "sha512-lvuMP14u24HS2uBsJEnzSyPMxzU2b99tQsIx1o6QNjqxjk8b3WvR+vq5oG1mjqz/IBYo+5gF+uSoDS0RkMVHmg==", - "dev": true, - "optional": true, - "requires": { - "async": "~2.6.0", - "debug": "~3.1.0", - "form-data": "~2.3.0", - "inflection": "~1.12.0", - "is-stream": "^1.1.0", - "path-proxy": "~1.0.0", - "promisify-call": "^2.0.2", - "proxy-agent": "~3.0.0", - "tsscmp": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - } - } + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", + "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", + "dev": true }, "make-dir": { "version": "1.3.0", @@ -5227,24 +4695,24 @@ } }, "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", "dev": true }, "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", "dev": true }, "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "version": "2.1.20", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", "dev": true, "requires": { - "mime-db": "~1.33.0" + "mime-db": "~1.36.0" } }, "minimalistic-assert": { @@ -5349,12 +4817,6 @@ "supports-color": "5.4.0" }, "dependencies": { - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -5364,11 +4826,19 @@ "ms": "2.0.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } }, "supports-color": { "version": "5.4.0", @@ -5402,9 +4872,9 @@ "dev": true }, "nan": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", - "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", + "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", "dev": true }, "nanomatch": { @@ -5433,18 +4903,11 @@ "dev": true }, "neo-async": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", - "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.2.tgz", + "integrity": "sha512-vdqTKI9GBIYcAEbFAcpKPErKINfPF5zIuz3/niBfq8WUZjpT2tytLlFVrBgWdOtqI4uaA/Rb6No0hux39XXDuw==", "dev": true }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", - "dev": true, - "optional": true - }, "next-tick": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", @@ -5452,22 +4915,22 @@ "dev": true }, "nise": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", - "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.4.tgz", + "integrity": "sha512-pxE0c9PzgrUTyhfv5p+5eMIdfU2bLEsq8VQEuE0kxM4zP7SujSar7rk9wpI2F7RyyCEvLyj5O7Is3RER5F36Fg==", "dev": true, "requires": { "@sinonjs/formatio": "^2.0.0", - "just-extend": "^1.1.27", + "just-extend": "^3.0.0", "lolex": "^2.3.2", "path-to-regexp": "^1.7.0", "text-encoding": "^0.6.4" } }, "node-gyp": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.7.0.tgz", - "integrity": "sha512-qDQE/Ft9xXP6zphwx4sD0t+VhwV7yFaloMpfbL2QnnDZcyaiakWlLdtFGGQfTAwpFHdpbRhRxVhIHN1OKAjgbg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", + "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", "dev": true, "requires": { "fstream": "^1.0.0", @@ -5477,115 +4940,13 @@ "nopt": "2 || 3", "npmlog": "0 || 1 || 2 || 3 || 4", "osenv": "0", - "request": ">=2.9.0 <2.82.0", + "request": "^2.87.0", "rimraf": "2", "semver": "~5.3.0", "tar": "^2.0.0", "which": "1" }, "dependencies": { - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "dev": true, - "requires": { - "co": "^4.6.0", - "json-stable-stringify": "^1.0.1" - } - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=", - "dev": true - }, - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", - "dev": true - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.5", - "mime-types": "^2.1.12" - } - }, - "har-schema": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", - "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=", - "dev": true - }, - "har-validator": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz", - "integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=", - "dev": true, - "requires": { - "ajv": "^4.9.1", - "har-schema": "^1.0.5" - } - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "dev": true, - "requires": { - "assert-plus": "^0.2.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "performance-now": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", - "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=", - "dev": true - }, - "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=", - "dev": true - }, - "request": { - "version": "2.81.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", - "integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=", - "dev": true, - "requires": { - "aws-sign2": "~0.6.0", - "aws4": "^1.2.1", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.0", - "forever-agent": "~0.6.1", - "form-data": "~2.1.1", - "har-validator": "~4.2.1", - "hawk": "~3.1.3", - "http-signature": "~1.1.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.7", - "oauth-sign": "~0.8.1", - "performance-now": "^0.2.0", - "qs": "~6.4.0", - "safe-buffer": "^5.0.1", - "stringstream": "~0.0.4", - "tough-cookie": "~2.3.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.0.0" - } - }, "semver": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", @@ -5626,9 +4987,9 @@ } }, "node-sass": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.2.tgz", - "integrity": "sha512-LdxoJLZutx0aQXHtWIYwJKMj+9pTjneTcLWJgzf2XbGu0q5pRNqW5QvFCEdm3mc5rJOdru/mzln5d0EZLacf6g==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.3.tgz", + "integrity": "sha512-XzXyGjO+84wxyH7fV6IwBOTrEBe2f0a6SBze9QWWYR/cL74AcQUks2AsqcCZenl/Fp/JVbuEaLpgrLtocwBUww==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -5644,99 +5005,69 @@ "meow": "^3.7.0", "mkdirp": "^0.5.1", "nan": "^2.10.0", - "node-gyp": "^3.3.1", + "node-gyp": "^3.8.0", "npmlog": "^4.0.0", "request": "2.87.0", "sass-graph": "^2.2.4", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" - } - }, - "nodemailer": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz", - "integrity": "sha1-8kLmSa7q45tsftdA73sGHEBNMPk=", - "dev": true, - "optional": true, - "requires": { - "libmime": "3.0.0", - "mailcomposer": "4.0.1", - "nodemailer-direct-transport": "3.3.2", - "nodemailer-shared": "1.1.0", - "nodemailer-smtp-pool": "2.8.2", - "nodemailer-smtp-transport": "2.7.2", - "socks": "1.1.9" }, "dependencies": { - "socks": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.9.tgz", - "integrity": "sha1-Yo1+TQSRJDVEWsC25Fk3bLPm1pE=", + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "dev": true, - "optional": true, "requires": { - "ip": "^1.1.2", - "smart-buffer": "^1.0.4" + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "request": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", + "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + } + }, + "tough-cookie": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", + "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "dev": true, + "requires": { + "punycode": "^1.4.1" } } } }, - "nodemailer-direct-transport": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/nodemailer-direct-transport/-/nodemailer-direct-transport-3.3.2.tgz", - "integrity": "sha1-6W+vuQNYVglH5WkBfZfmBzilCoY=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-fetch": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz", - "integrity": "sha1-ecSQihwPXzdbc/6IjamCj23JY6Q=", - "dev": true - }, - "nodemailer-shared": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz", - "integrity": "sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA=", - "dev": true, - "requires": { - "nodemailer-fetch": "1.6.0" - } - }, - "nodemailer-smtp-pool": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/nodemailer-smtp-pool/-/nodemailer-smtp-pool-2.8.2.tgz", - "integrity": "sha1-LrlNbPhXgLG0clzoU7nL1ejajHI=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "nodemailer-wellknown": "0.1.10", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-smtp-transport": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/nodemailer-smtp-transport/-/nodemailer-smtp-transport-2.7.2.tgz", - "integrity": "sha1-A9ccdjFPFKx9vHvwM6am0W1n+3c=", - "dev": true, - "optional": true, - "requires": { - "nodemailer-shared": "1.1.0", - "nodemailer-wellknown": "0.1.10", - "smtp-connection": "2.12.0" - } - }, - "nodemailer-wellknown": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/nodemailer-wellknown/-/nodemailer-wellknown-0.1.10.tgz", - "integrity": "sha1-WG24EB2zDLRDjrVGc3pBqtDPE9U=", - "dev": true - }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -5792,9 +5123,9 @@ "dev": true }, "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, "object-assign": { @@ -5923,30 +5254,6 @@ "wordwrap": "~0.0.2" } }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "optional": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - }, - "dependencies": { - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true, - "optional": true - } - } - }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -5979,89 +5286,35 @@ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pac-proxy-agent": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.2.tgz", - "integrity": "sha512-cDNAN1Ehjbf5EHkNY5qnRhGPUCp6SnpyVof5fRzN800QV1Y2OkzbH9rmjZkbBRa8igof903yOnjIl6z0SlAhxA==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "^4.2.0", - "debug": "^3.1.0", - "get-uri": "^2.0.0", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "pac-resolver": "^3.0.0", - "raw-body": "^2.2.0", - "socks-proxy-agent": "^3.0.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "^4.1.0", - "socks": "^1.1.10" - } - } + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, - "optional": true, "requires": { - "co": "^4.6.0", - "degenerator": "^1.0.4", - "ip": "^1.1.5", - "netmask": "^1.0.6", - "thunkify": "^2.1.2" + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" } }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, "pako": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", @@ -6188,30 +5441,11 @@ "dev": true }, "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "path-proxy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-proxy/-/path-proxy-1.0.0.tgz", - "integrity": "sha1-GOijaFn8nS8aU7SN7hOFQ8Ag3l4=", - "dev": true, - "optional": true, - "requires": { - "inflection": "~1.3.0" - }, - "dependencies": { - "inflection": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.3.8.tgz", - "integrity": "sha1-y9Fg2p91sUw8xjV41POWeEvzAU4=", - "dev": true, - "optional": true - } - } - }, "path-to-regexp": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", @@ -6312,12 +5546,6 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -6342,52 +5570,6 @@ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, - "promisify-call": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/promisify-call/-/promisify-call-2.0.4.tgz", - "integrity": "sha1-1IwtRWUszM1SgB3ey9UzptS9X7o=", - "dev": true, - "optional": true, - "requires": { - "with-callback": "^1.0.2" - } - }, - "proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-3.0.1.tgz", - "integrity": "sha512-mAZexaz9ZxQhYPWfAjzlrloEjW+JHiBFryE4AJXFDTnaXfmH/FKqC1swTRKuEPbHWz02flQNXFOyDUF7zfEG6A==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "^4.2.0", - "debug": "^3.1.0", - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1", - "lru-cache": "^4.1.2", - "pac-proxy-agent": "^2.0.1", - "proxy-from-env": "^1.0.0", - "socks-proxy-agent": "^4.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "proxy-from-env": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", - "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=", - "dev": true, - "optional": true - }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -6400,6 +5582,12 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true + }, "public-encrypt": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", @@ -6465,9 +5653,9 @@ "dev": true }, "randomatic": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", - "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", + "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", "dev": true, "requires": { "is-number": "^4.0.0", @@ -6584,32 +5772,6 @@ "strip-indent": "^1.0.1" } }, - "redis": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", - "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", - "dev": true, - "optional": true, - "requires": { - "double-ended-queue": "^2.1.0-0", - "redis-commands": "^1.2.0", - "redis-parser": "^2.6.0" - } - }, - "redis-commands": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.3.5.tgz", - "integrity": "sha512-foGF8u6MXGFF++1TZVC6icGXuMYPftKXt1FBT2vrfU9ZATNtZJ8duRC5d1lEfE8hyVe3jhelHGB91oB7I6qLsA==", - "dev": true, - "optional": true - }, - "redis-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", - "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=", - "dev": true, - "optional": true - }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", @@ -6642,9 +5804,9 @@ "dev": true }, "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", "dev": true }, "repeat-string": { @@ -6663,44 +5825,31 @@ } }, "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, "requires": { "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", + "aws4": "^1.8.0", "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "requestretry": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.13.0.tgz", - "integrity": "sha512-Lmh9qMvnQXADGAQxsXHP4rbgO6pffCfuR8XUBdP9aitJcLQJxhp7YZK4xAVYXnPJ5E52mwrfiKQtKonPL8xsmg==", - "dev": true, - "optional": true, - "requires": { - "extend": "^3.0.0", - "lodash": "^4.15.0", - "request": "^2.74.0", - "when": "^3.7.7" + "uuid": "^3.3.2" } }, "require-directory": { @@ -6745,6 +5894,12 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "rfdc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.2.tgz", + "integrity": "sha512-92ktAgvZhBzYTIK0Mja9uen5q5J3NRVMoDkJL2VMwq6SXjVCgqvQeVP2XAaUY6HT+XpQYeLSjb3UoitBryKmdA==", + "dev": true + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -6775,9 +5930,9 @@ } }, "rollup": { - "version": "0.62.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.62.0.tgz", - "integrity": "sha512-mZS0aIGfYzuJySJD78znu9/hCJsNfBzg4lDuZGMj0hFVcYHt2evNRHv8aqiu9/w6z6Qn8AQoVl4iyEjDmisGeA==", + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.65.0.tgz", + "integrity": "sha512-en95i7zwW5IiWay6DR/6QV8TxO2LvWuCjHYDcgP96oVG/gPnWWzsxNViObhoJUs17bAj2RgB67WuBuGmysZZcw==", "dev": true, "requires": { "@types/estree": "0.0.39", @@ -6833,6 +5988,12 @@ "uglify-js": "^3.3.25" }, "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -6840,21 +6001,21 @@ "dev": true }, "uglify-js": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.4.tgz", - "integrity": "sha512-RiB1kNcC9RMyqwRrjXC+EjgLoXULoDnCaOnEDzUCHkBN0bHwmtF5rzDMiDWU29gu0kXCRRWwtcTAVFWRECmU2Q==", + "version": "3.4.8", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.8.tgz", + "integrity": "sha512-WatYTD84gP/867bELqI2F/2xC9PQBETn/L+7RGq9MQOA/7yFBNvY1UwXqvtILeE6n0ITwBXxp34M0/o70dzj6A==", "dev": true, "requires": { - "commander": "~2.16.0", + "commander": "~2.17.1", "source-map": "~0.6.1" } } } }, "rollup-pluginutils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.0.tgz", - "integrity": "sha512-xB6hsRsjdJdIYWEyYUJy/3ki5g69wrf0luHPGNK3ZSocV6HLNfio59l3dZ3TL4xUwEKgROhFi9jOCt6c5gfUWw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.1.tgz", + "integrity": "sha512-JZS8aJMHEHhqmY2QVPMXwKP6lsD1ShkrcGYjhAIvqKKdXQyPHw/9NF0tl3On/xOJ4ACkxfeG7AF+chfCN1NpBg==", "dev": true, "requires": { "estree-walker": "^0.5.2", @@ -7289,9 +6450,9 @@ } }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", "dev": true }, "serialize-javascript": { @@ -7364,31 +6525,26 @@ "dev": true }, "sinon": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.3.tgz", - "integrity": "sha512-yeTza8xIZZdiXntCHJAzKll/sSYE+DuJOS8hiSapzaLqdW8eCNVVC9je9SZYYTkPm2bLts9x6UYxwuMAVVrM6Q==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.5.tgz", + "integrity": "sha512-TcbRoWs1SdY6NOqfj0c9OEQquBoZH+qEf8799m1jjcbfWrrpyCQ3B/BpX7+NKa7Vn33Jl+Z50H4Oys3bzygK2Q==", "dev": true, "requires": { + "@sinonjs/commons": "^1.0.1", "@sinonjs/formatio": "^2.0.0", "@sinonjs/samsam": "^2.0.0", "diff": "^3.5.0", "lodash.get": "^4.4.2", - "lolex": "^2.4.2", - "nise": "^1.3.3", + "lolex": "^2.7.1", + "nise": "^1.4.2", "supports-color": "^5.4.0", "type-detect": "^4.0.8" }, "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -7402,33 +6558,6 @@ "integrity": "sha512-Z72B4a0l0IQe5uWi9yzcqX/Ml6K9e1Hp03NmkjJnRG3gDsKTX7KvLFZsVUmCaz0eqeXLLK089mwTsP1P1W+DUQ==", "dev": true }, - "slack-node": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/slack-node/-/slack-node-0.2.0.tgz", - "integrity": "sha1-3kuN3aqLeT9h29KTgQT9q/N9+jA=", - "dev": true, - "optional": true, - "requires": { - "requestretry": "^1.2.2" - } - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", - "dev": true, - "optional": true - }, - "smtp-connection": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", - "integrity": "sha1-1275EnyyPCJZ7bHoNJwujV4tdME=", - "dev": true, - "requires": { - "httpntlm": "1.6.1", - "nodemailer-shared": "1.1.0" - } - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -7536,26 +6665,29 @@ } } }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "dev": true, - "requires": { - "hoek": "2.x.x" - } - }, "socket.io": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz", - "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz", + "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==", "dev": true, "requires": { - "debug": "~2.6.6", - "engine.io": "~3.1.0", + "debug": "~3.1.0", + "engine.io": "~3.2.0", + "has-binary2": "~1.0.2", "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.0.4", - "socket.io-parser": "~3.1.1" + "socket.io-client": "2.1.1", + "socket.io-parser": "~3.2.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "socket.io-adapter": { @@ -7565,35 +6697,46 @@ "dev": true }, "socket.io-client": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz", - "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz", + "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==", "dev": true, "requires": { "backo2": "1.0.2", "base64-arraybuffer": "0.1.5", "component-bind": "1.0.0", "component-emitter": "1.2.1", - "debug": "~2.6.4", - "engine.io-client": "~3.1.0", + "debug": "~3.1.0", + "engine.io-client": "~3.2.0", + "has-binary2": "~1.0.2", "has-cors": "1.1.0", "indexof": "0.0.1", "object-component": "0.0.3", "parseqs": "0.0.5", "parseuri": "0.0.5", - "socket.io-parser": "~3.1.1", + "socket.io-parser": "~3.2.0", "to-array": "0.1.4" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, "socket.io-parser": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.3.tgz", - "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", + "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", "dev": true, "requires": { "component-emitter": "1.2.1", "debug": "~3.1.0", - "has-binary2": "~1.0.2", "isarray": "2.0.1" }, "dependencies": { @@ -7614,48 +6757,6 @@ } } }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "dev": true, - "optional": true, - "requires": { - "ip": "^1.1.4", - "smart-buffer": "^1.0.13" - } - }, - "socks-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz", - "integrity": "sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw==", - "dev": true, - "optional": true, - "requires": { - "agent-base": "~4.2.0", - "socks": "~2.2.0" - }, - "dependencies": { - "smart-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.1.tgz", - "integrity": "sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg==", - "dev": true, - "optional": true - }, - "socks": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.2.1.tgz", - "integrity": "sha512-0GabKw7n9mI46vcNrVfs0o6XzWzjVa3h6GaSo2UPxtWAROXUWavfJWh1M4PR5tnE0dcnQXZIDFP4yrAysLze/w==", - "dev": true, - "optional": true, - "requires": { - "ip": "^1.1.5", - "smart-buffer": "^4.0.1" - } - } - } - }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", @@ -7788,9 +6889,9 @@ "dev": true }, "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", + "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", "dev": true, "requires": { "readable-stream": "^2.0.1" @@ -7807,9 +6908,9 @@ } }, "stream-each": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.2.tgz", - "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -7878,12 +6979,6 @@ "safe-buffer": "~5.1.0" } }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==", - "dev": true - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -7953,13 +7048,6 @@ "xtend": "~4.0.1" } }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", - "dev": true, - "optional": true - }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", @@ -7969,13 +7057,6 @@ "setimmediate": "^1.0.4" } }, - "timespan": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/timespan/-/timespan-2.3.0.tgz", - "integrity": "sha1-SQLOBAvRPYRcj1myfp1ZutbzmSk=", - "dev": true, - "optional": true - }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -8046,11 +7127,12 @@ } }, "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { + "psl": "^1.1.24", "punycode": "^1.4.1" } }, @@ -8067,27 +7149,12 @@ "dev": true }, "true-case-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", + "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", "dev": true, "requires": { - "glob": "^6.0.4" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } + "glob": "^7.1.2" } }, "tslib": { @@ -8096,13 +7163,6 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tsscmp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz", - "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc=", - "dev": true, - "optional": true - }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -8125,15 +7185,6 @@ "dev": true, "optional": true }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -8176,9 +7227,9 @@ "optional": true }, "uglifyjs-webpack-plugin": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz", - "integrity": "sha512-1VicfKhCYHLS8m1DCApqBhoulnASsEoJ/BvpUpP4zoNAPpKzdH+ghk0olGJMmwX2/jprK2j3hAHdUbczBSy2FA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", + "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", "dev": true, "requires": { "cacache": "^10.0.4", @@ -8192,15 +7243,15 @@ }, "dependencies": { "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", + "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "uri-js": "^4.2.2" } }, "commander": { @@ -8222,9 +7273,9 @@ "dev": true }, "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", + "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", "dev": true, "requires": { "ajv": "^6.1.0", @@ -8255,12 +7306,6 @@ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", "dev": true }, - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", - "dev": true - }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", @@ -8433,14 +7478,6 @@ "requires": { "lru-cache": "2.2.x", "tmp": "0.0.x" - }, - "dependencies": { - "lru-cache": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", - "dev": true - } } }, "util": { @@ -8470,17 +7507,10 @@ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, - "uws": { - "version": "9.14.0", - "resolved": "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz", - "integrity": "sha512-HNMztPP5A1sKuVFmdZ6BPVpBQd5bUjNC8EFMFiICK+oho/OQsAJy5hnIx4btMHiOk8j04f/DbIlqnEZ9d72dqg==", - "dev": true, - "optional": true - }, "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -8525,9 +7555,9 @@ } }, "webpack": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.16.0.tgz", - "integrity": "sha512-oNx9djAd6uAcccyfqN3hyXLNMjZHiRySZmBQ4c8FNmf1SNJGhx7n9TSvHNyXxgToRdH65g/Q97s94Ip9N6F7xg==", + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.17.1.tgz", + "integrity": "sha512-vdPYogljzWPhFKDj3Gcp01Vqgu7K3IQlybc3XIdKSQHelK1C3eIQuysEUR7MxKJmdandZlQB/9BG2Jb1leJHaw==", "dev": true, "requires": { "@webassemblyjs/ast": "1.5.13", @@ -8541,7 +7571,7 @@ "ajv-keywords": "^3.1.0", "chrome-trace-event": "^1.0.0", "enhanced-resolve": "^4.1.0", - "eslint-scope": "^3.7.1", + "eslint-scope": "^4.0.0", "json-parse-better-errors": "^1.0.2", "loader-runner": "^2.3.0", "loader-utils": "^1.1.0", @@ -8558,15 +7588,15 @@ }, "dependencies": { "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", + "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "uri-js": "^4.2.2" } }, "fast-deep-equal": { @@ -8582,9 +7612,9 @@ "dev": true }, "schema-utils": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.5.tgz", - "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", + "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", "dev": true, "requires": { "ajv": "^6.1.0", @@ -8606,14 +7636,6 @@ "range-parser": "^1.0.3", "url-join": "^2.0.2", "webpack-log": "^1.0.1" - }, - "dependencies": { - "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", - "dev": true - } } }, "webpack-log": { @@ -8648,16 +7670,10 @@ "supports-color": "^5.3.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -8683,13 +7699,6 @@ } } }, - "when": { - "version": "3.7.8", - "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", - "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=", - "dev": true, - "optional": true - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -8721,13 +7730,6 @@ "dev": true, "optional": true }, - "with-callback": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/with-callback/-/with-callback-1.0.2.tgz", - "integrity": "sha1-oJYpuakgAo1yFAT7Q1vc/1yRvCE=", - "dev": true, - "optional": true - }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -8776,13 +7778,6 @@ "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", "dev": true }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", - "dev": true, - "optional": true - }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", diff --git a/package.json b/package.json index 99ca79c4..6d7be7ae 100644 --- a/package.json +++ b/package.json @@ -40,10 +40,10 @@ "coffeelint": "^2.1.0", "coffeescript": "^1.12.7", "istanbul-instrumenter-loader": "^3.0.1", - "karma": "^2.0.4", + "karma": "^3.0.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", - "karma-coverage-istanbul-reporter": "^2.0.1", + "karma-coverage-istanbul-reporter": "^2.0.2", "karma-firefox-launcher": "^1.1.0", "karma-mocha": "^1.3.0", "karma-mocha-reporter": "^2.2.5", @@ -53,17 +53,17 @@ "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^3.0.0", "mocha": "^5.2.0", - "node-sass": "^4.9.2", + "node-sass": "^4.9.3", "octicons": "^8.0.0", "raw-loader": "^0.5.1", - "rollup": "^0.62.0", + "rollup": "^0.65.0", "rollup-plugin-coffee-script": "^2.0.0", "rollup-plugin-node-resolve": "^3.3.0", "rollup-plugin-uglify": "^4.0.0", "rollup-watch": "^4.3.1", - "sinon": "^6.1.3", + "sinon": "^6.1.5", "sinon-chai": "^3.2.0", - "webpack": "^4.16.0" + "webpack": "^4.17.1" }, "engines": { "node": ">=6.5.0" From 9b0f08b32630a21976c89cc187cda3bc26547dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 14 Nov 2018 00:06:58 -0800 Subject: [PATCH 0094/1193] Update font stack to match GitHub.com --- assets/css/buttons.css | 2 +- assets/js/app.js | 2 +- assets/js/app.min.js | 2 +- assets/scss/buttons.scss | 2 +- dist/buttons.common.js | 2 +- dist/buttons.esm.js | 2 +- dist/buttons.js | 2 +- dist/buttons.min.js | 2 +- package-lock.json | 1694 +++++++++++--------------- package.json | 24 +- test/unit/current-script.spec.coffee | 2 +- 11 files changed, 761 insertions(+), 975 deletions(-) diff --git a/assets/css/buttons.css b/assets/css/buttons.css index fc30a876..c9d6ad62 100644 --- a/assets/css/buttons.css +++ b/assets/css/buttons.css @@ -1 +1 @@ -body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0} +body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0} diff --git a/assets/js/app.js b/assets/js/app.js index 40a29006..29d55ad3 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -130,7 +130,7 @@ return options; }; - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index eee6bff5..e25cf6df 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,n=u.location,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)};s="github-button",l=(/^http:/.test(n)?"http":"https")+"://buttons.github.io",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,i;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},i=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var m,w,g,b,v,a,c,y,x,C,k="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n",z={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),z.hasOwnProperty(t)||(t="mark-github"),'"},g={},w=function(t,e){var o,n,r,i,a,s,c,l;1<(s=g[t]||(g[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete g[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},b=function(t,e,o){var r,i,n,a,s,c,l,u,d,h,p,f,g,b;e&&(n=this,c=t.ownerDocument,s=function(t){return c.createTextNode(t)},(l=(a=function(t){return c.createElement(t)})("style")).type="text/css",t.appendChild(l),l.styleSheet?l.styleSheet.cssText=k:l.appendChild(s(k)),(u=t.appendChild(a("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),i=function(){o&&o(u)},(d=a("a")).href=e.href,d.target="_blank",/\.github\.com$/.test("."+d.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(d.href)&&(d.target="_top"):(d.href="#",d.target="_self"),d.className="btn",(h=e["aria-label"])&&d.setAttribute("aria-label",h),d.innerHTML=m(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),d.appendChild(s(" ")),d.appendChild(a("span")).appendChild(s(e["data-text"]||"")),r=u.appendChild(d),/^(true|1)$/i.test(e["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?i():(g[2]?(p="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count",f="watchers"):g[4]?(b="forks_count",f="network"):g[5]?(b="open_issues_count",f="issues"):(b="stargazers_count",f="stargazers")):(p="/users/"+g[1],f=b="followers"),w.call(n,"https://api.github.com/"+p,function(t,e){var o,n;t||(n=e[b],(o=a("a")).href=e.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(a("b")),o.appendChild(a("i")),o.appendChild(a("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()})):i())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),z.hasOwnProperty(t)||(t="mark-github"),'"},g={},w=function(t,e){var o,n,r,i,a,s,c,l;1<(s=g[t]||(g[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete g[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},b=function(t,e,o){var r,i,n,a,s,c,l,u,d,h,p,f,g,b;e&&(n=this,c=t.ownerDocument,s=function(t){return c.createTextNode(t)},(l=(a=function(t){return c.createElement(t)})("style")).type="text/css",t.appendChild(l),l.styleSheet?l.styleSheet.cssText=k:l.appendChild(s(k)),(u=t.appendChild(a("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),i=function(){o&&o(u)},(d=a("a")).href=e.href,d.target="_blank",/\.github\.com$/.test("."+d.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(d.href)&&(d.target="_top"):(d.href="#",d.target="_self"),d.className="btn",(h=e["aria-label"])&&d.setAttribute("aria-label",h),d.innerHTML=m(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),d.appendChild(s(" ")),d.appendChild(a("span")).appendChild(s(e["data-text"]||"")),r=u.appendChild(d),/^(true|1)$/i.test(e["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?i():(g[2]?(p="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count",f="watchers"):g[4]?(b="forks_count",f="network"):g[5]?(b="open_issues_count",f="issues"):(b="stargazers_count",f="stargazers")):(p="/users/"+g[1],f=b="followers"),w.call(n,"https://api.github.com/"+p,function(t,e){var o,n;t||(n=e[b],(o=a("a")).href=e.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(a("b")),o.appendChild(a("i")),o.appendChild(a("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()})):i())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0"},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index 44b0f689..49dde0cf 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -83,7 +83,7 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; -var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; +var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.js b/dist/buttons.js index 3e1fc161..591a091e 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -145,7 +145,7 @@ return options; }; - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.min.js b/dist/buttons.min.js index 927d384c..5ae21e4f 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var d,l,s,e,t,o,h=window.document,n=h.location,p=window.encodeURIComponent,c=window.decodeURIComponent,r=window.Math,u=function(e){return h.createElement(e)};l="github-button",d=(/^http:/.test(n)?"http":"https")+"://buttons.github.io",s="/buttons.html",e=function(e){d=e},t="currentScript",o=!{}.hasOwnProperty.call(h,t)&&h[t]&&delete h[t]&&h[t]?h[t].src:void 0;var f,g,a;f=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},g=function(t,o,n){var r;f(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},a=function(e){var t,o;/m/.test(h.readyState)||!/g/.test(h.readyState)&&!h.documentElement.doScroll?setTimeout(e):h.addEventListener?(o=0,g(h,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),g(window,"load",t)):(t=function(){/m/.test(h.readyState)&&(h.detachEvent("onreadystatechange",t),e())},h.attachEvent("onreadystatechange",t))};var m,w,b,v,x,i,C,y,F,k,z="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n",E={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,h,p,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=z:d.appendChild(l(z)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(h=i("a")).href=t.href,h.target="_blank",/\.github\.com$/.test("."+h.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(h.href)&&(h.target="_top"):(h.href="#",h.target="_self"),h.className="btn",(p=t["aria-label"])&&h.setAttribute("aria-label",p),h.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),h.appendChild(l(" ")),h.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(h),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count",f="watchers"):g[4]?(b="forks_count",f="network"):g[5]?(b="open_issues_count",f="issues"):(b="stargazers_count",f="stargazers")):(u="/users/"+g[1],f=b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,h,p,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=z:d.appendChild(l(z)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(h=i("a")).href=t.href,h.target="_blank",/\.github\.com$/.test("."+h.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(h.href)&&(h.target="_top"):(h.href="#",h.target="_self"),h.className="btn",(p=t["aria-label"])&&h.setAttribute("aria-label",p),h.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),h.appendChild(l(" ")),h.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(h),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count",f="watchers"):g[4]?(b="forks_count",f="network"):g[5]?(b="open_issues_count",f="issues"):(b="stargazers_count",f="stargazers")):(u="/users/"+g[1],f=b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o=0.0.4" - } + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -3396,12 +3289,12 @@ "dev": true }, "har-validator": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", - "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "dev": true, "requires": { - "ajv": "^5.3.0", + "ajv": "^6.5.5", "har-schema": "^2.0.0" } }, @@ -3532,7 +3425,7 @@ }, "http-errors": { "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "dev": true, "requires": { @@ -3707,7 +3600,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, "requires": { @@ -3906,46 +3799,44 @@ "dev": true }, "istanbul-api": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.6.tgz", - "integrity": "sha512-luJDnB1uJ5Qsg/WwusGfNXayQ4598yDgW5S0nUS85T576m1LVJzSqLrCDULkT6sTQXVKHa54093gNuCKumMCjQ==", - "dev": true, - "requires": { - "async": "^2.1.4", - "compare-versions": "^3.1.0", - "fileset": "^2.0.2", - "istanbul-lib-coverage": "^1.2.0", - "istanbul-lib-hook": "^1.2.0", - "istanbul-lib-instrument": "^2.1.0", - "istanbul-lib-report": "^1.1.4", - "istanbul-lib-source-maps": "^1.2.5", - "istanbul-reports": "^1.4.1", - "js-yaml": "^3.7.0", - "mkdirp": "^0.5.1", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.0.6.tgz", + "integrity": "sha512-8W5oeAGWXhtTJjAyVfvavOLVyZCTNCKsyF6GON/INKlBdO7uJ/bv3qnPj5M6ERKzmMCJS1kntnjjGuJ86fn3rQ==", + "dev": true, + "requires": { + "async": "^2.6.1", + "compare-versions": "^3.2.1", + "fileset": "^2.0.3", + "istanbul-lib-coverage": "^2.0.1", + "istanbul-lib-hook": "^2.0.1", + "istanbul-lib-instrument": "^3.0.0", + "istanbul-lib-report": "^2.0.2", + "istanbul-lib-source-maps": "^2.0.1", + "istanbul-reports": "^2.0.1", + "js-yaml": "^3.12.0", + "make-dir": "^1.3.0", "once": "^1.4.0" }, "dependencies": { + "istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "dev": true + }, "istanbul-lib-instrument": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-2.3.2.tgz", - "integrity": "sha512-l7TD/VnBsIB2OJvSyxaLW/ab1+92dxZNH9wLH7uHPPioy3JZ8tnx2UXUdKmdkgmP2EFPzg64CToUP6dAS3U32Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.0.tgz", + "integrity": "sha512-eQY9vN9elYjdgN9Iv6NS/00bptm02EBBk70lRMaVjeA6QYocQgenVrSgC28TJurdnZa80AGO3ASdFN+w/njGiQ==", "dev": true, "requires": { - "@babel/generator": "7.0.0-beta.51", - "@babel/parser": "7.0.0-beta.51", - "@babel/template": "7.0.0-beta.51", - "@babel/traverse": "7.0.0-beta.51", - "@babel/types": "7.0.0-beta.51", + "@babel/generator": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/template": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", "istanbul-lib-coverage": "^2.0.1", "semver": "^5.5.0" - }, - "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", - "dev": true - } } } } @@ -3963,24 +3854,24 @@ } }, "istanbul-lib-coverage": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz", - "integrity": "sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", + "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==", "dev": true }, "istanbul-lib-hook": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz", - "integrity": "sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.1.tgz", + "integrity": "sha512-ufiZoiJ8CxY577JJWEeFuxXZoMqiKpq/RqZtOAYuQLvlkbJWscq9n3gc4xrCGH9n4pW0qnTxOz1oyMmVtk8E1w==", "dev": true, "requires": { "append-transform": "^1.0.0" } }, "istanbul-lib-instrument": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz", - "integrity": "sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", + "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", "dev": true, "requires": { "babel-generator": "^6.18.0", @@ -3988,72 +3879,98 @@ "babel-traverse": "^6.18.0", "babel-types": "^6.18.0", "babylon": "^6.18.0", - "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-coverage": "^1.2.1", "semver": "^5.3.0" } }, "istanbul-lib-report": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz", - "integrity": "sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.2.tgz", + "integrity": "sha512-rJ8uR3peeIrwAxoDEbK4dJ7cqqtxBisZKCuwkMtMv0xYzaAnsAi3AHrHPAAtNXzG/bcCgZZ3OJVqm1DTi9ap2Q==", "dev": true, "requires": { - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "path-parse": "^1.0.5", - "supports-color": "^3.1.2" + "istanbul-lib-coverage": "^2.0.1", + "make-dir": "^1.3.0", + "supports-color": "^5.4.0" }, "dependencies": { - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", "dev": true }, "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "has-flag": "^1.0.0" + "has-flag": "^3.0.0" } } } }, "istanbul-lib-source-maps": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz", - "integrity": "sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-2.0.1.tgz", + "integrity": "sha512-30l40ySg+gvBLcxTrLzR4Z2XTRj3HgRCA/p2rnbs/3OiTaoj054gAbuP5DcLOtwqmy4XW8qXBHzrmP2/bQ9i3A==", "dev": true, "requires": { "debug": "^3.1.0", - "istanbul-lib-coverage": "^1.2.0", - "mkdirp": "^0.5.1", - "rimraf": "^2.6.1", - "source-map": "^0.5.3" + "istanbul-lib-coverage": "^2.0.1", + "make-dir": "^1.3.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, "istanbul-reports": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.0.tgz", - "integrity": "sha512-HeZG0WHretI9FXBni5wZ9DOgNziqDCEwetxnme5k1Vv5e81uTqcsy3fMH99gXGDGKr1ea87TyGseDMa2h4HEUA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.0.1.tgz", + "integrity": "sha512-CT0QgMBJqs6NJLF678ZHcquUAZIoBIUNzdJrRJfpkI9OnzG6MkUfHxbJC3ln981dMswC7/B1mfX3LNkhgJxsuw==", "dev": true, "requires": { "handlebars": "^4.0.11" } }, + "jest-worker": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz", + "integrity": "sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk=", + "dev": true, + "requires": { + "merge-stream": "^1.0.1" + } + }, "js-base64": { "version": "2.4.9", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", @@ -4080,12 +3997,11 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, - "optional": true + "dev": true }, "jsesc": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4102,9 +4018,9 @@ "dev": true }, "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stringify-safe": { @@ -4115,7 +4031,7 @@ }, "json5": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, @@ -4138,9 +4054,9 @@ "dev": true }, "karma": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/karma/-/karma-3.0.0.tgz", - "integrity": "sha512-ZTjyuDXVXhXsvJ1E4CnZzbCjSxD6sEdzEsFYogLuZM0yqvg/mgz+O+R1jb0J7uAQeuzdY8kJgx6hSNXLwFuHIQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/karma/-/karma-3.1.1.tgz", + "integrity": "sha512-NetT3wPCQMNB36uiL9LLyhrOt8SQwrEKt0xD3+KpTCfm0VxVyUJdPL5oTq2Ic5ouemgL/Iz4wqXEbF3zea9kQQ==", "dev": true, "requires": { "bluebird": "^3.3.0", @@ -4197,12 +4113,12 @@ } }, "karma-coverage-istanbul-reporter": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.2.tgz", - "integrity": "sha512-IIIrfsfYJKkAyyjRrBx8CZRl2UXi2OSrxKRAA95mkpOMF3Zw5FpjE+v79pWuwu1Keu0pdjcfElmmOuAEjFQshA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.4.tgz", + "integrity": "sha512-xJS7QSQIVU6VK9HuJ/ieE5yynxKhjCCkd96NLY/BX/HXsx0CskU9JJiMQbd4cHALiddMwI4OWh1IIzeWrsavJw==", "dev": true, "requires": { - "istanbul-api": "^1.3.1", + "istanbul-api": "^2.0.5", "minimatch": "^3.0.4" } }, @@ -4223,7 +4139,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -4314,9 +4230,9 @@ } }, "karma-webpack": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-3.0.0.tgz", - "integrity": "sha512-Ja1o9LLoqWaJyUNhTKaXjWiEH9y7a9H3mzP8pYB30SBsgoF5KBS/65NeHFd+QPuT9ITrym8xFt8BZeGbcOfujA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-3.0.5.tgz", + "integrity": "sha512-nRudGJWstvVuA6Tbju9tyGUfXTtI1UXMXoRHVmM2/78D0q6s/Ye2IC157PKNDC15PWFGR0mVIRtWLAdcfsRJoA==", "dev": true, "requires": { "async": "^2.0.0", @@ -4333,13 +4249,6 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -4351,7 +4260,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4362,6 +4271,12 @@ "strip-bom": "^2.0.0" }, "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, "strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", @@ -4374,9 +4289,9 @@ } }, "loader-runner": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", - "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.1.tgz", + "integrity": "sha512-By6ZFY7ETWOc9RFaAIb23IjJVcM4dvJC/N57nmdz9RSkMXvAXGI7SyVlAw3v8vjtDRlqThgVDVmTnr9fqMlxkw==", "dev": true }, "loader-utils": { @@ -4409,9 +4324,9 @@ } }, "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, "lodash.assign": { @@ -4485,9 +4400,9 @@ } }, "log4js": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-3.0.5.tgz", - "integrity": "sha512-IX5c3G/7fuTtdr0JjOT2OIR12aTESVhsH6cEsijloYwKgcPRlO6DgOU72v0UFhWcoV1HN6+M3dwT89qVPLXm0w==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-3.0.6.tgz", + "integrity": "sha512-ezXZk6oPJCWL483zj64pNkMuY/NcRX5MPiB0zE6tjZM137aeusrOnW1ecxgF9cmwMWkBMhjteQxBPoZBh9FDxQ==", "dev": true, "requires": { "circular-json": "^0.5.5", @@ -4498,13 +4413,19 @@ }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, @@ -4519,21 +4440,9 @@ } }, "lolex": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", - "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", - "dev": true - }, - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", - "dev": true - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-3.0.0.tgz", + "integrity": "sha512-hcnW80h3j2lbUfFdMArd5UPA/vxZJ+G8vobd+wg3nVEQA0EigStbYcrG030FJxL6xiDDPEkoMatV9xIh5OecQQ==", "dev": true }, "loose-envify": { @@ -4568,22 +4477,8 @@ "dev": true, "requires": { "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, - "mamacro": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", - "dev": true - }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -4612,18 +4507,19 @@ "dev": true }, "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "media-typer": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, @@ -4639,7 +4535,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -4657,12 +4553,21 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } } }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -4701,18 +4606,18 @@ "dev": true }, "mime-db": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", "dev": true }, "mime-types": { - "version": "2.1.20", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", - "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", "dev": true, "requires": { - "mime-db": "~1.36.0" + "mime-db": "~1.37.0" } }, "minimalistic-assert": { @@ -4738,7 +4643,7 @@ }, "minimist": { "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true }, @@ -4783,7 +4688,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -4792,7 +4697,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -4817,6 +4722,12 @@ "supports-color": "5.4.0" }, "dependencies": { + "commander": { + "version": "2.15.1", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -4872,9 +4783,9 @@ "dev": true }, "nan": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", - "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", + "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", "dev": true }, "nanomatch": { @@ -4903,28 +4814,36 @@ "dev": true }, "neo-async": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.2.tgz", - "integrity": "sha512-vdqTKI9GBIYcAEbFAcpKPErKINfPF5zIuz3/niBfq8WUZjpT2tytLlFVrBgWdOtqI4uaA/Rb6No0hux39XXDuw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", + "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", "dev": true }, "next-tick": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, "nise": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.4.tgz", - "integrity": "sha512-pxE0c9PzgrUTyhfv5p+5eMIdfU2bLEsq8VQEuE0kxM4zP7SujSar7rk9wpI2F7RyyCEvLyj5O7Is3RER5F36Fg==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.6.tgz", + "integrity": "sha512-1GedetLKzmqmgwabuMSqPsT7oumdR77SBpDfNNJhADRIeA3LN/2RVqR4fFqwvzhAqcTef6PPCzQwITE/YQ8S8A==", "dev": true, "requires": { - "@sinonjs/formatio": "^2.0.0", + "@sinonjs/formatio": "3.0.0", "just-extend": "^3.0.0", "lolex": "^2.3.2", "path-to-regexp": "^1.7.0", "text-encoding": "^0.6.4" + }, + "dependencies": { + "lolex": { + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz", + "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==", + "dev": true + } } }, "node-gyp": { @@ -4949,7 +4868,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } @@ -4984,12 +4903,20 @@ "url": "^0.11.0", "util": "^0.10.3", "vm-browserify": "0.0.4" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } } }, "node-sass": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.3.tgz", - "integrity": "sha512-XzXyGjO+84wxyH7fV6IwBOTrEBe2f0a6SBze9QWWYR/cL74AcQUks2AsqcCZenl/Fp/JVbuEaLpgrLtocwBUww==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.10.0.tgz", + "integrity": "sha512-fDQJfXszw6vek63Fe/ldkYXmRYK/QS6NbvM3i5oEo9ntPDy4XX7BcKZyTKv+/kSSxRtXXc7l+MSwEmYc0CSy6Q==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -5007,65 +4934,10 @@ "nan": "^2.10.0", "node-gyp": "^3.8.0", "npmlog": "^4.0.0", - "request": "2.87.0", + "request": "^2.88.0", "sass-graph": "^2.2.4", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" - }, - "dependencies": { - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, - "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" - } - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true - }, - "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, - "requires": { - "punycode": "^1.4.1" - } - } } }, "nopt": { @@ -5218,9 +5090,9 @@ } }, "octicons": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/octicons/-/octicons-8.0.0.tgz", - "integrity": "sha512-ihUXutjRepJAAhQ9jm2VhqJ1OqiFTn6URQ6jEdz+tKcjysPoEoiiYxJG9E+yVzwEeDcfhMWBx2yPfttkl1ZsYg==", + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/octicons/-/octicons-8.1.2.tgz", + "integrity": "sha512-sV4a1p+CNhAb3IQ9M2B9ssrtiOfL7ap4v8a5A61hpjeWpXfOlNNyejTNWoRopTM2g6M9BLQSgxHD7dgAwZoU+Q==", "dev": true, "requires": { "object-assign": "^4.1.1" @@ -5262,13 +5134,13 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5277,7 +5149,7 @@ }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -5334,7 +5206,7 @@ }, "parse-asn1": { "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "dev": true, "requires": { @@ -5436,7 +5308,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5472,6 +5344,14 @@ "graceful-fs": "^4.1.2", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } } }, "pathval": { @@ -5481,9 +5361,9 @@ "dev": true }, "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "dev": true, "requires": { "create-hash": "^1.1.2", @@ -5500,9 +5380,9 @@ "dev": true }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pinkie": { @@ -5589,16 +5469,17 @@ "dev": true }, "public-encrypt": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dev": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "pump": { @@ -5623,9 +5504,9 @@ } }, "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, "qjobs": { @@ -5653,9 +5534,9 @@ "dev": true }, "randomatic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.0.tgz", - "integrity": "sha512-KnGPVE0lo2WoXxIZ7cPR8YBpiol4gsSuOwDSg410oHh80ZMp5EiypNqL2K4Z77vJn6lB5rap7IkAmcUlalcnBQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", "dev": true, "requires": { "is-number": "^4.0.0", @@ -5737,7 +5618,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -5751,15 +5632,14 @@ } }, "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "minimatch": "^3.0.2", - "readable-stream": "^2.0.2", - "set-immediate-shim": "^1.0.1" + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" } }, "redent": { @@ -5900,16 +5780,6 @@ "integrity": "sha512-92ktAgvZhBzYTIK0Mja9uen5q5J3NRVMoDkJL2VMwq6SXjVCgqvQeVP2XAaUY6HT+XpQYeLSjb3UoitBryKmdA==", "dev": true }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -5930,9 +5800,9 @@ } }, "rollup": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.65.0.tgz", - "integrity": "sha512-en95i7zwW5IiWay6DR/6QV8TxO2LvWuCjHYDcgP96oVG/gPnWWzsxNViObhoJUs17bAj2RgB67WuBuGmysZZcw==", + "version": "0.67.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.67.1.tgz", + "integrity": "sha512-BfwL9pw5VyxrAWx/G1tP8epgG+NH4KcR78aoWacV7+dFp1Mj6ynH8QTIC/lDQ3KlwzDakqZmJQ4LQ7TmLg+pBA==", "dev": true, "requires": { "@types/estree": "0.0.39", @@ -5951,9 +5821,9 @@ } }, "rollup-plugin-node-resolve": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", - "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", + "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", "dev": true, "requires": { "builtin-modules": "^2.0.0", @@ -5979,43 +5849,21 @@ } }, "rollup-plugin-uglify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-4.0.0.tgz", - "integrity": "sha512-f6W31EQLzxSEYfN3x6/lyljHqXSoCjXKcTsnwz3evQvHgU1+qTzU2SE0SIG7tbAvaCewp2UaZ5x3k6nYsxOP9A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.0.tgz", + "integrity": "sha512-XtzZd159QuOaXNvcxyBcbUCSoBsv5YYWK+7ZwUyujSmISst8avRfjWlp7cGu8T2O52OJnpEBvl+D4WLV1k1iQQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0-beta.47", - "uglify-js": "^3.3.25" - }, - "dependencies": { - "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "uglify-js": { - "version": "3.4.8", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.8.tgz", - "integrity": "sha512-WatYTD84gP/867bELqI2F/2xC9PQBETn/L+7RGq9MQOA/7yFBNvY1UwXqvtILeE6n0ITwBXxp34M0/o70dzj6A==", - "dev": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1" - } - } + "@babel/code-frame": "^7.0.0", + "jest-worker": "^23.2.0", + "serialize-javascript": "^1.5.0", + "uglify-js": "^3.4.9" } }, "rollup-pluginutils": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.1.tgz", - "integrity": "sha512-JZS8aJMHEHhqmY2QVPMXwKP6lsD1ShkrcGYjhAIvqKKdXQyPHw/9NF0tl3On/xOJ4ACkxfeG7AF+chfCN1NpBg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz", + "integrity": "sha512-2XZwja7b6P5q4RZ5FhyX1+f46xi1Z3qBKigLRZ6VTZjwbN0K1IFGMlwm06Uu0Emcre2Z63l77nq/pzn+KxIEoA==", "dev": true, "requires": { "estree-walker": "^0.5.2", @@ -6348,7 +6196,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -6361,12 +6209,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", - "dev": true - }, "sass-graph": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", @@ -6377,46 +6219,6 @@ "lodash": "^4.0.0", "scss-tokenizer": "^0.2.3", "yargs": "^7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - } - } } }, "schema-utils": { @@ -6426,6 +6228,32 @@ "dev": true, "requires": { "ajv": "^5.0.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + } } }, "scss-tokenizer": { @@ -6450,9 +6278,9 @@ } }, "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, "serialize-javascript": { @@ -6467,12 +6295,6 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true - }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", @@ -6510,7 +6332,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -6525,19 +6347,19 @@ "dev": true }, "sinon": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.5.tgz", - "integrity": "sha512-TcbRoWs1SdY6NOqfj0c9OEQquBoZH+qEf8799m1jjcbfWrrpyCQ3B/BpX7+NKa7Vn33Jl+Z50H4Oys3bzygK2Q==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.1.1.tgz", + "integrity": "sha512-iYagtjLVt1vN3zZY7D8oH7dkjNJEjLjyuzy8daX5+3bbQl8gaohrheB9VfH1O3L6LKuue5WTJvFluHiuZ9y3nQ==", "dev": true, "requires": { - "@sinonjs/commons": "^1.0.1", - "@sinonjs/formatio": "^2.0.0", - "@sinonjs/samsam": "^2.0.0", + "@sinonjs/commons": "^1.2.0", + "@sinonjs/formatio": "^3.0.0", + "@sinonjs/samsam": "^2.1.2", "diff": "^3.5.0", "lodash.get": "^4.4.2", - "lolex": "^2.7.1", - "nise": "^1.4.2", - "supports-color": "^5.4.0", + "lolex": "^3.0.0", + "nise": "^1.4.6", + "supports-color": "^5.5.0", "type-detect": "^4.0.8" }, "dependencies": { @@ -6731,7 +6553,7 @@ }, "socket.io-parser": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", + "resolved": "http://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", "dev": true, "requires": { @@ -6758,9 +6580,9 @@ } }, "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, "source-map": { @@ -6789,9 +6611,9 @@ "dev": true }, "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -6799,9 +6621,9 @@ } }, "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", "dev": true }, "spdx-expression-parse": { @@ -6815,9 +6637,9 @@ } }, "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", + "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", "dev": true }, "split-string": { @@ -6836,9 +6658,9 @@ "dev": true }, "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", + "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -6949,13 +6771,19 @@ }, "dependencies": { "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, @@ -6981,7 +6809,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -7016,14 +6844,14 @@ "dev": true }, "tapable": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", - "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.0.tgz", + "integrity": "sha512-IlqtmLVaZA2qab8epUXbVWRn3aB1imbDMJtjB3nu4X0NqPkcY/JH9ZtCBWKHWPxs8Svi9tyo8w2dBoi07qZbBA==", "dev": true }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { @@ -7034,17 +6862,17 @@ }, "text-encoding": { "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "resolved": "http://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", "dev": true }, "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { - "readable-stream": "^2.1.5", + "readable-stream": "~2.3.6", "xtend": "~4.0.1" } }, @@ -7134,6 +6962,14 @@ "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } } }, "trim-newlines": { @@ -7182,8 +7018,7 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, - "optional": true + "dev": true }, "type-detect": { "version": "4.0.8", @@ -7208,24 +7043,23 @@ "dev": true }, "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", "dev": true, - "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, "uglifyjs-webpack-plugin": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", @@ -7242,36 +7076,12 @@ "worker-farm": "^1.5.2" }, "dependencies": { - "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "commander": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", "dev": true }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "schema-utils": { "version": "0.4.7", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", @@ -7342,18 +7152,18 @@ } }, "unique-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", - "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { "unique-slug": "^2.0.0" } }, "unique-slug": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", + "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", "dev": true, "requires": { "imurmurhash": "^0.1.4" @@ -7418,14 +7228,6 @@ "dev": true, "requires": { "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - } } }, "urix": { @@ -7555,16 +7357,15 @@ } }, "webpack": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.17.1.tgz", - "integrity": "sha512-vdPYogljzWPhFKDj3Gcp01Vqgu7K3IQlybc3XIdKSQHelK1C3eIQuysEUR7MxKJmdandZlQB/9BG2Jb1leJHaw==", + "version": "4.25.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.25.1.tgz", + "integrity": "sha512-T0GU/3NRtO4tMfNzsvpdhUr8HnzA4LTdP2zd+e5zd6CdOH5vNKHnAlO+DvzccfhPdzqRrALOFcjYxx7K5DWmvA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/helper-module-context": "1.5.13", - "@webassemblyjs/wasm-edit": "1.5.13", - "@webassemblyjs/wasm-opt": "1.5.13", - "@webassemblyjs/wasm-parser": "1.5.13", + "@webassemblyjs/ast": "1.7.11", + "@webassemblyjs/helper-module-context": "1.7.11", + "@webassemblyjs/wasm-edit": "1.7.11", + "@webassemblyjs/wasm-parser": "1.7.11", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", @@ -7581,36 +7382,12 @@ "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", "schema-utils": "^0.4.4", - "tapable": "^1.0.0", + "tapable": "^1.1.0", "uglifyjs-webpack-plugin": "^1.2.4", "watchpack": "^1.5.0", - "webpack-sources": "^1.0.1" + "webpack-sources": "^1.3.0" }, "dependencies": { - "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "schema-utils": { "version": "0.4.7", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", @@ -7625,7 +7402,7 @@ }, "webpack-dev-middleware": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz", + "resolved": "http://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz", "integrity": "sha512-tj5LLD9r4tDuRIDa5Mu9lnY2qBBehAITv6A9irqXhw/HQquZgTx3BCd57zYbU2gMDnncA49ufK2qVQSbaKJwOw==", "dev": true, "requires": { @@ -7682,9 +7459,9 @@ } }, "webpack-sources": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", - "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", + "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", "dev": true, "requires": { "source-list-map": "^2.0.0", @@ -7723,13 +7500,6 @@ "string-width": "^1.0.2 || 2" } }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true - }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -7747,7 +7517,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -7797,16 +7567,32 @@ "dev": true }, "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", "dev": true, - "optional": true, "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } } }, "yargs-parser": { diff --git a/package.json b/package.json index 6d7be7ae..37499850 100644 --- a/package.json +++ b/package.json @@ -34,16 +34,16 @@ "test": "karma start --single-run" }, "devDependencies": { - "chai": "^4.1.2", - "codecov": "^3.0.4", + "chai": "^4.2.0", + "codecov": "^3.1.0", "coffee-loader": "^0.9.0", "coffeelint": "^2.1.0", "coffeescript": "^1.12.7", "istanbul-instrumenter-loader": "^3.0.1", - "karma": "^3.0.0", + "karma": "^3.1.1", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", - "karma-coverage-istanbul-reporter": "^2.0.2", + "karma-coverage-istanbul-reporter": "^2.0.4", "karma-firefox-launcher": "^1.1.0", "karma-mocha": "^1.3.0", "karma-mocha-reporter": "^2.2.5", @@ -51,19 +51,19 @@ "karma-sinon": "^1.0.5", "karma-sinon-chai": "^2.0.2", "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "^3.0.0", + "karma-webpack": "^3.0.5", "mocha": "^5.2.0", - "node-sass": "^4.9.3", - "octicons": "^8.0.0", + "node-sass": "^4.10.0", + "octicons": "^8.1.2", "raw-loader": "^0.5.1", - "rollup": "^0.65.0", + "rollup": "^0.67.1", "rollup-plugin-coffee-script": "^2.0.0", - "rollup-plugin-node-resolve": "^3.3.0", - "rollup-plugin-uglify": "^4.0.0", + "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-uglify": "^6.0.0", "rollup-watch": "^4.3.1", - "sinon": "^6.1.5", + "sinon": "^7.1.1", "sinon-chai": "^3.2.0", - "webpack": "^4.17.1" + "webpack": "^4.25.1" }, "engines": { "node": ">=6.5.0" diff --git a/test/unit/current-script.spec.coffee b/test/unit/current-script.spec.coffee index 58895638..41812029 100644 --- a/test/unit/current-script.spec.coffee +++ b/test/unit/current-script.spec.coffee @@ -6,7 +6,7 @@ describe "Current Script", -> it "should export current script url if available and safe", -> if currentScriptURL expect currentScriptURL - .to.have.string "current-script.spec.coffee" + .to.have.string "current-script.spec" else expect currentScriptURL .to.be.undefined From d12e40a2e479d25c5144aac2596880ec3d526558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 14 Nov 2018 02:57:23 -0800 Subject: [PATCH 0095/1193] Adjust style --- assets/css/buttons.css | 2 +- assets/js/app.js | 2 +- assets/js/app.min.js | 2 +- assets/scss/buttons.scss | 15 +++++++++------ dist/buttons.common.js | 2 +- dist/buttons.esm.js | 2 +- dist/buttons.js | 2 +- dist/buttons.min.js | 2 +- 8 files changed, 16 insertions(+), 13 deletions(-) diff --git a/assets/css/buttons.css b/assets/css/buttons.css index c9d6ad62..91965b64 100644 --- a/assets/css/buttons.css +++ b/assets/css/buttons.css @@ -1 +1 @@ -body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0} +body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px} diff --git a/assets/js/app.js b/assets/js/app.js index 29d55ad3..484c0863 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -130,7 +130,7 @@ return options; }; - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/assets/js/app.min.js b/assets/js/app.min.js index e25cf6df..617b47d8 100644 --- a/assets/js/app.min.js +++ b/assets/js/app.min.js @@ -1 +1 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,n=u.location,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)};s="github-button",l=(/^http:/.test(n)?"http":"https")+"://buttons.github.io",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,i;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},i=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var m,w,g,b,v,a,c,y,C,x,k="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n",z={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),z.hasOwnProperty(t)||(t="mark-github"),'"},g={},w=function(t,e){var o,n,r,i,a,s,c,l;1<(s=g[t]||(g[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete g[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},b=function(t,e,o){var r,i,n,a,s,c,l,u,d,h,p,f,g,b;e&&(n=this,c=t.ownerDocument,s=function(t){return c.createTextNode(t)},(l=(a=function(t){return c.createElement(t)})("style")).type="text/css",t.appendChild(l),l.styleSheet?l.styleSheet.cssText=k:l.appendChild(s(k)),(u=t.appendChild(a("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),i=function(){o&&o(u)},(d=a("a")).href=e.href,d.target="_blank",/\.github\.com$/.test("."+d.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(d.href)&&(d.target="_top"):(d.href="#",d.target="_self"),d.className="btn",(h=e["aria-label"])&&d.setAttribute("aria-label",h),d.innerHTML=m(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),d.appendChild(s(" ")),d.appendChild(a("span")).appendChild(s(e["data-text"]||"")),r=u.appendChild(d),/^(true|1)$/i.test(e["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?i():(g[2]?(p="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count",f="watchers"):g[4]?(b="forks_count",f="network"):g[5]?(b="open_issues_count",f="issues"):(b="stargazers_count",f="stargazers")):(p="/users/"+g[1],f=b="followers"),w.call(n,"https://api.github.com/"+p,function(t,e){var o,n;t||(n=e[b],(o=a("a")).href=e.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(a("b")),o.appendChild(a("i")),o.appendChild(a("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()})):i())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),z.hasOwnProperty(t)||(t="mark-github"),'"},g={},w=function(t,e){var o,n,r,i,a,s,c,l;1<(s=g[t]||(g[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete g[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},b=function(t,e,o){var r,i,n,a,s,c,l,u,d,h,p,f,g,b;e&&(n=this,c=t.ownerDocument,s=function(t){return c.createTextNode(t)},(l=(a=function(t){return c.createElement(t)})("style")).type="text/css",t.appendChild(l),l.styleSheet?l.styleSheet.cssText=k:l.appendChild(s(k)),(u=t.appendChild(a("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),i=function(){o&&o(u)},(d=a("a")).href=e.href,d.target="_blank",/\.github\.com$/.test("."+d.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(d.href)&&(d.target="_top"):(d.href="#",d.target="_self"),d.className="btn",(h=e["aria-label"])&&d.setAttribute("aria-label",h),d.innerHTML=m(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),d.appendChild(s(" ")),d.appendChild(a("span")).appendChild(s(e["data-text"]||"")),r=u.appendChild(d),/^(true|1)$/i.test(e["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?i():(f=g[2]?(p="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count","watchers"):g[4]?(b="forks_count","network"):g[5]?(b="open_issues_count","issues"):(b="stargazers_count","stargazers")):(p="/users/"+g[1],b="followers"),w.call(n,"https://api.github.com/"+p,function(t,e){var o,n;t||(n=e[b],(o=a("a")).href=e.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(a("b")),o.appendChild(a("i")),o.appendChild(a("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()})):i())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0"},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index 49dde0cf..cbf600c5 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -83,7 +83,7 @@ onceEvent = function(target, eventName, func) { onEvent(target, eventName, callback); }; -var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; +var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.js b/dist/buttons.js index 591a091e..afdd820d 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -145,7 +145,7 @@ return options; }; - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n"; + var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px}\n"; var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; diff --git a/dist/buttons.min.js b/dist/buttons.min.js index 5ae21e4f..31c0d5e6 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var d,l,s,e,t,o,h=window.document,n=h.location,p=window.encodeURIComponent,c=window.decodeURIComponent,r=window.Math,u=function(e){return h.createElement(e)};l="github-button",d=(/^http:/.test(n)?"http":"https")+"://buttons.github.io",s="/buttons.html",e=function(e){d=e},t="currentScript",o=!{}.hasOwnProperty.call(h,t)&&h[t]&&delete h[t]&&h[t]?h[t].src:void 0;var f,g,a;f=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},g=function(t,o,n){var r;f(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},a=function(e){var t,o;/m/.test(h.readyState)||!/g/.test(h.readyState)&&!h.documentElement.doScroll?setTimeout(e):h.addEventListener?(o=0,g(h,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),g(window,"load",t)):(t=function(){/m/.test(h.readyState)&&(h.detachEvent("onreadystatechange",t),e())},h.attachEvent("onreadystatechange",t))};var m,w,b,v,x,i,C,y,F,k,z="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;right:100%;display:block;width:0;height:0;margin-top:-4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{margin-right:0;border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-right:-1.5px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin-top:-6px;border-width:6px 6px 6px 0}\n",E={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,h,p,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=z:d.appendChild(l(z)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(h=i("a")).href=t.href,h.target="_blank",/\.github\.com$/.test("."+h.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(h.href)&&(h.target="_top"):(h.href="#",h.target="_self"),h.className="btn",(p=t["aria-label"])&&h.setAttribute("aria-label",p),h.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),h.appendChild(l(" ")),h.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(h),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count",f="watchers"):g[4]?(b="forks_count",f="network"):g[5]?(b="open_issues_count",f="issues"):(b="stargazers_count",f="stargazers")):(u="/users/"+g[1],f=b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],h.querySelectorAll)t=h.querySelectorAll("a."+l);else for(o=0,r=(i=h.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,p,h,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=z:d.appendChild(l(z)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(p=i("a")).href=t.href,p.target="_blank",/\.github\.com$/.test("."+p.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(p.href)&&(p.target="_top"):(p.href="#",p.target="_self"),p.className="btn",(h=t["aria-label"])&&p.setAttribute("aria-label",h),p.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),p.appendChild(l(" ")),p.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(p),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(f=g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count","watchers"):g[4]?(b="forks_count","network"):g[5]?(b="open_issues_count","issues"):(b="stargazers_count","stargazers")):(u="/users/"+g[1],b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],p.querySelectorAll)t=p.querySelectorAll("a."+l);else for(o=0,r=(i=p.getElementsByTagName("a")).length;o Date: Wed, 13 Feb 2019 10:40:48 -0800 Subject: [PATCH 0096/1193] Update dependencies --- package-lock.json | 1626 +++++++++++++++++++++++++++------------------ package.json | 24 +- 2 files changed, 988 insertions(+), 662 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4c359f51..92530a11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,12 +14,12 @@ } }, "@babel/generator": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.6.tgz", - "integrity": "sha512-brwPBtVvdYdGxtenbQgfCdDPmtkmUBZPjUoK5SXJEBuHaA5BCubh9ly65fzXz7R6o5rA76Rs22ES8Z+HCc0YIQ==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.2.tgz", + "integrity": "sha512-f3QCuPppXxtZOEm5GWPra/uYUjmNQlu9pbAD8D/9jze4pTY83rTtB1igTBSwvkeNlC5gR24zFFkz+2WHLFQhqQ==", "dev": true, "requires": { - "@babel/types": "^7.1.6", + "@babel/types": "^7.3.2", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", @@ -84,9 +84,9 @@ } }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -112,66 +112,60 @@ } }, "@babel/parser": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.6.tgz", - "integrity": "sha512-dWP6LJm9nKT6ALaa+bnL247GHHMWir3vSlZ2+IHgHgktZQx0L3Uvq2uAWcuzIe+fujRsYWBW2q622C5UvGK9iQ==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.2.tgz", + "integrity": "sha512-QzNUC2RO1gadg+fs21fi0Uu0OuGNzRKEmgCxoLNzbCdoprLwjfmZwzUrpUNfJPaVRwBpDY47A17yYEGWyRelnQ==", "dev": true }, "@babel/template": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", - "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", + "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.1.2", - "@babel/types": "^7.1.2" + "@babel/parser": "^7.2.2", + "@babel/types": "^7.2.2" } }, "@babel/traverse": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.6.tgz", - "integrity": "sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", + "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.6", + "@babel/generator": "^7.2.2", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.6", - "@babel/types": "^7.1.6", + "@babel/parser": "^7.2.3", + "@babel/types": "^7.2.2", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.10" }, "dependencies": { "debug": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", - "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" } }, "globals": { - "version": "11.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", - "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", + "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", "dev": true } } }, "@babel/types": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.6.tgz", - "integrity": "sha512-DMiUzlY9DSjVsOylJssxLHSgj6tWM9PRFJOGW/RaOglVOK9nzTxoOMfTfRQXGUCUQ/HmlG2efwC+XqUEJ5ay4w==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.2.tgz", + "integrity": "sha512-3Y6H8xlUlpbGR+XvawiH0UXehqydTmNmEpozWcXymqwcrwYAl5KMvKtQ+TF6f6E08V6Jur7v/ykdDSF+WDEIXQ==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -197,30 +191,24 @@ } }, "@sinonjs/formatio": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.0.0.tgz", - "integrity": "sha512-vdjoYLDptCgvtJs57ULshak3iJe4NW3sJ3g36xVDGff5AE8P30S6A093EIEPjdi2noGhfuNOEkbxt3J3awFW1w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.1.0.tgz", + "integrity": "sha512-ZAR2bPHOl4Xg6eklUGpsdiIJ4+J1SNag1DHHrG/73Uz/nVwXqjgUtRPLoS+aVyieN9cSbc0E4LsU984tWcDyNg==", "dev": true, "requires": { - "@sinonjs/samsam": "2.1.0" - }, - "dependencies": { - "@sinonjs/samsam": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.1.0.tgz", - "integrity": "sha512-5x2kFgJYupaF1ns/RmharQ90lQkd2ELS8A9X0ymkAAdemYHGtI2KiUHG8nX2WU0T1qgnOU5YMqnBM2V7NUanNw==", - "dev": true, - "requires": { - "array-from": "^2.1.1" - } - } + "@sinonjs/samsam": "^2 || ^3" } }, "@sinonjs/samsam": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.1.2.tgz", - "integrity": "sha512-ZwTHAlC9akprWDinwEPD4kOuwaYZlyMwVJIANsKNC3QVp0AHB04m7RnB4eqeWfgmxw8MGTzS9uMaw93Z3QcZbw==", - "dev": true + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.1.0.tgz", + "integrity": "sha512-IXio+GWY+Q8XUjHUOgK7wx8fpvr7IFffgyXb1bnJFfX3001KmHt35Zq4tp7MXZyjJPCLPuadesDYNk41LYtVjw==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.0.2", + "array-from": "^2.1.1", + "lodash.get": "^4.4.2" + } }, "@types/estree": { "version": "0.0.39", @@ -229,9 +217,9 @@ "dev": true }, "@types/node": { - "version": "10.12.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.7.tgz", - "integrity": "sha512-Zh5Z4kACfbeE8aAOYh9mqotRxaZMro8MbBQtR8vEXOMiZo2rGEh2LayJijKdlu48YnS6y2EFU/oo2NCe5P6jGw==", + "version": "11.9.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.3.tgz", + "integrity": "sha512-DMiqG51GwES/c4ScBY0u5bDlH44+oY8AeYHjY1SGCWidD7h08o1dfHue/TGK7REmif2KiJzaUskO+Q0eaeZ2fQ==", "dev": true }, "@webassemblyjs/ast": { @@ -435,19 +423,16 @@ } }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.0.tgz", + "integrity": "sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw==", "dev": true }, "acorn-dynamic-import": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz", - "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", - "dev": true, - "requires": { - "acorn": "^5.0.0" - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "dev": true }, "after": { "version": "0.8.2", @@ -455,22 +440,37 @@ "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", "dev": true }, + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, "ajv": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", - "integrity": "sha512-7q7gtRQDJSyuEHjuVgHoUa2VuemFiCMrfQc9Tc08XTAc4Zj/5U1buQJ0HU6i7fKjXU09SVgSmxa4sLvuvS8Iyg==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "json-schema-traverse": "^0.3.0" } }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, "ajv-keywords": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", - "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.0.tgz", + "integrity": "sha512-aUjdRFISbuFOl0EIZc+9e4FfZp0bDZgAdOOf30bJmw8VM9v84SHyVyxDfbWxpGYbdZD/9XoKxfHVNmxPkhwyGw==", "dev": true }, "amdefine": { @@ -499,6 +499,17 @@ "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } } }, "append-transform": { @@ -626,7 +637,7 @@ }, "util": { "version": "0.10.3", - "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "dev": true, "requires": { @@ -654,12 +665,12 @@ "dev": true }, "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", "dev": true, "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "async-each": { @@ -778,6 +789,23 @@ "globals": "^9.18.0", "invariant": "^2.2.2", "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "babel-types": { @@ -902,15 +930,15 @@ } }, "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, "binary-extensions": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", - "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", + "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", "dev": true }, "blob": { @@ -956,6 +984,23 @@ "qs": "6.5.2", "raw-body": "2.3.3", "type-is": "~1.6.16" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "brace-expansion": { @@ -1011,7 +1056,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -1048,7 +1093,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { @@ -1082,7 +1127,7 @@ }, "buffer": { "version": "4.9.1", - "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { @@ -1126,9 +1171,9 @@ "dev": true }, "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", + "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", "dev": true }, "builtin-status-codes": { @@ -1144,34 +1189,34 @@ "dev": true }, "cacache": { - "version": "10.0.4", - "resolved": "http://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", - "dev": true, - "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", + "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "dev": true, + "requires": { + "bluebird": "^3.5.3", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", "y18n": "^4.0.0" }, "dependencies": { "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "yallist": "^3.0.2" } }, "y18n": { @@ -1179,6 +1224,12 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true } } }, @@ -1213,7 +1264,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -1243,7 +1294,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -1261,24 +1312,23 @@ "dev": true }, "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.1.tgz", + "integrity": "sha512-gfw3p2oQV2wEt+8VuMlNsPjCxDxvvgnm/kz+uATu805mWVF8IJN7uz9DN7iBz+RMJISmiVbCOBFs9qBGMjtPfQ==", "dev": true, "requires": { "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", "glob-parent": "^3.1.0", - "inherits": "^2.0.1", + "inherits": "^2.0.3", "is-binary-path": "^1.0.0", "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", + "normalize-path": "^3.0.0", "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" + "readdirp": "^2.2.1", + "upath": "^1.1.0" } }, "chownr": { @@ -1359,15 +1409,15 @@ "dev": true }, "codecov": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.1.0.tgz", - "integrity": "sha512-aWQc/rtHbcWEQLka6WmBAOpV58J2TwyXqlpAQGhQaSiEUoigTTUk6lLd2vB3kXkhnDyzyH74RXfmV4dq2txmdA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.2.0.tgz", + "integrity": "sha512-3NJvNARXxilqnqVfgzDHyVrF4oeVgaYW1c1O6Oi5mn93exE7HTSSFNiYdwojWW6IwrCZABJ8crpNbKoo9aUHQw==", "dev": true, "requires": { "argv": "^0.0.2", "ignore-walk": "^3.0.1", "js-yaml": "^3.12.0", - "request": "^2.87.0", + "teeny-request": "^3.7.0", "urlgrey": "^0.4.4" } }, @@ -1434,9 +1484,9 @@ "dev": true }, "colors": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", - "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", "dev": true }, "combine-lists": { @@ -1521,6 +1571,23 @@ "finalhandler": "1.1.0", "parseurl": "~1.3.2", "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "console-browserify": { @@ -1586,9 +1653,9 @@ "dev": true }, "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.4.tgz", + "integrity": "sha512-05qQ5hXShcqGkPZpXEFLIpxayZscVD2kuMBZewxiIPPEagukO4mqgPA9CWhUvFBJfy3ODdK2p9xyHh7FTU9/7A==", "dev": true }, "core-util-is": { @@ -1609,7 +1676,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { @@ -1622,7 +1689,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { @@ -1642,18 +1709,6 @@ "requires": { "lru-cache": "^4.0.1", "which": "^1.2.9" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - } } }, "crypto-browserify": { @@ -1698,7 +1753,7 @@ }, "d": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/d/-/d-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "dev": true, "requires": { @@ -1727,12 +1782,12 @@ "dev": true }, "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "decamelize": { @@ -1866,7 +1921,7 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { @@ -1894,9 +1949,9 @@ "dev": true }, "duplexify": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz", - "integrity": "sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", "dev": true, "requires": { "end-of-stream": "^1.0.0", @@ -1979,12 +2034,18 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "engine.io-client": { "version": "3.2.1", - "resolved": "http://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", "dev": true, "requires": { @@ -2009,6 +2070,12 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -2061,9 +2128,9 @@ } }, "es5-ext": { - "version": "0.10.46", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz", - "integrity": "sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw==", + "version": "0.10.47", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.47.tgz", + "integrity": "sha512-/1TItLfj+TTfWoeRcDn/0FbGV6SNo4R+On2GGVucPU/j3BWnXE2Co8h8CTo4Tu34gFJtnmwS9xiScKs4EjZhdw==", "dev": true, "requires": { "es6-iterator": "~2.0.3", @@ -2082,6 +2149,21 @@ "es6-symbol": "^3.1.1" } }, + "es6-promise": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", + "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, "es6-symbol": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", @@ -2154,9 +2236,9 @@ "dev": true }, "events": { - "version": "1.1.1", - "resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", "dev": true }, "evp_bytestokey": { @@ -2212,6 +2294,15 @@ "to-regex": "^3.0.1" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -2229,6 +2320,12 @@ "requires": { "is-extendable": "^0.1.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -2355,9 +2452,9 @@ "dev": true }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, "fast-json-stable-stringify": { @@ -2366,6 +2463,12 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, + "figgy-pudding": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", + "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", + "dev": true + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -2420,6 +2523,21 @@ "unpipe": "~1.0.0" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "statuses": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", @@ -2429,14 +2547,14 @@ } }, "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz", + "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", "dev": true, "requires": { "commondir": "^1.0.1", "make-dir": "^1.0.0", - "pkg-dir": "^2.0.0" + "pkg-dir": "^3.0.0" } }, "find-up": { @@ -2449,20 +2567,26 @@ "pinkie-promise": "^2.0.0" } }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "flush-write-stream": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", - "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.4" + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" } }, "follow-redirects": { - "version": "1.5.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.9.tgz", - "integrity": "sha512-Bh65EZI/RU8nx0wbYF9shkFZlqLP+6WT/5FnA3cE/djNSuKNHJEinGGZgu/cQEkeeb2GdFOgenAmn8qaqYke2w==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.6.1.tgz", + "integrity": "sha512-t2JCjbzxQpWvbhts3l6SH1DKzSrx8a+SsaVf4h6bG4kOXUuPYS/kg2Lr4gQSb7eemaHqJkOThF1BGyjlUkO1GQ==", "dev": true, "requires": { "debug": "=3.1.0" @@ -2476,6 +2600,12 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -2532,7 +2662,7 @@ }, "fs-access": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", "dev": true, "requires": { @@ -2558,9 +2688,9 @@ "dev": true }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", + "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", "dev": true, "optional": true, "requires": { @@ -2586,7 +2716,7 @@ "optional": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "dev": true, "optional": true, @@ -2610,7 +2740,7 @@ } }, "chownr": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "dev": true, "optional": true @@ -2646,7 +2776,7 @@ } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true, "dev": true, "optional": true @@ -2695,7 +2825,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.3", "bundled": true, "dev": true, "optional": true, @@ -2715,12 +2845,12 @@ "optional": true }, "iconv-lite": { - "version": "0.4.21", + "version": "0.4.24", "bundled": true, "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { @@ -2781,16 +2911,16 @@ "dev": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.5", "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.1.0", + "version": "1.2.1", "bundled": true, "dev": true, "optional": true, @@ -2813,7 +2943,7 @@ "optional": true }, "needle": { - "version": "2.2.0", + "version": "2.2.4", "bundled": true, "dev": true, "optional": true, @@ -2824,18 +2954,18 @@ } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.10.3", "bundled": true, "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -2852,13 +2982,13 @@ } }, "npm-bundled": { - "version": "1.0.3", + "version": "1.0.5", "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.2.0", "bundled": true, "dev": true, "optional": true, @@ -2933,12 +3063,12 @@ "optional": true }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -2968,16 +3098,16 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.6.3", "bundled": true, "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", "bundled": true, "dev": true }, @@ -2994,7 +3124,7 @@ "optional": true }, "semver": { - "version": "5.5.0", + "version": "5.6.0", "bundled": true, "dev": true, "optional": true @@ -3045,17 +3175,17 @@ "optional": true }, "tar": { - "version": "4.4.1", + "version": "4.4.8", "bundled": true, "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.2" } }, @@ -3066,12 +3196,12 @@ "optional": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -3080,7 +3210,7 @@ "dev": true }, "yallist": { - "version": "3.0.2", + "version": "3.0.3", "bundled": true, "dev": true } @@ -3263,9 +3393,9 @@ "dev": true }, "handlebars": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", - "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz", + "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==", "dev": true, "requires": { "async": "^2.5.0", @@ -3296,6 +3426,32 @@ "requires": { "ajv": "^6.5.5", "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + } } }, "has-ansi": { @@ -3391,9 +3547,9 @@ } }, "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -3425,7 +3581,7 @@ }, "http-errors": { "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "dev": true, "requires": { @@ -3463,6 +3619,16 @@ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", "dev": true }, + "https-proxy-agent": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + } + }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -3598,15 +3764,6 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -3799,35 +3956,36 @@ "dev": true }, "istanbul-api": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.0.6.tgz", - "integrity": "sha512-8W5oeAGWXhtTJjAyVfvavOLVyZCTNCKsyF6GON/INKlBdO7uJ/bv3qnPj5M6ERKzmMCJS1kntnjjGuJ86fn3rQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.0.tgz", + "integrity": "sha512-+Ygg4t1StoiNlBGc6x0f8q/Bv26FbZqP/+jegzfNpU7Q8o+4ZRoJxJPhBkgE/UonpAjtxnE4zCZIyJX+MwLRMQ==", "dev": true, "requires": { "async": "^2.6.1", "compare-versions": "^3.2.1", "fileset": "^2.0.3", - "istanbul-lib-coverage": "^2.0.1", - "istanbul-lib-hook": "^2.0.1", - "istanbul-lib-instrument": "^3.0.0", - "istanbul-lib-report": "^2.0.2", - "istanbul-lib-source-maps": "^2.0.1", - "istanbul-reports": "^2.0.1", + "istanbul-lib-coverage": "^2.0.3", + "istanbul-lib-hook": "^2.0.3", + "istanbul-lib-instrument": "^3.1.0", + "istanbul-lib-report": "^2.0.4", + "istanbul-lib-source-maps": "^3.0.2", + "istanbul-reports": "^2.1.0", "js-yaml": "^3.12.0", "make-dir": "^1.3.0", + "minimatch": "^3.0.4", "once": "^1.4.0" }, "dependencies": { "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", "dev": true }, "istanbul-lib-instrument": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.0.tgz", - "integrity": "sha512-eQY9vN9elYjdgN9Iv6NS/00bptm02EBBk70lRMaVjeA6QYocQgenVrSgC28TJurdnZa80AGO3ASdFN+w/njGiQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", + "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", "dev": true, "requires": { "@babel/generator": "^7.0.0", @@ -3835,7 +3993,7 @@ "@babel/template": "^7.0.0", "@babel/traverse": "^7.0.0", "@babel/types": "^7.0.0", - "istanbul-lib-coverage": "^2.0.1", + "istanbul-lib-coverage": "^2.0.3", "semver": "^5.5.0" } } @@ -3860,9 +4018,9 @@ "dev": true }, "istanbul-lib-hook": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.1.tgz", - "integrity": "sha512-ufiZoiJ8CxY577JJWEeFuxXZoMqiKpq/RqZtOAYuQLvlkbJWscq9n3gc4xrCGH9n4pW0qnTxOz1oyMmVtk8E1w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz", + "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==", "dev": true, "requires": { "append-transform": "^1.0.0" @@ -3884,26 +4042,26 @@ } }, "istanbul-lib-report": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.2.tgz", - "integrity": "sha512-rJ8uR3peeIrwAxoDEbK4dJ7cqqtxBisZKCuwkMtMv0xYzaAnsAi3AHrHPAAtNXzG/bcCgZZ3OJVqm1DTi9ap2Q==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz", + "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.1", + "istanbul-lib-coverage": "^2.0.3", "make-dir": "^1.3.0", - "supports-color": "^5.4.0" + "supports-color": "^6.0.0" }, "dependencies": { "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", "dev": true }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -3912,37 +4070,31 @@ } }, "istanbul-lib-source-maps": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-2.0.1.tgz", - "integrity": "sha512-30l40ySg+gvBLcxTrLzR4Z2XTRj3HgRCA/p2rnbs/3OiTaoj054gAbuP5DcLOtwqmy4XW8qXBHzrmP2/bQ9i3A==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.2.tgz", + "integrity": "sha512-JX4v0CiKTGp9fZPmoxpu9YEkPbEqCqBbO3403VabKjH+NRXo72HafD5UgnjTEqHL2SAjaZK1XDuDOkn6I5QVfQ==", "dev": true, "requires": { - "debug": "^3.1.0", - "istanbul-lib-coverage": "^2.0.1", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.3", "make-dir": "^1.3.0", "rimraf": "^2.6.2", "source-map": "^0.6.1" }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" } }, "istanbul-lib-coverage": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", - "dev": true - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-dKWuzRGCs4G+67VfW9pBFFz2Jpi4vSp/k7zBcJ888ofV5Mi1g5CUML5GvMvV6u9Cjybftu+E8Cgp+k0dI1E5lw==", "dev": true }, "source-map": { @@ -3954,27 +4106,39 @@ } }, "istanbul-reports": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.0.1.tgz", - "integrity": "sha512-CT0QgMBJqs6NJLF678ZHcquUAZIoBIUNzdJrRJfpkI9OnzG6MkUfHxbJC3ln981dMswC7/B1mfX3LNkhgJxsuw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.0.tgz", + "integrity": "sha512-azQdSX+dtTtkQEfqq20ICxWi6eOHXyHIgMFw1VOOVi8iIPWeCWRgCyFh/CsBKIhcgskMI8ExXmU7rjXTRCIJ+A==", "dev": true, "requires": { "handlebars": "^4.0.11" } }, "jest-worker": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz", - "integrity": "sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk=", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.0.0.tgz", + "integrity": "sha512-s64/OThpfQvoCeHG963MiEZOAAxu8kHsaL/rCMF7lpdzo7vgF0CtPml9hfguOMgykgH/eOm4jFP4ibfHLruytg==", "dev": true, "requires": { - "merge-stream": "^1.0.1" + "merge-stream": "^1.0.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "js-base64": { - "version": "2.4.9", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", - "integrity": "sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz", + "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", "dev": true }, "js-tokens": { @@ -3984,9 +4148,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", + "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -4001,7 +4165,7 @@ }, "jsesc": { "version": "1.3.0", - "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, @@ -4018,9 +4182,9 @@ "dev": true }, "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", "dev": true }, "json-stringify-safe": { @@ -4030,10 +4194,13 @@ "dev": true }, "json5": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } }, "jsprim": { "version": "1.4.1", @@ -4048,15 +4215,15 @@ } }, "just-extend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-3.0.0.tgz", - "integrity": "sha512-Fu3T6pKBuxjWT/p4DkqGHFRsysc8OauWr4ZRTY9dIx07Y9O0RkoR5jcv28aeD1vuAwhm3nLkDurwLXoALp4DpQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", + "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==", "dev": true }, "karma": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/karma/-/karma-3.1.1.tgz", - "integrity": "sha512-NetT3wPCQMNB36uiL9LLyhrOt8SQwrEKt0xD3+KpTCfm0VxVyUJdPL5oTq2Ic5ouemgL/Iz4wqXEbF3zea9kQQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/karma/-/karma-4.0.0.tgz", + "integrity": "sha512-EFoFs3F6G0BcUGPNOn/YloGOb3h09hzTguyXlg6loHlKY76qbJikkcyPk43m2kfRF65TUGda/mig29QQtyhm1g==", "dev": true, "requires": { "bluebird": "^3.3.0", @@ -4069,11 +4236,12 @@ "di": "^0.0.1", "dom-serialize": "^2.2.0", "expand-braces": "^0.1.1", + "flatted": "^2.0.0", "glob": "^7.1.1", "graceful-fs": "^4.1.2", "http-proxy": "^1.13.0", "isbinaryfile": "^3.0.0", - "lodash": "^4.17.4", + "lodash": "^4.17.5", "log4js": "^3.0.0", "mime": "^2.3.1", "minimatch": "^3.0.2", @@ -4085,7 +4253,7 @@ "socket.io": "2.1.1", "source-map": "^0.6.1", "tmp": "0.0.33", - "useragent": "2.2.1" + "useragent": "2.3.0" }, "dependencies": { "source-map": { @@ -4135,14 +4303,6 @@ "dev": true, "requires": { "minimist": "1.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } } }, "karma-mocha-reporter": { @@ -4172,9 +4332,9 @@ } }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -4260,7 +4420,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -4273,7 +4433,7 @@ "dependencies": { "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -4289,29 +4449,29 @@ } }, "loader-runner": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.1.tgz", - "integrity": "sha512-By6ZFY7ETWOc9RFaAIb23IjJVcM4dvJC/N57nmdz9RSkMXvAXGI7SyVlAw3v8vjtDRlqThgVDVmTnr9fqMlxkw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", "dev": true }, "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "big.js": "^3.1.3", + "big.js": "^5.2.2", "emojis-list": "^2.0.0", - "json5": "^0.5.0" + "json5": "^1.0.1" } }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "p-locate": "^2.0.0", + "p-locate": "^3.0.0", "path-exists": "^3.0.0" }, "dependencies": { @@ -4341,12 +4501,6 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", @@ -4378,9 +4532,9 @@ } }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -4410,23 +4564,6 @@ "debug": "^3.1.0", "rfdc": "^1.1.2", "streamroller": "0.7.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } } }, "loglevelnext": { @@ -4440,9 +4577,9 @@ } }, "lolex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-3.0.0.tgz", - "integrity": "sha512-hcnW80h3j2lbUfFdMArd5UPA/vxZJ+G8vobd+wg3nVEQA0EigStbYcrG030FJxL6xiDDPEkoMatV9xIh5OecQQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-3.1.0.tgz", + "integrity": "sha512-zFo5MgCJ0rZ7gQg69S4pqBsLURbFw11X68C18OcJjJQbqaXm2NoTrGl1IMM3TIz0/BnN1tIs2tzmmqvCsOMMjw==", "dev": true }, "loose-envify": { @@ -4465,10 +4602,14 @@ } }, "lru-cache": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", - "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=", - "dev": true + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } }, "make-dir": { "version": "1.3.0", @@ -4501,9 +4642,9 @@ } }, "math-random": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", - "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, "md5.js": { @@ -4519,7 +4660,7 @@ }, "media-typer": { "version": "0.3.0", - "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, @@ -4535,7 +4676,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -4549,14 +4690,6 @@ "read-pkg-up": "^1.0.1", "redent": "^1.0.0", "trim-newlines": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } } }, "merge-stream": { @@ -4600,9 +4733,9 @@ } }, "mime": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", - "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", + "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", "dev": true }, "mime-db": { @@ -4642,15 +4775,15 @@ } }, "minimist": { - "version": "0.0.10", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "mississippi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", - "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", "dev": true, "requires": { "concat-stream": "^1.5.0", @@ -4659,7 +4792,7 @@ "flush-write-stream": "^1.0.0", "from2": "^2.1.0", "parallel-transform": "^1.1.0", - "pump": "^2.0.1", + "pump": "^3.0.0", "pumpify": "^1.3.3", "stream-each": "^1.1.0", "through2": "^2.0.0" @@ -4688,7 +4821,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -4697,7 +4830,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -4724,7 +4857,7 @@ "dependencies": { "commander": { "version": "2.15.1", - "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "dev": true }, @@ -4751,6 +4884,12 @@ "path-is-absolute": "^1.0.0" } }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, "supports-color": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", @@ -4777,15 +4916,15 @@ } }, "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", "dev": true }, "nanomatch": { @@ -4821,18 +4960,18 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, "nise": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.6.tgz", - "integrity": "sha512-1GedetLKzmqmgwabuMSqPsT7oumdR77SBpDfNNJhADRIeA3LN/2RVqR4fFqwvzhAqcTef6PPCzQwITE/YQ8S8A==", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.8.tgz", + "integrity": "sha512-kGASVhuL4tlAV0tvA34yJYZIVihrUt/5bDwpp4tTluigxUr2bBlJeDXmivb6NuEdFkqvdv/Ybb9dm16PSKUhtw==", "dev": true, "requires": { - "@sinonjs/formatio": "3.0.0", - "just-extend": "^3.0.0", + "@sinonjs/formatio": "^3.1.0", + "just-extend": "^4.0.2", "lolex": "^2.3.2", "path-to-regexp": "^1.7.0", "text-encoding": "^0.6.4" @@ -4846,6 +4985,12 @@ } } }, + "node-fetch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz", + "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==", + "dev": true + }, "node-gyp": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", @@ -4868,16 +5013,16 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "dev": true } } }, "node-libs-browser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", - "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz", + "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==", "dev": true, "requires": { "assert": "^1.1.1", @@ -4887,7 +5032,7 @@ "constants-browserify": "^1.0.0", "crypto-browserify": "^3.11.0", "domain-browser": "^1.1.1", - "events": "^1.0.0", + "events": "^3.0.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", "path-browserify": "0.0.0", @@ -4901,7 +5046,7 @@ "timers-browserify": "^2.0.4", "tty-browserify": "0.0.0", "url": "^0.11.0", - "util": "^0.10.3", + "util": "^0.11.0", "vm-browserify": "0.0.4" }, "dependencies": { @@ -4914,9 +5059,9 @@ } }, "node-sass": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.10.0.tgz", - "integrity": "sha512-fDQJfXszw6vek63Fe/ldkYXmRYK/QS6NbvM3i5oEo9ntPDy4XX7BcKZyTKv+/kSSxRtXXc7l+MSwEmYc0CSy6Q==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz", + "integrity": "sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==", "dev": true, "requires": { "async-foreach": "^0.1.3", @@ -4950,25 +5095,33 @@ } }, "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", + "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } } }, "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "npmlog": { "version": "4.1.2", @@ -5044,9 +5197,9 @@ } }, "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz", + "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==", "dev": true }, "object-visit": { @@ -5090,9 +5243,9 @@ } }, "octicons": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/octicons/-/octicons-8.1.2.tgz", - "integrity": "sha512-sV4a1p+CNhAb3IQ9M2B9ssrtiOfL7ap4v8a5A61hpjeWpXfOlNNyejTNWoRopTM2g6M9BLQSgxHD7dgAwZoU+Q==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/octicons/-/octicons-8.4.1.tgz", + "integrity": "sha512-xg+HvjTNy+4+i+Tz5AUetJd7kyKMjLjCxgWkl/75HH4OzxmL7bzDsay4ShfgCRu7rLMocipWkitQ8d51Kd4ngQ==", "dev": true, "requires": { "object-assign": "^4.1.1" @@ -5124,6 +5277,14 @@ "requires": { "minimist": "~0.0.1", "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + } } }, "os-browserify": { @@ -5134,13 +5295,13 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -5149,7 +5310,7 @@ }, "os-tmpdir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, @@ -5164,33 +5325,33 @@ } }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", + "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.0.0" } }, "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", "dev": true }, "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.8.tgz", + "integrity": "sha512-6i0HVbUfcKaTv+EG8ZTr75az7GFXcLYk9UyLEg7Notv/Ma+z/UG3TCoz6GiNeOrn1E/e63I0X/Hpw18jHOTUnA==", "dev": true }, "parallel-transform": { @@ -5205,16 +5366,17 @@ } }, "parse-asn1": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.3.tgz", + "integrity": "sha512-VrPoetlz7B/FqjBLD2f5wBVZvsZVLnRUrxVLfRYhGXCODa/NWE4p3Wp+6+aV3ZPL3KM7/OZmxDIwwijD7yuucg==", "dev": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, "parse-glob": { @@ -5308,7 +5470,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -5348,7 +5510,7 @@ "dependencies": { "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true } @@ -5401,21 +5563,21 @@ } }, "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, "requires": { - "find-up": "^2.1.0" + "find-up": "^3.0.0" }, "dependencies": { "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "^3.0.0" } } } @@ -5463,9 +5625,9 @@ "dev": true }, "psl": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", - "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", "dev": true }, "public-encrypt": { @@ -5483,9 +5645,9 @@ } }, "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -5501,6 +5663,18 @@ "duplexify": "^3.6.0", "inherits": "^2.0.3", "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } } }, "punycode": { @@ -5590,10 +5764,51 @@ } }, "raw-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-1.0.0.tgz", + "integrity": "sha512-Uqy5AqELpytJTRxYT4fhltcKPj0TyaEpzJDcGz7DFJi+pQOOi3GjR/DOdxTkTsF+NzhnldIoG6TORaBlInUuqA==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^1.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } }, "read-pkg": { "version": "1.1.0", @@ -5618,7 +5833,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { @@ -5781,12 +5996,12 @@ "dev": true }, "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "ripemd160": { @@ -5800,13 +6015,14 @@ } }, "rollup": { - "version": "0.67.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.67.1.tgz", - "integrity": "sha512-BfwL9pw5VyxrAWx/G1tP8epgG+NH4KcR78aoWacV7+dFp1Mj6ynH8QTIC/lDQ3KlwzDakqZmJQ4LQ7TmLg+pBA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.1.2.tgz", + "integrity": "sha512-OkdMxqMl8pWoQc5D8y1cIinYQPPLV8ZkfLgCzL6SytXeNA2P7UHynEQXI9tYxuAjAMsSyvRaWnyJDLHMxq0XAg==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "*" + "@types/node": "*", + "acorn": "^6.0.5" } }, "rollup-plugin-coffee-script": { @@ -5818,45 +6034,67 @@ "object-assign": "^4.0.1", "rollup-plugin-node-resolve": "^3.0.0", "rollup-pluginutils": "^2.0.1" + }, + "dependencies": { + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rollup-plugin-node-resolve": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", + "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", + "dev": true, + "requires": { + "builtin-modules": "^2.0.0", + "is-module": "^1.0.0", + "resolve": "^1.1.6" + } + } } }, "rollup-plugin-node-resolve": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", - "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.0.tgz", + "integrity": "sha512-7Ni+/M5RPSUBfUaP9alwYQiIKnKeXCOHiqBpKUl9kwp3jX5ZJtgXAait1cne6pGEVUUztPD6skIKH9Kq9sNtfw==", "dev": true, "requires": { - "builtin-modules": "^2.0.0", + "builtin-modules": "^3.0.0", "is-module": "^1.0.0", - "resolve": "^1.1.6" + "resolve": "^1.8.1" }, "dependencies": { "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.0.0.tgz", + "integrity": "sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg==", "dev": true }, "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } } } }, "rollup-plugin-uglify": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.0.tgz", - "integrity": "sha512-XtzZd159QuOaXNvcxyBcbUCSoBsv5YYWK+7ZwUyujSmISst8avRfjWlp7cGu8T2O52OJnpEBvl+D4WLV1k1iQQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.2.tgz", + "integrity": "sha512-qwz2Tryspn5QGtPUowq5oumKSxANKdrnfz7C0jm4lKxvRDsNe/hSGsB9FntUul7UeC4TsZEWKErVgE1qWSO0gw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "jest-worker": "^23.2.0", - "serialize-javascript": "^1.5.0", + "jest-worker": "^24.0.0", + "serialize-javascript": "^1.6.1", "uglify-js": "^3.4.9" } }, @@ -5998,6 +6236,15 @@ "parse-glob": "^3.0.4", "regex-cache": "^0.4.2" } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } } } }, @@ -6176,6 +6423,15 @@ "parse-glob": "^3.0.4", "regex-cache": "^0.4.2" } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } } } }, @@ -6196,7 +6452,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -6228,32 +6484,6 @@ "dev": true, "requires": { "ajv": "^5.0.0" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - } } }, "scss-tokenizer": { @@ -6284,9 +6514,9 @@ "dev": true }, "serialize-javascript": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", - "integrity": "sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz", + "integrity": "sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==", "dev": true }, "set-blocking": { @@ -6332,7 +6562,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -6347,20 +6577,18 @@ "dev": true }, "sinon": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.1.1.tgz", - "integrity": "sha512-iYagtjLVt1vN3zZY7D8oH7dkjNJEjLjyuzy8daX5+3bbQl8gaohrheB9VfH1O3L6LKuue5WTJvFluHiuZ9y3nQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.2.3.tgz", + "integrity": "sha512-i6j7sqcLEqTYqUcMV327waI745VASvYuSuQMCjbAwlpAeuCgKZ3LtrjDxAbu+GjNQR0FEDpywtwGCIh8GicNyg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.2.0", - "@sinonjs/formatio": "^3.0.0", - "@sinonjs/samsam": "^2.1.2", + "@sinonjs/commons": "^1.3.0", + "@sinonjs/formatio": "^3.1.0", + "@sinonjs/samsam": "^3.0.2", "diff": "^3.5.0", - "lodash.get": "^4.4.2", "lolex": "^3.0.0", - "nise": "^1.4.6", - "supports-color": "^5.5.0", - "type-detect": "^4.0.8" + "nise": "^1.4.8", + "supports-color": "^5.5.0" }, "dependencies": { "supports-color": { @@ -6375,9 +6603,9 @@ } }, "sinon-chai": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.2.0.tgz", - "integrity": "sha512-Z72B4a0l0IQe5uWi9yzcqX/Ml6K9e1Hp03NmkjJnRG3gDsKTX7KvLFZsVUmCaz0eqeXLLK089mwTsP1P1W+DUQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.3.0.tgz", + "integrity": "sha512-r2JhDY7gbbmh5z3Q62pNbrjxZdOAjpsqW/8yxAZRSqLZqowmfGZPGUZPFf3UX36NLis0cv8VEM5IJh9HgkSOAA==", "dev": true }, "snapdragon": { @@ -6396,6 +6624,15 @@ "use": "^3.1.0" }, "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -6413,6 +6650,12 @@ "requires": { "is-extendable": "^0.1.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -6509,6 +6752,12 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -6548,12 +6797,18 @@ "requires": { "ms": "2.0.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, "socket.io-parser": { "version": "3.2.0", - "resolved": "http://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", "dev": true, "requires": { @@ -6576,6 +6831,12 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, @@ -6604,6 +6865,24 @@ "urix": "^0.1.0" } }, + "source-map-support": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", + "integrity": "sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", @@ -6611,9 +6890,9 @@ "dev": true }, "spdx-correct": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", - "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -6637,9 +6916,9 @@ } }, "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "split-string": { @@ -6658,9 +6937,9 @@ "dev": true }, "sshpk": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", - "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -6675,12 +6954,12 @@ } }, "ssri": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", - "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { - "safe-buffer": "^5.1.1" + "figgy-pudding": "^3.5.1" } }, "static-extend": { @@ -6720,9 +6999,9 @@ } }, "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", "dev": true, "requires": { "inherits": "~2.0.1", @@ -6768,23 +7047,6 @@ "debug": "^3.1.0", "mkdirp": "^0.5.1", "readable-stream": "^2.3.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } } }, "string-width": { @@ -6809,7 +7071,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -6844,14 +7106,14 @@ "dev": true }, "tapable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.0.tgz", - "integrity": "sha512-IlqtmLVaZA2qab8epUXbVWRn3aB1imbDMJtjB3nu4X0NqPkcY/JH9ZtCBWKHWPxs8Svi9tyo8w2dBoi07qZbBA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.1.tgz", + "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", "dev": true }, "tar": { "version": "2.2.1", - "resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, "requires": { @@ -6860,9 +7122,98 @@ "inherits": "2" } }, + "teeny-request": { + "version": "3.11.3", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-3.11.3.tgz", + "integrity": "sha512-CKncqSF7sH6p4rzCgkb/z/Pcos5efl0DmolzvlqRQUNcpRIruOhY9+T1FsIlyEbfWd7MsFpodROOwHYh2BaXzw==", + "dev": true, + "requires": { + "https-proxy-agent": "^2.2.1", + "node-fetch": "^2.2.0", + "uuid": "^3.3.2" + } + }, + "terser": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.16.1.tgz", + "integrity": "sha512-JDJjgleBROeek2iBcSNzOHLKsB/MdDf+E/BOAJ0Tk9r7p9/fVobfv7LMJ/g/k3v9SXdmjZnIlFd5nfn/Rt0Xow==", + "dev": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1", + "source-map-support": "~0.5.9" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.2.tgz", + "integrity": "sha512-1DMkTk286BzmfylAvLXwpJrI7dWa5BnFmscV/2dCr8+c56egFcbaeFAl7+sujAjdmpLam21XRdhA4oifLyiWWg==", + "dev": true, + "requires": { + "cacache": "^11.0.2", + "find-cache-dir": "^2.0.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "terser": "^3.16.1", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" + }, + "dependencies": { + "ajv": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "text-encoding": { "version": "0.6.4", - "resolved": "http://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", "dev": true }, @@ -7060,56 +7411,6 @@ } } }, - "uglifyjs-webpack-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", - "integrity": "sha512-ovHIch0AMlxjD/97j9AYovZxG5wnHOPkL7T1GKochBADp/Zwc44pEWNqpKl1Loupp1WhFg7SlYmHZRUfdAacgw==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "schema-utils": "^0.4.5", - "serialize-javascript": "^1.4.0", - "source-map": "^0.6.1", - "uglify-es": "^3.3.4", - "webpack-sources": "^1.1.0", - "worker-farm": "^1.5.2" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", - "dev": true, - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - } - } - } - }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", @@ -7273,19 +7574,19 @@ "dev": true }, "useragent": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.2.1.tgz", - "integrity": "sha1-z1k+9PLRdYdei7ZY6pLhik/QbY4=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz", + "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==", "dev": true, "requires": { - "lru-cache": "2.2.x", + "lru-cache": "4.1.x", "tmp": "0.0.x" } }, "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", "dev": true, "requires": { "inherits": "2.0.3" @@ -7357,17 +7658,17 @@ } }, "webpack": { - "version": "4.25.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.25.1.tgz", - "integrity": "sha512-T0GU/3NRtO4tMfNzsvpdhUr8HnzA4LTdP2zd+e5zd6CdOH5vNKHnAlO+DvzccfhPdzqRrALOFcjYxx7K5DWmvA==", + "version": "4.29.3", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.3.tgz", + "integrity": "sha512-xPJvFeB+8tUflXFq+OgdpiSnsCD5EANyv56co5q8q8+YtEasn5Sj3kzY44mta+csCIEB0vneSxnuaHkOL2h94A==", "dev": true, "requires": { "@webassemblyjs/ast": "1.7.11", "@webassemblyjs/helper-module-context": "1.7.11", "@webassemblyjs/wasm-edit": "1.7.11", "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "^5.6.2", - "acorn-dynamic-import": "^3.0.0", + "acorn": "^6.0.5", + "acorn-dynamic-import": "^4.0.0", "ajv": "^6.1.0", "ajv-keywords": "^3.1.0", "chrome-trace-event": "^1.0.0", @@ -7381,20 +7682,45 @@ "mkdirp": "~0.5.0", "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", - "schema-utils": "^0.4.4", + "schema-utils": "^1.0.0", "tapable": "^1.1.0", - "uglifyjs-webpack-plugin": "^1.2.4", + "terser-webpack-plugin": "^1.1.0", "watchpack": "^1.5.0", "webpack-sources": "^1.3.0" }, "dependencies": { + "ajv": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "schema-utils": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", - "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", "dev": true, "requires": { "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", "ajv-keywords": "^3.1.0" } } @@ -7402,7 +7728,7 @@ }, "webpack-dev-middleware": { "version": "2.0.6", - "resolved": "http://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz", "integrity": "sha512-tj5LLD9r4tDuRIDa5Mu9lnY2qBBehAITv6A9irqXhw/HQquZgTx3BCd57zYbU2gMDnncA49ufK2qVQSbaKJwOw==", "dev": true, "requires": { @@ -7437,9 +7763,9 @@ } }, "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", @@ -7517,7 +7843,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { diff --git a/package.json b/package.json index 37499850..32f14a24 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,12 @@ }, "devDependencies": { "chai": "^4.2.0", - "codecov": "^3.1.0", + "codecov": "^3.2.0", "coffee-loader": "^0.9.0", "coffeelint": "^2.1.0", - "coffeescript": "^1.12.7", + "coffeescript": "=1.12.7", "istanbul-instrumenter-loader": "^3.0.1", - "karma": "^3.1.1", + "karma": "^4.0.0", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^2.2.0", "karma-coverage-istanbul-reporter": "^2.0.4", @@ -53,17 +53,17 @@ "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^3.0.5", "mocha": "^5.2.0", - "node-sass": "^4.10.0", - "octicons": "^8.1.2", - "raw-loader": "^0.5.1", - "rollup": "^0.67.1", + "node-sass": "^4.11.0", + "octicons": "^8.4.1", + "raw-loader": "^1.0.0", + "rollup": "^1.1.2", "rollup-plugin-coffee-script": "^2.0.0", - "rollup-plugin-node-resolve": "^3.4.0", - "rollup-plugin-uglify": "^6.0.0", + "rollup-plugin-node-resolve": "^4.0.0", + "rollup-plugin-uglify": "^6.0.2", "rollup-watch": "^4.3.1", - "sinon": "^7.1.1", - "sinon-chai": "^3.2.0", - "webpack": "^4.25.1" + "sinon": "^7.2.3", + "sinon-chai": "^3.3.0", + "webpack": "^4.29.3" }, "engines": { "node": ">=6.5.0" From 973cbb398c7b15e977b3f70c9dce3832aa89727c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 13 Feb 2019 11:20:48 -0800 Subject: [PATCH 0097/1193] Bootstrap 4.1.3 --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 7787be16..90fbd797 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,8 @@ github:buttons - + + From 1a3a6085322f4ae9c3f1f933e02ce84647f29a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Wed, 13 Feb 2019 11:33:00 -0800 Subject: [PATCH 0098/1193] Separate the app into its own repo --- .nojekyll | 0 .npmignore | 3 - LICENSE | 25 + LICENSE.md | 9 - README.md | 10 +- assets/css/buttons.css | 1 - assets/css/main.css | 1 - assets/js/app.js | 665 ------------------------ assets/js/app.min.js | 1 - assets/scss/main.scss | 63 --- buttons.html | 1 - buttons.js | 1 - dist/angular/README.md | 38 -- dist/angular/github-button.component.ts | 29 -- dist/react/README.md | 8 - dist/react/index.js | 18 - dist/vue/README.md | 18 - dist/vue/index.js | 17 - favicon.ico | Bin 32988 -> 0 bytes index.html | 168 ------ karma.conf.js | 16 +- package-lock.json | 148 ++++-- package.json | 10 +- rollup.config.js | 23 +- src/app.coffee | 197 ------- {assets/scss => src}/buttons.scss | 0 src/content.coffee | 2 +- 27 files changed, 171 insertions(+), 1301 deletions(-) delete mode 100644 .nojekyll create mode 100644 LICENSE delete mode 100644 LICENSE.md delete mode 100644 assets/css/buttons.css delete mode 100644 assets/css/main.css delete mode 100644 assets/js/app.js delete mode 100644 assets/js/app.min.js delete mode 100644 assets/scss/main.scss delete mode 120000 buttons.html delete mode 120000 buttons.js delete mode 100644 dist/angular/README.md delete mode 100644 dist/angular/github-button.component.ts delete mode 100644 dist/react/README.md delete mode 100644 dist/react/index.js delete mode 100644 dist/vue/README.md delete mode 100644 dist/vue/index.js delete mode 100644 favicon.ico delete mode 100644 index.html delete mode 100644 src/app.coffee rename {assets/scss => src}/buttons.scss (100%) diff --git a/.nojekyll b/.nojekyll deleted file mode 100644 index e69de29b..00000000 diff --git a/.npmignore b/.npmignore index 5e8d39fb..5aa11c96 100644 --- a/.npmignore +++ b/.npmignore @@ -1,10 +1,7 @@ .* -/assets/ /coverage/ /src/ /test/ -/index.html -/favicon.ico /coffeelint.json /karma.conf.js /rollup.config.js diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..05036b3e --- /dev/null +++ b/LICENSE @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2019, なつき +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index ae189ab2..00000000 --- a/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) 2018, なつき -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 4f257ce9..a32541f0 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,13 @@ Documentation ### Quick Start -The easiest way to get started is to use the **[github:button generator](https://buttons.github.io)**. +The easiest way to get started is to use the **[github:button configurator](https://buttons.github.io)**. + +The source code for the configurator is at [ntkme/github-buttons-app](https://github.com/ntkme/github-buttons-app). ### Components -- [github-buttons/dist/vue](dist/vue/) for [Vue](https://vuejs.org) -- [github-buttons/dist/react](dist/react/) for [React](https://facebook.github.io/react/) -- [github-buttons/dist/angular](dist/angular/) for [Angular](https://angular.io) +- [vue-github-button](https://github.com/ntkme/vue-github-button) for [Vue](https://vuejs.org) ### Basic Usage (without component) @@ -161,4 +161,4 @@ See also License ------- -See [LICENSE.md](LICENSE.md). +See [LICENSE](LICENSE). diff --git a/assets/css/buttons.css b/assets/css/buttons.css deleted file mode 100644 index 91965b64..00000000 --- a/assets/css/buttons.css +++ /dev/null @@ -1 +0,0 @@ -body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px} diff --git a/assets/css/main.css b/assets/css/main.css deleted file mode 100644 index 5e7a6bd9..00000000 --- a/assets/css/main.css +++ /dev/null @@ -1 +0,0 @@ -html{position:relative;min-height:100%}.header{border-bottom:1px solid #e5e5e5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navbar-brand{cursor:pointer}.octicon-logo-github{color:#000}.logo{line-height:24px;vertical-align:bottom}.logo-colon{color:#afafaf}.logo-buttons{color:#4ea6ea}.main{padding-bottom:57px}.footer{position:absolute;bottom:0;width:100%;height:57px;overflow-y:hidden;border-top:1px solid #e5e5e5}.form-check-label::before{position:absolute;z-index:1;display:block;width:100%;height:100%;content:''}p{overflow-x:auto;overflow-y:hidden}textarea,textarea[readonly]{font-family:monospace, sans-serif;font-size:11px;cursor:pointer;background-color:#fff !important;resize:none}.octicon{display:inline-block;vertical-align:text-top !important;fill:currentColor} diff --git a/assets/js/app.js b/assets/js/app.js deleted file mode 100644 index 484c0863..00000000 --- a/assets/js/app.js +++ /dev/null @@ -1,665 +0,0 @@ -(function () { - 'use strict'; - - var document = window.document; - - var location = document.location; - - var encodeURIComponent = window.encodeURIComponent; - - var decodeURIComponent = window.decodeURIComponent; - - var Math = window.Math; - - var createElement = function(tag) { - return document.createElement(tag); - }; - - var apiBaseURL, baseURL, buttonClass, htmlPath, setBaseURL; - - buttonClass = "github-button"; - - - /* istanbul ignore next */ - - baseURL = (/^http:/.test(location) ? "http" : "https") + "://buttons.github.io"; - - htmlPath = "/buttons.html"; - - apiBaseURL = "https://api.github.com/"; - - setBaseURL = function(url) { - baseURL = url; - }; - - var currentScript, currentScriptURL; - - currentScript = "currentScript"; - - - /* istanbul ignore next */ - - currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; - - var stringify = function(obj) { - var name, params, value; - params = []; - for (name in obj) { - value = obj[name]; - if (value != null) { - params.push((encodeURIComponent(name)) + "=" + (encodeURIComponent(value))); - } - } - return params.join("&"); - }; - - var onEvent, onceEvent; - - onEvent = function(target, eventName, func) { - - /* istanbul ignore else: IE lt 9 */ - if (target.addEventListener) { - target.addEventListener("" + eventName, func); - } else { - target.attachEvent("on" + eventName, func); - } - }; - - onceEvent = function(target, eventName, func) { - var callback; - callback = function(event) { - - /* istanbul ignore else: IE lt 9 */ - if (target.removeEventListener) { - target.removeEventListener("" + eventName, callback); - } else { - target.detachEvent("on" + eventName, callback); - } - return func(event); - }; - onEvent(target, eventName, callback); - }; - - var defer; - - - /* istanbul ignore next */ - - defer = function(func) { - var callback, onceToken; - if (/m/.test(document.readyState) || (!/g/.test(document.readyState) && !document.documentElement.doScroll)) { - setTimeout(func); - } else { - if (document.addEventListener) { - onceToken = 0; - callback = function() { - if (!onceToken && (onceToken = 1)) { - func(); - } - }; - onceEvent(document, "DOMContentLoaded", callback); - onceEvent(window, "load", callback); - } else { - callback = function() { - if (/m/.test(document.readyState)) { - document.detachEvent("onreadystatechange", callback); - func(); - } - }; - document.attachEvent("onreadystatechange", callback); - } - } - }; - - var parseOptions = function(anchor) { - var attribute, i, len, options, ref; - options = { - "href": anchor.href, - "title": anchor.title, - "aria-label": anchor.getAttribute("aria-label") - }; - ref = ["icon", "text", "size", "show-count"]; - for (i = 0, len = ref.length; i < len; i++) { - attribute = ref[i]; - attribute = "data-" + attribute; - options[attribute] = anchor.getAttribute(attribute); - } - if (options["data-text"] == null) { - options["data-text"] = anchor.textContent || anchor.innerText; - } - return options; - }; - - var css = "body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px}\n"; - - var data = {"mark-github":{"width":16,"height":16,"path":""},"eye":{"width":16,"height":16,"path":""},"star":{"width":14,"height":16,"path":""},"repo-forked":{"width":10,"height":16,"path":""},"issue-opened":{"width":14,"height":16,"path":""},"cloud-download":{"width":16,"height":16,"path":""}}; - - var octicon; - - octicon = function(icon, height) { - var width; - icon = ("" + icon).toLowerCase().replace(/^octicon-/, ""); - if (!data.hasOwnProperty(icon)) { - icon = "mark-github"; - } - width = height * data[icon].width / data[icon].height; - return "" + data[icon].path + ""; - }; - - var fetch, queues; - - queues = {}; - - fetch = function(url, func) { - var XMLHttpRequest, callback, contentWindow, onceToken, onloadend, queue, script, xhr; - if (1 < (queue = (queues[url] || (queues[url] = []))).push(func)) { - return; - } - onceToken = 0; - callback = function() { - if (!onceToken && (onceToken = 1)) { - delete queues[url]; - while (func = queue.shift()) { - func.apply(null, arguments); - } - } - }; - if ((XMLHttpRequest = window.XMLHttpRequest) && "withCredentials" in XMLHttpRequest.prototype) { - xhr = new XMLHttpRequest(); - onEvent(xhr, "abort", callback); - onEvent(xhr, "error", callback); - onEvent(xhr, "load", function() { - callback(xhr.status !== 200, (function() { - try { - return JSON.parse(xhr.responseText); - } catch (error) {} - })()); - }); - xhr.open("GET", url); - xhr.send(); - } else { - contentWindow = this || window; - contentWindow._ = function(json) { - contentWindow._ = null; - callback(json.meta.status !== 200, json.data); - }; - script = contentWindow.document.createElement("script"); - script.async = true; - script.src = url + (/\?/.test(url) ? "&" : "?") + "callback=_"; - onloadend = function() { - if (contentWindow._) { - contentWindow._({ - meta: {} - }); - } - }; - onEvent(script, "error", onloadend); - if (script.readyState) { - - /* istanbul ignore next: IE lt 9 */ - onEvent(script, "readystatechange", function() { - if (script.readyState === "loaded") { - onloadend(); - } - }); - } - contentWindow.document.getElementsByTagName("head")[0].appendChild(script); - } - }; - - var render; - - render = function(root, options, func) { - var button, callback, contentWindow, createElement, createTextNode, document, style, widget; - if (!options) { - return; - } - contentWindow = this; - document = root.ownerDocument; - createElement = function(tag) { - return document.createElement(tag); - }; - createTextNode = function(text) { - return document.createTextNode(text); - }; - style = createElement("style"); - style.type = "text/css"; - root.appendChild(style); - - /* istanbul ignore if */ - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - style.appendChild(createTextNode(css)); - } - widget = root.appendChild(createElement("div")); - widget.className = "widget" + (/^large$/i.test(options["data-size"]) ? " large" : ""); - callback = function() { - if (func) { - func(widget); - } - }; - button = (function() { - var a, ariaLabel, span; - a = createElement("a"); - a.href = options.href; - a.target = "_blank"; - if (!/\.github\.com$/.test("." + a.hostname)) { - a.href = "#"; - a.target = "_self"; - } else if (/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(a.href)) { - a.target = "_top"; - } - a.className = "btn"; - if (ariaLabel = options["aria-label"]) { - a.setAttribute("aria-label", ariaLabel); - } - a.innerHTML = octicon(options["data-icon"], /^large$/i.test(options["data-size"]) ? 16 : 14); - a.appendChild(createTextNode(" ")); - span = a.appendChild(createElement("span")); - span.appendChild(createTextNode(options["data-text"] || "")); - return widget.appendChild(a); - })(); - (function() { - var api, href, match, property; - if (!(/^(true|1)$/i.test(options["data-show-count"]) && button.hostname === "github.com")) { - return callback(); - } - match = button.pathname.replace(/^(?!\/)/, "/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/); - if (!(match && !match[6])) { - return callback(); - } - if (match[2]) { - api = "/repos/" + match[1] + "/" + match[2]; - if (match[3]) { - property = "subscribers_count"; - href = "watchers"; - } else if (match[4]) { - property = "forks_count"; - href = "network"; - } else if (match[5]) { - property = "open_issues_count"; - href = "issues"; - } else { - property = "stargazers_count"; - href = "stargazers"; - } - } else { - api = "/users/" + match[1]; - href = property = "followers"; - } - fetch.call(contentWindow, apiBaseURL + api, function(error, json) { - var a, data, span; - if (!error) { - data = json[property]; - a = createElement("a"); - a.href = json.html_url + "/" + href; - a.target = "_blank"; - a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); - a.appendChild(createElement("b")); - a.appendChild(createElement("i")); - span = a.appendChild(createElement("span")); - span.appendChild(document.createTextNode(("" + data).replace(/\B(?=(\d{3})+(?!\d))/g, ","))); - button.parentNode.insertBefore(a, button.nextSibling); - } - callback(); - }); - })(); - }; - - var render$1; - - - /* istanbul ignore next */ - - render$1 = function() { - var anchor, anchors, i, j, len, len1, ref; - anchors = []; - if (document.querySelectorAll) { - anchors = document.querySelectorAll("a." + buttonClass); - } else { - ref = document.getElementsByTagName("a"); - for (i = 0, len = ref.length; i < len; i++) { - anchor = ref[i]; - if (~(" " + anchor.className + " ").replace(/[ \t\n\f\r]+/g, " ").indexOf(" " + buttonClass + " ")) { - anchors.push(anchor); - } - } - } - for (j = 0, len1 = anchors.length; j < len1; j++) { - anchor = anchors[j]; - render$2(anchor); - } - }; - - var ceilPixel, devicePixelRatio; - - - /* istanbul ignore next */ - - devicePixelRatio = window.devicePixelRatio || 1; - - ceilPixel = function(px) { - return (devicePixelRatio > 1 ? Math.ceil(Math.round(px * devicePixelRatio) / devicePixelRatio * 2) / 2 : Math.ceil(px)) || 0; - }; - - var get, set; - - get = function(el) { - var boundingClientRect, height, width; - width = el.scrollWidth; - height = el.scrollHeight; - if (el.getBoundingClientRect) { - boundingClientRect = el.getBoundingClientRect(); - width = Math.max(width, ceilPixel(boundingClientRect.width || boundingClientRect.right - boundingClientRect.left)); - height = Math.max(height, ceilPixel(boundingClientRect.height || boundingClientRect.bottom - boundingClientRect.top)); - } - return [width, height]; - }; - - set = function(el, size) { - el.style.width = size[0] + "px"; - el.style.height = size[1] + "px"; - }; - - var render$2; - - - /* istanbul ignore next */ - - render$2 = function(targetNode, options) { - var HTMLElement, host, iframe, name, ref, title, value; - if (targetNode == null) { - return render$1(); - } - if (options == null) { - options = parseOptions(targetNode); - } - if ((HTMLElement = window.HTMLElement) && HTMLElement.prototype.attachShadow && !HTMLElement.prototype.attachShadow.prototype) { - host = createElement("span"); - if (title = options.title) { - host.title = title; - } - render(host.attachShadow({ - mode: "closed" - }), options, function() { - targetNode.parentNode.replaceChild(host, targetNode); - }); - } else { - iframe = createElement("iframe"); - ref = { - allowtransparency: true, - scrolling: "no", - frameBorder: 0 - }; - for (name in ref) { - value = ref[name]; - iframe.setAttribute(name, value); - } - set(iframe, [1, 0]); - iframe.style.border = "none"; - iframe.src = "javascript:0"; - onceEvent(iframe, "load", function() { - var contentWindow; - contentWindow = iframe.contentWindow; - render.call(contentWindow, contentWindow.document.body, options, function(widget) { - var size; - size = get(widget); - iframe.parentNode.removeChild(iframe); - onceEvent(iframe, "load", function() { - set(iframe, size); - }); - iframe.src = baseURL + htmlPath + "#" + stringify(options); - if (title = options.title) { - iframe.title = title; - } - targetNode.parentNode.replaceChild(iframe, targetNode); - }); - }); - document.body.appendChild(iframe); - } - }; - - if (currentScriptURL) { - setBaseURL(currentScriptURL.replace(/[^\/]*\/[^\/]*\/[^\/]*([?#].*)?$/, '')); - } - - window.onbeforeunload = function() {}; - - defer(function() { - Vue.component('github-button-preview', { - template: '#github-button-preview-template', - props: ['config'], - data: function() { - return { - timeoutId: null - }; - }, - computed: { - rateLimitWait: function() { - if (this.config['data-show-count']) { - return 300; - } else { - return 0; - } - } - }, - mounted: function() { - this.update(); - }, - beforeUpdate: function() { - clearTimeout(this.timeoutId); - if (this.$el.firstChild) { - this.$el.removeChild(this.$el.firstChild); - } - }, - updated: function() { - this.update(); - }, - methods: { - update: function() { - this.timeoutId = setTimeout((function(_this) { - return function() { - var root; - root = _this.$el.appendChild(createElement("span")); - render$2(root, _this.config); - }; - })(this), this.rateLimitWait); - } - } - }); - Vue.component('github-button-code', { - template: '#github-button-code-template', - props: ['text'] - }); - new Vue({ - el: '#app', - template: '#app-template', - mounted: function() { - setTimeout(render$1); - }, - data: function() { - return { - script: '\n', - options: { - type: null, - user: '', - repo: '', - largeButton: false, - showCount: false, - standardIcon: false - } - }; - }, - watch: { - 'options.type': function() { - this.$nextTick(function() { - if (document.activeElement !== this.$refs.user && document.activeElement !== this.$refs.repo) { - if (this.options.type === 'follow' || !this.successes.user || (this.successes.user && this.successes.repo)) { - this.$refs.user.focus(); - } else { - this.$refs.repo.focus(); - } - } - }); - } - }, - computed: { - code: function() { - var a, name, ref, value; - a = createElement('a'); - a.className = 'github-button'; - a.href = this.config.href; - a.textContent = this.config['data-text']; - ref = this.config; - for (name in ref) { - value = ref[name]; - if (name !== 'href' && name !== 'data-text' && (value != null)) { - a.setAttribute(name, value); - } - } - return '\n' + a.outerHTML; - }, - successes: function() { - return { - user: (function(user) { - return 0 < user.length && user.length < 40 && !/[^A-Za-z0-9-]|^-|-$|--/i.test(user); - })(this.options.user), - repo: (function(repo) { - return 0 < repo.length && repo.length < 101 && !/[^\w-.]|\.git$|^\.\.?$/i.test(repo); - })(this.options.repo) - }; - }, - hasSuccess: function() { - if (this.options.type === 'follow') { - return this.successes.user; - } else { - return this.successes.user && this.successes.repo; - } - }, - dangers: function() { - return { - user: this.options.user !== '' && !this.successes.user, - repo: this.options.type !== 'follow' && this.options.repo !== '' && !this.successes.repo - }; - }, - hasDanger: function() { - return this.dangers.user || this.dangers.repo; - }, - config: function() { - var options; - if (this.options.type == null) { - return; - } - options = { - type: this.options.type, - user: this.hasSuccess ? this.options.user : 'ntkme', - repo: this.hasSuccess ? this.options.repo : 'github-buttons', - largeButton: this.options.largeButton, - showCount: this.options.showCount, - standardIcon: this.options.standardIcon - }; - return { - href: (function() { - var base, repo, user; - base = 'https://github.com/'; - user = '/' + options.user; - repo = user + '/' + options.repo; - switch (options.type) { - case 'follow': - return base + user; - case 'watch': - return base + repo + '/subscription'; - case 'star': - return base + repo; - case 'fork': - return base + repo + '/fork'; - case 'issue': - return base + repo + '/issues'; - case 'download': - return base + repo + '/archive/master.zip'; - default: - return base; - } - })(), - 'data-text': (function() { - switch (options.type) { - case 'follow': - return 'Follow @' + options.user; - default: - return options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase(); - } - })(), - 'data-icon': (function() { - if (options.standardIcon) { - return; - } - switch (options.type) { - case 'watch': - return 'octicon-eye'; - case 'star': - return 'octicon-star'; - case 'fork': - return 'octicon-repo-forked'; - case 'issue': - return 'octicon-issue-opened'; - case 'download': - return 'octicon-cloud-download'; - } - })(), - 'data-size': (function() { - if (options.largeButton) { - return 'large'; - } else { - return null; - } - })(), - 'data-show-count': (function() { - if (options.showCount) { - switch (options.type) { - case 'download': - return null; - default: - return true; - } - } - return null; - })(), - 'aria-label': (function() { - switch (options.type) { - case 'follow': - return 'Follow @' + options.user + ' on GitHub'; - case 'watch': - case 'star': - case 'fork': - case 'issue': - case 'download': - return (options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase()) + ' ' + options.user + '/' + options.repo + ' on GitHub'; - default: - return 'GitHub'; - } - })() - }; - } - }, - methods: { - onPaste: function() { - this.$nextTick(function() { - var ref, repo, user; - ref = this.options.user.replace(/^\s+/g, '').replace(/\/+/, '/').replace(/^\//, '').split('/'), user = ref[0], repo = ref[1]; - this.options.user = user; - if (repo != null) { - this.options.repo = repo; - if (this.options.user !== '') { - this.$refs.repo.focus(); - this.$refs.repo.selectionStart = this.$refs.repo.selectionEnd = this.options.repo.length; - } - } - }); - } - } - }); - }); - -}()); diff --git a/assets/js/app.min.js b/assets/js/app.min.js deleted file mode 100644 index 617b47d8..00000000 --- a/assets/js/app.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";var l,s,t,e,o,u=window.document,n=u.location,d=window.encodeURIComponent,r=(window.decodeURIComponent,window.Math),h=function(t){return u.createElement(t)};s="github-button",l=(/^http:/.test(n)?"http":"https")+"://buttons.github.io",t=function(t){l=t},e="currentScript",o=!{}.hasOwnProperty.call(u,e)&&u[e]&&delete u[e]&&u[e]?u[e].src:void 0;var p,f,i;p=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=function(e,o,n){var r;p(e,o,r=function(t){return e.removeEventListener?e.removeEventListener(""+o,r):e.detachEvent("on"+o,r),n(t)})},i=function(t){var e,o;/m/.test(u.readyState)||!/g/.test(u.readyState)&&!u.documentElement.doScroll?setTimeout(t):u.addEventListener?(o=0,f(u,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(u.readyState)&&(u.detachEvent("onreadystatechange",e),t())},u.attachEvent("onreadystatechange",e))};var m,w,g,b,v,a,c,y,x,C,k="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px}\n",z={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),z.hasOwnProperty(t)||(t="mark-github"),'"},g={},w=function(t,e){var o,n,r,i,a,s,c,l;1<(s=g[t]||(g[t]=[])).push(e)||(i=0,n=function(){if(!i&&(i=1))for(delete g[t];e=s.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(l=new o,p(l,"abort",n),p(l,"error",n),p(l,"load",function(){n(200!==l.status,function(){try{return JSON.parse(l.responseText)}catch(t){}}())}),l.open("GET",t),l.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(c=r.document.createElement("script")).async=!0,c.src=t+(/\?/.test(t)?"&":"?")+"callback=_",p(c,"error",a=function(){r._&&r._({meta:{}})}),c.readyState&&p(c,"readystatechange",function(){"loaded"===c.readyState&&a()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},b=function(t,e,o){var r,i,n,a,s,c,l,u,d,h,p,f,g,b;e&&(n=this,c=t.ownerDocument,s=function(t){return c.createTextNode(t)},(l=(a=function(t){return c.createElement(t)})("style")).type="text/css",t.appendChild(l),l.styleSheet?l.styleSheet.cssText=k:l.appendChild(s(k)),(u=t.appendChild(a("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),i=function(){o&&o(u)},(d=a("a")).href=e.href,d.target="_blank",/\.github\.com$/.test("."+d.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(d.href)&&(d.target="_top"):(d.href="#",d.target="_self"),d.className="btn",(h=e["aria-label"])&&d.setAttribute("aria-label",h),d.innerHTML=m(e["data-icon"],/^large$/i.test(e["data-size"])?16:14),d.appendChild(s(" ")),d.appendChild(a("span")).appendChild(s(e["data-text"]||"")),r=u.appendChild(d),/^(true|1)$/i.test(e["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?i():(f=g[2]?(p="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count","watchers"):g[4]?(b="forks_count","network"):g[5]?(b="open_issues_count","issues"):(b="stargazers_count","stargazers")):(p="/users/"+g[1],b="followers"),w.call(n,"https://api.github.com/"+p,function(t,e){var o,n;t||(n=e[b],(o=a("a")).href=e.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(a("b")),o.appendChild(a("i")),o.appendChild(a("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),i()})):i())},v=function(){var t,e,o,n,r,i,a;if(e=[],u.querySelectorAll)e=u.querySelectorAll("a."+s);else for(o=0,r=(a=u.getElementsByTagName("a")).length;o<\/script>',options:{type:null,user:"",repo:"",largeButton:!1,showCount:!1,standardIcon:!1}}},watch:{"options.type":function(){this.$nextTick(function(){u.activeElement!==this.$refs.user&&u.activeElement!==this.$refs.repo&&("follow"===this.options.type||!this.successes.user||this.successes.user&&this.successes.repo?this.$refs.user.focus():this.$refs.repo.focus())})}},computed:{code:function(){var t,e,o,n;for(e in(t=h("a")).className="github-button",t.href=this.config.href,t.textContent=this.config["data-text"],o=this.config)n=o[e],"href"!==e&&"data-text"!==e&&null!=n&&t.setAttribute(e,n);return"\x3c!-- Place this tag where you want the button to render. --\x3e\n"+t.outerHTML},successes:function(){return{user:(e=this.options.user,0 Follow @ntkme - ` -}) -export class AppComponent { } -``` diff --git a/dist/angular/github-button.component.ts b/dist/angular/github-button.component.ts deleted file mode 100644 index 49dbe4db..00000000 --- a/dist/angular/github-button.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component, Input, ElementRef, OnChanges, AfterViewChecked } from '@angular/core' - -import { render } from 'github-buttons' - -@Component({ - selector: 'github-button', - template: `
- ` -}) -export class GithubButtonComponent implements OnChanges, AfterViewChecked { - @Input() href: string = "" - @Input('data-icon') dataIcon: string - @Input('data-size') dataSize: string - @Input('data-show-count') dataShowCount: string - @Input('data-text') dataText: string - @Input('aria-label') ariaLabel: string - - private _: Node - - constructor(private el: ElementRef) {} - - ngOnChanges() { - this._ && this.el.nativeElement.replaceChild(this._, this.el.nativeElement.firstChild) && (this._ = null) - } - - ngAfterViewChecked() { - this._ || render(this._ = this.el.nativeElement.firstChild) - } -} diff --git a/dist/react/README.md b/dist/react/README.md deleted file mode 100644 index 3478ad52..00000000 --- a/dist/react/README.md +++ /dev/null @@ -1,8 +0,0 @@ -GitHub Button for React ------------------------ - -``` jsx -import GitHubButton from 'github-buttons/dist/react'; - -var githubButton = ; -``` diff --git a/dist/react/index.js b/dist/react/index.js deleted file mode 100644 index f5ce585c..00000000 --- a/dist/react/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom' -import { render } from 'github-buttons' - -export default class GitHubButton extends React.Component { - render () { - return React.createElement('span', null, React.createElement('a', this.props, this.props.children)) - } - componentDidMount () { - render(this._ = ReactDOM.findDOMNode(this).firstChild) - } - componentWillUpdate () { - ReactDOM.findDOMNode(this).replaceChild(this._, ReactDOM.findDOMNode(this).firstChild) - } - componentDidUpdate () { - render(this._ = ReactDOM.findDOMNode(this).firstChild) - } -} diff --git a/dist/vue/README.md b/dist/vue/README.md deleted file mode 100644 index 02d5a5fa..00000000 --- a/dist/vue/README.md +++ /dev/null @@ -1,18 +0,0 @@ -GitHub Button for Vue ---------------------- - -``` vue - - - -``` diff --git a/dist/vue/index.js b/dist/vue/index.js deleted file mode 100644 index cc2534ee..00000000 --- a/dist/vue/index.js +++ /dev/null @@ -1,17 +0,0 @@ -import { render } from 'github-buttons' - -export default { - name: 'github-button', - render (h) { - return h('a', this.$slots.default) - }, - mounted () { - render(this.$el.parentNode.insertBefore(this._ = document.createElement('span'), this.$el).appendChild(this.$el)) - }, - beforeUpdate () { - this._.parentNode.replaceChild(this.$el, this._) - }, - updated () { - render(this.$el.parentNode.insertBefore(this._ = document.createElement('span'), this.$el).appendChild(this.$el)) - } -} diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index df0001a67966ebfd3a12fff046b893b76b7458fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32988 zcmeHP$%Pc-7679R9slNaP7_k`~<~?3lTNj2?s=7`3-`C?gd)} z74;WfC^it`+&%ws`U@*TJ&X~Vt z7>31Sh4+Tx9=qG$U*U^~;l*2rVbAUl`6q|rjXQ?njO7?@IBSOc9iE3PYCTrLoeTAE zYc#Th$BhT>aXXmF+W}`k&hulo<;0Uap8dGbuRGA$FNFEIgQ?jsl=(4d$tJ!;W_?wf zvvfa)VQ;i1&zb#ZR+{6e-2ZAlzHWBCS;o1>M1CUDCf~nwPK9B`@mNNL7W<6MECSRU#8))w^9s^?)(Z`*P0ueF})dAPM+ zYrgiEt*82mTkEyvXZNFe9&YWwHDCM7)>D1OTF;9szZGZKQ#}uB|H{{RHqNf6dLGt! zl&|q@oLx`#JgoC5U*p+0yPoQKID4L2J?*bHU-_!%Va?w)*8W=StDc8j>$T=paTWcs9V}YzUp~c^LLH4zt;My=i%0Rt@+wtww~%MZmrjvpWTn@d06{bzQ(h0 zc0JYeu+F1=jc4QRdaCDPok#f^&&JvHRL{dYkMcF1jkD{io`$T=*_oI3q*8Y{R@ob!3PxU;k^C(~A**LqN>Umh_ zQNG5radth`^RUjNe2r)0?0Tx_;p};8^|Zg*eC4a2hc$oKSo>?OuX-MCt=F2b{blQ^ zzT(z;t@+vg%=!HfU$rjN@?SI4oz4Znk}yBsLo~@=RJAq8Q;`X&&wxIJ@a@^9QDyW z^3<~q?}?*6nn#}cXq^&|dZjq;$y3kxrk;9U{%1xYH`{;W6}R|pW?yWf2WUe3e+Pdj z*f+x;gBt!$aF?ayzj1i(wFg%aB>3k{1JBE8v$JM@nw>IhIhR;6?J0YV=Ng}@0{^|) z!i;hCdloC56Bc;J><6<=Uq8rw(hOR9Q2P(FkIcYQPSt@kor#>m%F@Z^%%Hh&s*#-v#9?4#>K&oZaRFl{vUqk zU9CRm!RydF;D8&|UwVQPuhqxv4F~(V`S8*De`@u)|GuApU(@>f@B2Cbdc)WJHur0A=a>HfmbdK=-;43}^~maR>3cKo-!sF{z*A;=@H6vS zGkkx=o?!UwK+Y2J`1yg~3I6-}i{F#b_~P&q|5lylijCPeIq3OKGx+HFz=)Aq!NETD z;GX*(>nIN##Pv+wDTjE9JFXddOfC9x4)03dtB<@X4)vyDz5e;vANN%9k^N0^s5cdB z-T(V0KGsKsJ&^ORG&^ORG&^ORG&^ORG&^ORG&^ORG&^ORG&^ORG&^ORG i&^ORG&^ORG&^ORG&^ORG&^ORG&^ORG&^IvC4g3QpYt)he diff --git a/index.html b/index.html deleted file mode 100644 index 90fbd797..00000000 --- a/index.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - github:buttons - - - - - - - - - - -
- -
-
-
-
-
-
-
-
-
-
- - - - - diff --git a/karma.conf.js b/karma.conf.js index 46295ffb..2d1b8227 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -20,10 +20,18 @@ module.exports = function (config) { module: { rules: [ { - test: /\.css$/, - use: { - loader: 'raw-loader' - } + test: /\.s[ac]ss$/, + use: [ + { + loader: 'raw-loader' + }, + { + loader: 'sass-loader', + options: { + outputStyle: 'compressed' + } + } + ] }, { test: /\.coffee$/, diff --git a/package-lock.json b/package-lock.json index 92530a11..1c350907 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "github-buttons", - "version": "0.0.0", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1396,6 +1396,29 @@ "wrap-ansi": "^2.0.0" } }, + "clone-deep": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.0", + "shallow-clone": "^1.0.0" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + } + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2584,29 +2607,12 @@ } }, "follow-redirects": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.6.1.tgz", - "integrity": "sha512-t2JCjbzxQpWvbhts3l6SH1DKzSrx8a+SsaVf4h6bG4kOXUuPYS/kg2Lr4gQSb7eemaHqJkOThF1BGyjlUkO1GQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", + "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", "dev": true, "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } + "debug": "^3.2.6" } }, "for-in": { @@ -2707,7 +2713,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2728,12 +2735,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2748,17 +2757,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2875,7 +2887,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2887,6 +2900,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2901,6 +2915,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2908,12 +2923,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2932,6 +2949,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3012,7 +3030,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3024,6 +3043,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3109,7 +3129,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3145,6 +3166,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3164,6 +3186,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3207,12 +3230,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -4513,6 +4538,12 @@ "integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", "dev": true }, + "lodash.tail": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", + "integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=", + "dev": true + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -4819,6 +4850,24 @@ } } }, + "mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "dev": true, + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", + "dev": true + } + } + }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -6477,6 +6526,20 @@ "yargs": "^7.0.0" } }, + "sass-loader": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.1.0.tgz", + "integrity": "sha512-+G+BKGglmZM2GUSfT9TLuEp6tzehHPjAMoRRItOojWIqIGPloVCMhNIQuG639eJ+y033PaGTSjLaTHts8Kw79w==", + "dev": true, + "requires": { + "clone-deep": "^2.0.1", + "loader-utils": "^1.0.1", + "lodash.tail": "^4.1.1", + "neo-async": "^2.5.0", + "pify": "^3.0.0", + "semver": "^5.5.0" + } + }, "schema-utils": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz", @@ -6570,6 +6633,25 @@ "safe-buffer": "^5.0.1" } }, + "shallow-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", + "dev": true, + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^5.0.0", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", diff --git a/package.json b/package.json index 32f14a24..3a66ac2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-buttons", - "version": "0.0.0", + "version": "0.1.0", "description": "GitHub Buttons", "keywords": [ "github", @@ -27,9 +27,7 @@ "module": "dist/buttons.esm.js", "typings": "dist/buttons.d.ts", "scripts": { - "build": "npm run build:css && npm run build:js", - "build:css": "node-sass --output-style compressed --output assets/css assets/scss", - "build:js": "rollup -c rollup.config.js", + "build": "rollup -c rollup.config.js", "pretest": "coffeelint src/ test/", "test": "karma start --single-run" }, @@ -61,12 +59,12 @@ "rollup-plugin-node-resolve": "^4.0.0", "rollup-plugin-uglify": "^6.0.2", "rollup-watch": "^4.3.1", + "sass-loader": "^7.1.0", "sinon": "^7.2.3", "sinon-chai": "^3.3.0", "webpack": "^4.29.3" }, "engines": { "node": ">=6.5.0" - }, - "private": true + } } diff --git a/rollup.config.js b/rollup.config.js index 2990db8d..c24812c1 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,6 +1,7 @@ import coffeescript from 'rollup-plugin-coffee-script' import resolve from 'rollup-plugin-node-resolve' import { uglify } from 'rollup-plugin-uglify' +import sass from 'node-sass' const raw = function ({ name, test, transform = (code) => code }) { return { @@ -59,18 +60,6 @@ export default [ format: 'cjs', file: 'dist/buttons.common.js' } - }, { - input: 'src/app.coffee', - output: { - format: 'iife', - file: 'assets/js/app.js' - } - }, { - input: 'src/app.coffee', - output: { - format: 'iife', - file: 'assets/js/app.min.js' - } } ].map(config => Object.assign({ plugins: [ @@ -79,9 +68,15 @@ export default [ }), coffeescript(), raw({ - name: 'css', + name: 'sass', test (id) { - return id.endsWith('css') + return id.endsWith('sass') || id.endsWith('scss') + }, + transform (code) { + return sass.renderSync({ + data: code, + outputStyle: 'compressed' + }).css.toString() } }), raw({ diff --git a/src/app.coffee b/src/app.coffee deleted file mode 100644 index 41a22461..00000000 --- a/src/app.coffee +++ /dev/null @@ -1,197 +0,0 @@ -import { - document - createElement -} from "./alias" -import { - setBaseURL -} from "./config" -import { - currentScriptURL -} from "./current-script" -import { - stringify as stringifyQueryString -} from "./querystring" -import { - onEvent -} from "./event" -import { - defer -} from "./defer" -import { - render as renderContainer -} from "./container" -import { - render as batchRender -} from "./batch" - -if currentScriptURL - setBaseURL currentScriptURL.replace /[^/]*\/[^/]*\/[^/]*([?#].*)?$/, '' - -window.onbeforeunload = -> - -defer -> - Vue.component 'github-button-preview', - template: '#github-button-preview-template' - props: ['config'] - data: -> - timeoutId: null - computed: - rateLimitWait: -> - if @config['data-show-count'] then 300 else 0 - mounted: -> - @update() - return - beforeUpdate: -> - clearTimeout @timeoutId - if @$el.firstChild - @$el.removeChild @$el.firstChild - return - updated: -> - @update() - return - methods: - update: -> - @timeoutId = setTimeout ((_this) -> -> - root = _this.$el.appendChild createElement "span" - renderContainer root, _this.config - return - )(@), @rateLimitWait - return - - Vue.component 'github-button-code', - template: '#github-button-code-template' - props: ['text'] - - new Vue - el: '#app' - template: '#app-template' - mounted: -> - setTimeout batchRender - return - data: -> - script: '\n' - options: - type: null - user: '' - repo: '' - largeButton: false - showCount: false - standardIcon: false - watch: - 'options.type': -> - @$nextTick -> - if document.activeElement isnt @$refs.user and document.activeElement isnt @$refs.repo - if @options.type is 'follow' or not @successes.user or - (@successes.user and @successes.repo) - @$refs.user.focus() - else - @$refs.repo.focus() - return - return - computed: - code: -> - a = createElement 'a' - a.className = 'github-button' - a.href = @config.href - a.textContent = @config['data-text'] - for name, value of @config - if name isnt 'href' and name isnt 'data-text' and value? - a.setAttribute name, value - '\n' + a.outerHTML - successes: -> - user: do (user = @options.user) -> - 0 < user.length && user.length < 40 && !/[^A-Za-z0-9-]|^-|-$|--/i.test(user) - repo: do (repo = @options.repo) -> - 0 < repo.length && repo.length < 101 && !/[^\w-.]|\.git$|^\.\.?$/i.test(repo) - hasSuccess: -> - if @options.type is 'follow' - @successes.user - else - @successes.user and @successes.repo - dangers: -> - user: @options.user isnt '' and not @successes.user - repo: @options.type isnt 'follow' and @options.repo isnt '' and not @successes.repo - hasDanger: -> - @dangers.user or @dangers.repo - config: -> - return unless @options.type? - options = - type: @options.type - user: if @hasSuccess then @options.user else 'ntkme' - repo: if @hasSuccess then @options.repo else 'github-buttons' - largeButton: @options.largeButton - showCount: @options.showCount - standardIcon: @options.standardIcon - - href: do -> - base = 'https://github.com/' - user = '/' + options.user - repo = user + '/' + options.repo - switch (options.type) - when 'follow' - return base + user - when 'watch' - return base + repo + '/subscription' - when 'star' - return base + repo - when 'fork' - return base + repo + '/fork' - when 'issue' - return base + repo + '/issues' - when 'download' - return base + repo + '/archive/master.zip' - else - return base - 'data-text': do -> - switch (options.type) - when 'follow' - return 'Follow @' + options.user - else - return options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase() - 'data-icon': do -> - if (options.standardIcon) - return - switch options.type - when 'watch' - return 'octicon-eye' - when 'star' - return 'octicon-star' - when 'fork' - return 'octicon-repo-forked' - when 'issue' - return 'octicon-issue-opened' - when 'download' - return 'octicon-cloud-download' - else - return - 'data-size': do -> - return if options.largeButton then 'large' else null - 'data-show-count': do -> - if options.showCount - switch options.type - when 'download' - return null - else - return true - return null - 'aria-label': do -> - switch options.type - when 'follow' - return 'Follow @' + options.user + ' on GitHub' - when 'watch', 'star', 'fork', 'issue', 'download' - return (options.type.charAt(0).toUpperCase() + options.type.slice(1).toLowerCase()) + ' ' + options.user + '/' + options.repo + ' on GitHub' - else - return 'GitHub' - methods: - onPaste: -> - @$nextTick -> - [user, repo] = @options.user.replace(/^\s+/g, '').replace(/\/+/, '/').replace(/^\//, '').split '/' - @options.user = user - if repo? - @options.repo = repo - if @options.user isnt '' - @$refs.repo.focus() - @$refs.repo.selectionStart = @$refs.repo.selectionEnd = @options.repo.length - return - return - return diff --git a/assets/scss/buttons.scss b/src/buttons.scss similarity index 100% rename from assets/scss/buttons.scss rename to src/buttons.scss diff --git a/src/content.coffee b/src/content.coffee index 3a3fdbb7..ea56ed40 100644 --- a/src/content.coffee +++ b/src/content.coffee @@ -1,4 +1,4 @@ -import css from "../assets/css/buttons.css" +import css from "./buttons.scss" import { octicon } from "./octicons" From caef7e53e1164b899e250e42747d4a8cb806026b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 14 Feb 2019 13:34:06 -0800 Subject: [PATCH 0099/1193] Remove /s$/ for non-plural words in count's aria-label --- dist/buttons.common.js | 2 +- dist/buttons.esm.js | 2 +- dist/buttons.js | 2 +- dist/buttons.min.js | 2 +- src/content.coffee | 2 +- test/unit/content.spec.coffee | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/buttons.common.js b/dist/buttons.common.js index 979ba248..69dc5b0d 100644 --- a/dist/buttons.common.js +++ b/dist/buttons.common.js @@ -253,7 +253,7 @@ render = function(root, options, func) { a.href = json.html_url + "/" + href; a.target = "_blank"; a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ").slice(0, data < 2 ? -1 : void 0)) + " on GitHub"); a.appendChild(createElement("b")); a.appendChild(createElement("i")); span = a.appendChild(createElement("span")); diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index cbf600c5..77d3162d 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -249,7 +249,7 @@ render = function(root, options, func) { a.href = json.html_url + "/" + href; a.target = "_blank"; a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ").slice(0, data < 2 ? -1 : void 0)) + " on GitHub"); a.appendChild(createElement("b")); a.appendChild(createElement("i")); span = a.appendChild(createElement("span")); diff --git a/dist/buttons.js b/dist/buttons.js index afdd820d..eeb1d00c 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -311,7 +311,7 @@ a.href = json.html_url + "/" + href; a.target = "_blank"; a.className = "social-count"; - a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ")) + " on GitHub"); + a.setAttribute("aria-label", data + " " + (property.replace(/_count$/, "").replace("_", " ").slice(0, data < 2 ? -1 : void 0)) + " on GitHub"); a.appendChild(createElement("b")); a.appendChild(createElement("i")); span = a.appendChild(createElement("span")); diff --git a/dist/buttons.min.js b/dist/buttons.min.js index 31c0d5e6..ad168e46 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var d,l,s,e,t,o,p=window.document,n=p.location,h=window.encodeURIComponent,c=window.decodeURIComponent,r=window.Math,u=function(e){return p.createElement(e)};l="github-button",d=(/^http:/.test(n)?"http":"https")+"://buttons.github.io",s="/buttons.html",e=function(e){d=e},t="currentScript",o=!{}.hasOwnProperty.call(p,t)&&p[t]&&delete p[t]&&p[t]?p[t].src:void 0;var f,g,a;f=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},g=function(t,o,n){var r;f(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},a=function(e){var t,o;/m/.test(p.readyState)||!/g/.test(p.readyState)&&!p.documentElement.doScroll?setTimeout(e):p.addEventListener?(o=0,g(p,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),g(window,"load",t)):(t=function(){/m/.test(p.readyState)&&(p.detachEvent("onreadystatechange",t),e())},p.attachEvent("onreadystatechange",t))};var m,w,b,v,x,i,C,y,F,k,z="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px}\n",E={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,p,h,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=z:d.appendChild(l(z)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(p=i("a")).href=t.href,p.target="_blank",/\.github\.com$/.test("."+p.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(p.href)&&(p.target="_top"):(p.href="#",p.target="_self"),p.className="btn",(h=t["aria-label"])&&p.setAttribute("aria-label",h),p.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),p.appendChild(l(" ")),p.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(p),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(f=g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count","watchers"):g[4]?(b="forks_count","network"):g[5]?(b="open_issues_count","issues"):(b="stargazers_count","stargazers")):(u="/users/"+g[1],b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ")+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],p.querySelectorAll)t=p.querySelectorAll("a."+l);else for(o=0,r=(i=p.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,p,h,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=z:d.appendChild(l(z)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(p=i("a")).href=t.href,p.target="_blank",/\.github\.com$/.test("."+p.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(p.href)&&(p.target="_top"):(p.href="#",p.target="_self"),p.className="btn",(h=t["aria-label"])&&p.setAttribute("aria-label",h),p.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),p.appendChild(l(" ")),p.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(p),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(f=g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count","watchers"):g[4]?(b="forks_count","network"):g[5]?(b="open_issues_count","issues"):(b="stargazers_count","stargazers")):(u="/users/"+g[1],b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ").slice(0,n<2?-1:void 0)+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],p.querySelectorAll)t=p.querySelectorAll("a."+l);else for(o=0,r=(i=p.getElementsByTagName("a")).length;o a.href = json.html_url + "/" + href a.target = "_blank" a.className = "social-count" - a.setAttribute "aria-label", "#{data} #{property.replace(/_count$/, "").replace("_", " ")} on GitHub" + a.setAttribute "aria-label", "#{data} #{property.replace(/_count$/, "").replace("_", " ").slice(0, if data < 2 then -1)} on GitHub" a.appendChild createElement "b" a.appendChild createElement "i" span = a.appendChild createElement "span" diff --git a/test/unit/content.spec.coffee b/test/unit/content.spec.coffee index b8d5812f..1e62f823 100644 --- a/test/unit/content.spec.coffee +++ b/test/unit/content.spec.coffee @@ -195,7 +195,7 @@ describe "Content", -> expect count.lastChild.innerHTML .to.equal "1" expect count.getAttribute "aria-label" - .to.equal "1 open issues on GitHub" + .to.equal "1 open issue on GitHub" done() it "should append the count for issue button when it links to new issue", (done) -> @@ -209,7 +209,7 @@ describe "Content", -> expect count.lastChild.innerHTML .to.equal "1" expect count.getAttribute "aria-label" - .to.equal "1 open issues on GitHub" + .to.equal "1 open issue on GitHub" done() it "should append the count for button whose link has a tailing slash", (done) -> From 6ef2dbd2fa47227e1bd01620579852dedcd4fdba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 14 Feb 2019 14:52:03 -0800 Subject: [PATCH 0100/1193] Support production build for npm registry --- dist/buttons.common.js | 2 +- dist/buttons.esm.js | 2 +- dist/buttons.js | 2 +- karma.conf.js | 4 ++ package-lock.json | 91 ++++++++++++++++++++++++------------ package.json | 2 + rollup.config.js | 9 ++++ src/config.coffee | 6 ++- test/unit/config.spec.coffee | 2 +- 9 files changed, 84 insertions(+), 36 deletions(-) diff --git a/dist/buttons.common.js b/dist/buttons.common.js index 69dc5b0d..7d350e28 100644 --- a/dist/buttons.common.js +++ b/dist/buttons.common.js @@ -23,7 +23,7 @@ buttonClass = "github-button"; /* istanbul ignore next */ -baseURL = (/^http:/.test(location) ? "http" : "https") + "://buttons.github.io"; +baseURL = (/^http:/.test(location) ? "http" : "https") + "://" + ("buttons.github.io"); htmlPath = "/buttons.html"; diff --git a/dist/buttons.esm.js b/dist/buttons.esm.js index 77d3162d..f2354758 100644 --- a/dist/buttons.esm.js +++ b/dist/buttons.esm.js @@ -19,7 +19,7 @@ buttonClass = "github-button"; /* istanbul ignore next */ -baseURL = (/^http:/.test(location) ? "http" : "https") + "://buttons.github.io"; +baseURL = (/^http:/.test(location) ? "http" : "https") + "://" + ("buttons.github.io"); htmlPath = "/buttons.html"; diff --git a/dist/buttons.js b/dist/buttons.js index eeb1d00c..c44f79f2 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -22,7 +22,7 @@ /* istanbul ignore next */ - baseURL = (/^http:/.test(location) ? "http" : "https") + "://buttons.github.io"; + baseURL = (/^http:/.test(location) ? "http" : "https") + "://" + ("buttons.github.io"); htmlPath = "/buttons.html"; diff --git a/karma.conf.js b/karma.conf.js index 2d1b8227..3a68fc77 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -54,6 +54,10 @@ module.exports = function (config) { ] }, plugins: [ + new webpack.EnvironmentPlugin({ + NODE_ENV: 'development', + DEBUG: false + }), new webpack.SourceMapDevToolPlugin({ filename: null, test: /\.(coffee|js)($|\?)/i diff --git a/package-lock.json b/package-lock.json index 1c350907..eeda31a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -200,14 +200,14 @@ } }, "@sinonjs/samsam": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.1.0.tgz", - "integrity": "sha512-IXio+GWY+Q8XUjHUOgK7wx8fpvr7IFffgyXb1bnJFfX3001KmHt35Zq4tp7MXZyjJPCLPuadesDYNk41LYtVjw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.1.1.tgz", + "integrity": "sha512-ILlwvQUwAiaVBzr3qz8oT1moM7AIUHqUc2UmEjQcH9lLe+E+BZPwUMuc9FFojMswRK4r96x5zDTTrowMLw/vuA==", "dev": true, "requires": { "@sinonjs/commons": "^1.0.2", "array-from": "^2.1.1", - "lodash.get": "^4.4.2" + "lodash": "^4.17.11" } }, "@types/estree": { @@ -217,9 +217,9 @@ "dev": true }, "@types/node": { - "version": "11.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.3.tgz", - "integrity": "sha512-DMiqG51GwES/c4ScBY0u5bDlH44+oY8AeYHjY1SGCWidD7h08o1dfHue/TGK7REmif2KiJzaUskO+Q0eaeZ2fQ==", + "version": "11.9.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.4.tgz", + "integrity": "sha512-Zl8dGvAcEmadgs1tmSPcvwzO1YRsz38bVJQvH1RvRqSR9/5n61Q1ktcDL0ht3FXWR+ZpVmXVwN1LuH4Ax23NsA==", "dev": true }, "@webassemblyjs/ast": { @@ -3981,9 +3981,9 @@ "dev": true }, "istanbul-api": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.0.tgz", - "integrity": "sha512-+Ygg4t1StoiNlBGc6x0f8q/Bv26FbZqP/+jegzfNpU7Q8o+4ZRoJxJPhBkgE/UonpAjtxnE4zCZIyJX+MwLRMQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.1.tgz", + "integrity": "sha512-kVmYrehiwyeBAk/wE71tW6emzLiHGjYIiDrc8sfyty4F8M02/lrgXSm+R1kXysmF20zArvmZXjlE/mg24TVPJw==", "dev": true, "requires": { "async": "^2.6.1", @@ -3994,7 +3994,7 @@ "istanbul-lib-instrument": "^3.1.0", "istanbul-lib-report": "^2.0.4", "istanbul-lib-source-maps": "^3.0.2", - "istanbul-reports": "^2.1.0", + "istanbul-reports": "^2.1.1", "js-yaml": "^3.12.0", "make-dir": "^1.3.0", "minimatch": "^3.0.4", @@ -4131,12 +4131,12 @@ } }, "istanbul-reports": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.0.tgz", - "integrity": "sha512-azQdSX+dtTtkQEfqq20ICxWi6eOHXyHIgMFw1VOOVi8iIPWeCWRgCyFh/CsBKIhcgskMI8ExXmU7rjXTRCIJ+A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz", + "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==", "dev": true, "requires": { - "handlebars": "^4.0.11" + "handlebars": "^4.1.0" } }, "jest-worker": { @@ -4526,12 +4526,6 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, "lodash.mergewith": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", @@ -4642,6 +4636,15 @@ "yallist": "^2.1.2" } }, + "magic-string": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", + "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -4770,18 +4773,18 @@ "dev": true }, "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", "dev": true }, "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "version": "2.1.22", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", + "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", "dev": true, "requires": { - "mime-db": "~1.37.0" + "mime-db": "~1.38.0" } }, "minimalistic-assert": { @@ -5415,9 +5418,9 @@ } }, "parse-asn1": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.3.tgz", - "integrity": "sha512-VrPoetlz7B/FqjBLD2f5wBVZvsZVLnRUrxVLfRYhGXCODa/NWE4p3Wp+6+aV3ZPL3KM7/OZmxDIwwijD7yuucg==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", + "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", "dev": true, "requires": { "asn1.js": "^4.0.0", @@ -6107,6 +6110,15 @@ } } }, + "rollup-plugin-json": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz", + "integrity": "sha512-BlYk5VspvGpjz7lAwArVzBXR60JK+4EKtPkCHouAWg39obk9S61hZYJDBfMK+oitPdoe11i69TlxKlMQNFC/Uw==", + "dev": true, + "requires": { + "rollup-pluginutils": "^2.3.1" + } + }, "rollup-plugin-node-resolve": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.0.tgz", @@ -6135,6 +6147,17 @@ } } }, + "rollup-plugin-replace": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-replace/-/rollup-plugin-replace-2.1.0.tgz", + "integrity": "sha512-SxrAIgpH/B5/W4SeULgreOemxcpEgKs2gcD42zXw50bhqGWmcnlXneVInQpAqzA/cIly4bJrOpeelmB9p4YXSQ==", + "dev": true, + "requires": { + "magic-string": "^0.25.1", + "minimatch": "^3.0.2", + "rollup-pluginutils": "^2.0.1" + } + }, "rollup-plugin-uglify": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.2.tgz", @@ -6971,6 +6994,12 @@ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, + "sourcemap-codec": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", + "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", + "dev": true + }, "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", diff --git a/package.json b/package.json index 3a66ac2f..db717eef 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,9 @@ "raw-loader": "^1.0.0", "rollup": "^1.1.2", "rollup-plugin-coffee-script": "^2.0.0", + "rollup-plugin-json": "^3.1.0", "rollup-plugin-node-resolve": "^4.0.0", + "rollup-plugin-replace": "^2.1.0", "rollup-plugin-uglify": "^6.0.2", "rollup-watch": "^4.3.1", "sass-loader": "^7.1.0", diff --git a/rollup.config.js b/rollup.config.js index c24812c1..4878515c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,4 +1,6 @@ import coffeescript from 'rollup-plugin-coffee-script' +import json from 'rollup-plugin-json' +import replace from 'rollup-plugin-replace' import resolve from 'rollup-plugin-node-resolve' import { uglify } from 'rollup-plugin-uglify' import sass from 'node-sass' @@ -66,7 +68,14 @@ export default [ resolve({ extensions: ['.coffee', '.js', '.json'] }), + json({ + exclude: ['node_modules/octicons/**'] + }), coffeescript(), + replace({ + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development'), + 'process.env.DEBUG': process.env.DEBUG || false + }), raw({ name: 'sass', test (id) { diff --git a/src/config.coffee b/src/config.coffee index 5adb96f6..a5484fbb 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -1,3 +1,7 @@ +import { + name, + version +} from "../package" import { document location @@ -6,7 +10,7 @@ import { buttonClass = "github-button" ### istanbul ignore next ### -baseURL = "#{if /^http:/.test location then "http" else "https"}://buttons.github.io" +baseURL = "#{if /^http:/.test location then "http" else "https"}://#{if process.env.NODE_ENV == 'production' then "unpkg.com/" + name + "@" + version + "/dist" else "buttons.github.io"}" htmlPath = "/buttons.html" diff --git a/test/unit/config.spec.coffee b/test/unit/config.spec.coffee index 10a7872c..ed250adc 100644 --- a/test/unit/config.spec.coffee +++ b/test/unit/config.spec.coffee @@ -10,7 +10,7 @@ setBaseURL "/something/else" describe "Config", -> it "should export base url", -> expect originalBaseURL - .to.match ///^https?://buttons.github.io$/// + .to.match ///^https?://(?:buttons.github.io|unpkg.com/.*@.*/dist)$/// it "should export html path", -> expect htmlPath From 3e6fc31e6363f5b18aee4c003f64b370b8d5b038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 14 Feb 2019 15:08:53 -0800 Subject: [PATCH 0101/1193] Prepare for publish using CircleCI --- .circleci/config.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index bd31e9e7..b9eacaaa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,3 +18,32 @@ jobs: - run: npm run build && git diff --exit-code -- :^package-lock.json - run: npm test -- --browsers ChromeHeadless,Firefox - run: test -z "$CIRCLE_PULL_REQUEST" && ./node_modules/.bin/codecov + deploy: + docker: + - image: circleci/node:latest-browsers + steps: + - checkout + - run: | + npm install + NODE_ENV=production npm run build + NODE_ENV=production npm test -- --browsers ChromeHeadless,Firefox + - run: | + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc + npm publish + +workflows: + version: 2 + build-and-deploy: + jobs: + - build: + filters: + tags: + only: /^v.*/ + - deploy: + requires: + - build + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ From 1d464fdc7ae893e6af8ce778d2861e885645bb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Fri, 15 Feb 2019 09:49:12 -0800 Subject: [PATCH 0102/1193] Do not use currentScriptURL for production --- dist/buttons.js | 6 ++++-- src/config.coffee | 2 +- src/main.coffee | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dist/buttons.js b/dist/buttons.js index c44f79f2..7f96b06c 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -443,8 +443,10 @@ } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { exports.render = render$2; } else { - if (currentScriptURL) { - setBaseURL(currentScriptURL.replace(/\/[^\/]*([?#].*)?$/, "")); + { + if (currentScriptURL) { + setBaseURL(currentScriptURL.replace(/\/[^\/]*([?#].*)?$/, "")); + } } if (location.protocol + "//" + location.host + location.pathname === baseURL + htmlPath) { render(document.body, parse(location.hash.replace(/^#/, ""))); diff --git a/src/config.coffee b/src/config.coffee index a5484fbb..3d753611 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -10,7 +10,7 @@ import { buttonClass = "github-button" ### istanbul ignore next ### -baseURL = "#{if /^http:/.test location then "http" else "https"}://#{if process.env.NODE_ENV == 'production' then "unpkg.com/" + name + "@" + version + "/dist" else "buttons.github.io"}" +baseURL = "#{if /^http:/.test location then "http" else "https"}://#{if process.env.NODE_ENV is "production" then "unpkg.com/" + name + "@" + version + "/dist" else "buttons.github.io"}" htmlPath = "/buttons.html" diff --git a/src/main.coffee b/src/main.coffee index 057c9184..35f9f151 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -31,7 +31,8 @@ if typeof define is "function" and define.amd else if typeof exports is "object" and typeof exports.nodeName isnt "string" exports.render = renderContainer else - setBaseURL currentScriptURL.replace /\/[^/]*([?#].*)?$/, "" if currentScriptURL + if process.env.NODE_ENV isnt "production" + setBaseURL currentScriptURL.replace /\/[^/]*([?#].*)?$/, "" if currentScriptURL if location.protocol + "//" + location.host + location.pathname is baseURL + htmlPath renderContent document.body, parseQueryString location.hash.replace /^#/, "" From 22d649c8d1460c7bb8d5648353c0b732034d149c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Fri, 15 Feb 2019 09:51:34 -0800 Subject: [PATCH 0103/1193] v1.0.0 --- package-lock.json | 223 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 112 insertions(+), 113 deletions(-) diff --git a/package-lock.json b/package-lock.json index eeda31a0..ced0fedb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "github-buttons", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -223,175 +223,175 @@ "dev": true }, "@webassemblyjs/ast": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.11.tgz", - "integrity": "sha512-ZEzy4vjvTzScC+SH8RBssQUawpaInUdMTYwYYLh54/s8TuT0gBLuyUnppKsVyZEi876VmmStKsUs28UxPgdvrA==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.2.tgz", + "integrity": "sha512-5LLqqVsXZAhAJN0S7fTi11jwMJOjfR8290V0V7BWKgmZ36VVE6ZGuH4BN3eLt7LvNMIgyuYwyrPwiz6f3SGlBQ==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11" + "@webassemblyjs/helper-module-context": "1.8.2", + "@webassemblyjs/helper-wasm-bytecode": "1.8.2", + "@webassemblyjs/wast-parser": "1.8.2" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.11.tgz", - "integrity": "sha512-zY8dSNyYcgzNRNT666/zOoAyImshm3ycKdoLsyDw/Bwo6+/uktb7p4xyApuef1dwEBo/U/SYQzbGBvV+nru2Xg==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.2.tgz", + "integrity": "sha512-5WIj+pSzbs8ao7NM31xFcGeOSnXgpCikmCFRYkXygVDqVaXTq/Hr9roqarUVMNfAegNc61oKEhe3pi+HUCXJEw==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.11.tgz", - "integrity": "sha512-7r1qXLmiglC+wPNkGuXCvkmalyEstKVwcueZRP2GNC2PAvxbLYwLLPr14rcdJaE4UtHxQKfFkuDFuv91ipqvXg==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.2.tgz", + "integrity": "sha512-TJBDJPXO9DSC4qf5FZT0VFlTdJSm4DKxzcoyWwVike1aQQQEbCk167MJxYLi0SuHeOtULLtDDSZL7yDL3XXMKA==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.11.tgz", - "integrity": "sha512-MynuervdylPPh3ix+mKZloTcL06P8tenNH3sx6s0qE8SLR6DdwnfgA7Hc9NSYeob2jrW5Vql6GVlsQzKQCa13w==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.2.tgz", + "integrity": "sha512-6fTynU6b0bC+yBH7+M6/BBRZId4F1fIuX00G1ZX45EAQOrB8p4TK5bccAEPG2vuyvnd4tgB1/4cYXq5GpszMGA==", "dev": true }, "@webassemblyjs/helper-code-frame": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.11.tgz", - "integrity": "sha512-T8ESC9KMXFTXA5urJcyor5cn6qWeZ4/zLPyWeEXZ03hj/x9weSokGNkVCdnhSabKGYWxElSdgJ+sFa9G/RdHNw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.2.tgz", + "integrity": "sha512-5beYTZS4Wsscu8ys2cLZ0SiToEe1wNitzrV/jCr02wGPOcpPHf0ERImR6iBGe/LX0O2cV9Pgi78hFp5WfNKeAg==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.7.11" + "@webassemblyjs/wast-printer": "1.8.2" } }, "@webassemblyjs/helper-fsm": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.11.tgz", - "integrity": "sha512-nsAQWNP1+8Z6tkzdYlXT0kxfa2Z1tRTARd8wYnc/e3Zv3VydVVnaeePgqUzFrpkGUyhUUxOl5ML7f1NuT+gC0A==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.2.tgz", + "integrity": "sha512-7xRO1lFNj1fGm+ik73n8TuWXKeAqTuqeApqnxWnW+nI2lPyj4awrt+n1XkQr8OwmVK7mFJSRuTZc568qtgOyzQ==", "dev": true }, "@webassemblyjs/helper-module-context": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.11.tgz", - "integrity": "sha512-JxfD5DX8Ygq4PvXDucq0M+sbUFA7BJAv/GGl9ITovqE+idGX+J3QSzJYz+LwQmL7fC3Rs+utvWoJxDb6pmC0qg==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.2.tgz", + "integrity": "sha512-EBr+n9M2F7PQ02s0f87KnSPva0KlT2S4IGDP+7aYqt2FCaMZzCtXcVahGSGg3ESZBSD0gzFU4486zD7SUsSD0Q==", "dev": true }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.11.tgz", - "integrity": "sha512-cMXeVS9rhoXsI9LLL4tJxBgVD/KMOKXuFqYb5oCJ/opScWpkCMEz9EJtkonaNcnLv2R3K5jIeS4TRj/drde1JQ==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.2.tgz", + "integrity": "sha512-gS0trUUPYevbs5Rsv9E+VbzDuZ9KB4Tu/QymTfHtnSDpX4wxhs9u9/y/KiH84r0Z4xvm8/pqWnGvM77oxSPHYw==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.11.tgz", - "integrity": "sha512-8ZRY5iZbZdtNFE5UFunB8mmBEAbSI3guwbrsCl4fWdfRiAcvqQpeqd5KHhSWLL5wuxo53zcaGZDBU64qgn4I4Q==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.2.tgz", + "integrity": "sha512-HLHOR6/Vc+f5UziOUNQ3f5YedCMCuU46BdMEhjQBQwlOWqVAxgwqUn/KJkuhMvvjQ2FkASaDup8ohZrjyCKDKg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11" + "@webassemblyjs/ast": "1.8.2", + "@webassemblyjs/helper-buffer": "1.8.2", + "@webassemblyjs/helper-wasm-bytecode": "1.8.2", + "@webassemblyjs/wasm-gen": "1.8.2" } }, "@webassemblyjs/ieee754": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.11.tgz", - "integrity": "sha512-Mmqx/cS68K1tSrvRLtaV/Lp3NZWzXtOHUW2IvDvl2sihAwJh4ACE0eL6A8FvMyDG9abes3saB6dMimLOs+HMoQ==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.2.tgz", + "integrity": "sha512-v9RtqGJ+z8UweiRh47DheXVtV0d/o9sQfXzAX1/1n/nw5G85yEQJdHcmwiRdu+SXmqlZQeymsnmve2oianzW4g==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.11.tgz", - "integrity": "sha512-vuGmgZjjp3zjcerQg+JA+tGOncOnJLWVkt8Aze5eWQLwTQGNgVLcyOTqgSCxWTR4J42ijHbBxnuRaL1Rv7XMdw==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.2.tgz", + "integrity": "sha512-41zX+6xpo6G2bkq3mdr+K5nXx5OOL6V979ucbLyq1ra5dFI3ReLiw6+HOCF5ih0t5HMQVIQBhInZIdxqcpc/Qg==", "dev": true, "requires": { - "@xtuc/long": "4.2.1" + "long": "git://github.com/dcodeIO/long.js.git#8181a6b50a2a230f0b2a1e4c4093f9b9d19c8b69" } }, "@webassemblyjs/utf8": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.11.tgz", - "integrity": "sha512-C6GFkc7aErQIAH+BMrIdVSmW+6HSe20wg57HEC1uqJP8E/xpMjXqQUxkQw07MhNDSDcGpxI9G5JSNOQCqJk4sA==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.2.tgz", + "integrity": "sha512-fP2Q4igo9/R82xeVra+zIQOjnmknSiAhykg//fz7c1UjghzoutQtldcbKOaL0+0j31RRFMDHgrUL+12RQExOYg==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.11.tgz", - "integrity": "sha512-FUd97guNGsCZQgeTPKdgxJhBXkUbMTY6hFPf2Y4OedXd48H97J+sOY2Ltaq6WGVpIH8o/TGOVNiVz/SbpEMJGg==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.2.tgz", + "integrity": "sha512-rM1sgdLQrXQs4ZapglK86mW8QMml0FJ+jwZ5961sEmHISTkJRvheILuzA9jcKy5vwhWgkPf/nIhO2I6A9rkGww==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/helper-wasm-section": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-opt": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", - "@webassemblyjs/wast-printer": "1.7.11" + "@webassemblyjs/ast": "1.8.2", + "@webassemblyjs/helper-buffer": "1.8.2", + "@webassemblyjs/helper-wasm-bytecode": "1.8.2", + "@webassemblyjs/helper-wasm-section": "1.8.2", + "@webassemblyjs/wasm-gen": "1.8.2", + "@webassemblyjs/wasm-opt": "1.8.2", + "@webassemblyjs/wasm-parser": "1.8.2", + "@webassemblyjs/wast-printer": "1.8.2" } }, "@webassemblyjs/wasm-gen": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.11.tgz", - "integrity": "sha512-U/KDYp7fgAZX5KPfq4NOupK/BmhDc5Kjy2GIqstMhvvdJRcER/kUsMThpWeRP8BMn4LXaKhSTggIJPOeYHwISA==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.2.tgz", + "integrity": "sha512-WTBesrMydDwJbbB48OZGcMq6zDsT6CJd1UalvGuXtHJLargazOron+JBdmt8Nnd+Z2s3TPfCPP54EpQBsDVR7Q==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" + "@webassemblyjs/ast": "1.8.2", + "@webassemblyjs/helper-wasm-bytecode": "1.8.2", + "@webassemblyjs/ieee754": "1.8.2", + "@webassemblyjs/leb128": "1.8.2", + "@webassemblyjs/utf8": "1.8.2" } }, "@webassemblyjs/wasm-opt": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.11.tgz", - "integrity": "sha512-XynkOwQyiRidh0GLua7SkeHvAPXQV/RxsUeERILmAInZegApOUAIJfRuPYe2F7RcjOC9tW3Cb9juPvAC/sCqvg==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.2.tgz", + "integrity": "sha512-tzXn0xNQNyoUBr1+O1rwYXZd2bcUdXSOUTu0fLAIPl01dcTY6hjIi2B2DXYqk9OVQRnjPyX2Ew6rkeCTxfaYaQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-buffer": "1.7.11", - "@webassemblyjs/wasm-gen": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11" + "@webassemblyjs/ast": "1.8.2", + "@webassemblyjs/helper-buffer": "1.8.2", + "@webassemblyjs/wasm-gen": "1.8.2", + "@webassemblyjs/wasm-parser": "1.8.2" } }, "@webassemblyjs/wasm-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.11.tgz", - "integrity": "sha512-6lmXRTrrZjYD8Ng8xRyvyXQJYUQKYSXhJqXOBLw24rdiXsHAOlvw5PhesjdcaMadU/pyPQOJ5dHreMjBxwnQKg==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.2.tgz", + "integrity": "sha512-uc6nVjvUjZzHa8fSl0ko684puuw0ujfCYn19v5tTu0DQ7tXx9jlZXzYw0aW7fmROxyez7BcbJloYLmXg723vVQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-wasm-bytecode": "1.7.11", - "@webassemblyjs/ieee754": "1.7.11", - "@webassemblyjs/leb128": "1.7.11", - "@webassemblyjs/utf8": "1.7.11" + "@webassemblyjs/ast": "1.8.2", + "@webassemblyjs/helper-api-error": "1.8.2", + "@webassemblyjs/helper-wasm-bytecode": "1.8.2", + "@webassemblyjs/ieee754": "1.8.2", + "@webassemblyjs/leb128": "1.8.2", + "@webassemblyjs/utf8": "1.8.2" } }, "@webassemblyjs/wast-parser": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.11.tgz", - "integrity": "sha512-lEyVCg2np15tS+dm7+JJTNhNWq9yTZvi3qEhAIIOaofcYlUp0UR5/tVqOwa/gXYr3gjwSZqw+/lS9dscyLelbQ==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.2.tgz", + "integrity": "sha512-idk8cCqM+T6/iIxoQCOz85vKvWhyHghJbICob/H1AN8byN1O6a2Jxk+g1ZJA7sZDc6/q8pYV6dVkHKgm8y1oUA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/floating-point-hex-parser": "1.7.11", - "@webassemblyjs/helper-api-error": "1.7.11", - "@webassemblyjs/helper-code-frame": "1.7.11", - "@webassemblyjs/helper-fsm": "1.7.11", - "@xtuc/long": "4.2.1" + "@webassemblyjs/ast": "1.8.2", + "@webassemblyjs/floating-point-hex-parser": "1.8.2", + "@webassemblyjs/helper-api-error": "1.8.2", + "@webassemblyjs/helper-code-frame": "1.8.2", + "@webassemblyjs/helper-fsm": "1.8.2", + "long": "git://github.com/dcodeIO/long.js.git#8181a6b50a2a230f0b2a1e4c4093f9b9d19c8b69" } }, "@webassemblyjs/wast-printer": { - "version": "1.7.11", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.11.tgz", - "integrity": "sha512-m5vkAsuJ32QpkdkDOUPGSltrg8Cuk3KBx4YrmAGQwCZPRdUHXxG4phIOuuycLemHFr74sWL9Wthqss4fzdzSwg==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.2.tgz", + "integrity": "sha512-TENFBgf5bKKfs2LbW8fd/0xvamccbEHoR83lQlEP7Qi0nkpXAP77VpvIITy0J+UZAa/Y3j6K6MPw1tNMbdjf4A==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/wast-parser": "1.7.11", - "@xtuc/long": "4.2.1" + "@webassemblyjs/ast": "1.8.2", + "@webassemblyjs/wast-parser": "1.8.2", + "long": "git://github.com/dcodeIO/long.js.git#8181a6b50a2a230f0b2a1e4c4093f9b9d19c8b69" } }, "@xtuc/ieee754": { @@ -400,12 +400,6 @@ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", "dev": true }, - "@xtuc/long": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz", - "integrity": "sha512-FZdkNBDqBRHKQ2MEbSC17xnPFOhZxeJ2YGSfr2BKf3sujG49Qe3bB+rGCwQfIaA7WHnGeGkSijX4FuBCdrzW/g==", - "dev": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -1676,9 +1670,9 @@ "dev": true }, "core-js": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.4.tgz", - "integrity": "sha512-05qQ5hXShcqGkPZpXEFLIpxayZscVD2kuMBZewxiIPPEagukO4mqgPA9CWhUvFBJfy3ODdK2p9xyHh7FTU9/7A==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==", "dev": true }, "core-util-is": { @@ -4607,6 +4601,11 @@ "integrity": "sha512-zFo5MgCJ0rZ7gQg69S4pqBsLURbFw11X68C18OcJjJQbqaXm2NoTrGl1IMM3TIz0/BnN1tIs2tzmmqvCsOMMjw==", "dev": true }, + "long": { + "version": "git://github.com/dcodeIO/long.js.git#8181a6b50a2a230f0b2a1e4c4093f9b9d19c8b69", + "from": "git://github.com/dcodeIO/long.js.git#8181a6b50a2a230f0b2a1e4c4093f9b9d19c8b69", + "dev": true + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -7769,15 +7768,15 @@ } }, "webpack": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.3.tgz", - "integrity": "sha512-xPJvFeB+8tUflXFq+OgdpiSnsCD5EANyv56co5q8q8+YtEasn5Sj3kzY44mta+csCIEB0vneSxnuaHkOL2h94A==", + "version": "4.29.4", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.29.4.tgz", + "integrity": "sha512-Uu/QgPFZG+w+5wjWIFBgIy+g9vOF3QiLmT2Bl783MQSLjRF/K+GMv2TH3TVNFyPQVEHY8rVnPoQtcqrnqK2H7Q==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.11", - "@webassemblyjs/helper-module-context": "1.7.11", - "@webassemblyjs/wasm-edit": "1.7.11", - "@webassemblyjs/wasm-parser": "1.7.11", + "@webassemblyjs/ast": "1.8.2", + "@webassemblyjs/helper-module-context": "1.8.2", + "@webassemblyjs/wasm-edit": "1.8.2", + "@webassemblyjs/wasm-parser": "1.8.2", "acorn": "^6.0.5", "acorn-dynamic-import": "^4.0.0", "ajv": "^6.1.0", diff --git a/package.json b/package.json index db717eef..d24354d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-buttons", - "version": "0.1.0", + "version": "1.0.0", "description": "GitHub Buttons", "keywords": [ "github", From ece453f7d91c3d45a5620d1e34239666d537e8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sat, 16 Feb 2019 18:35:44 -0800 Subject: [PATCH 0104/1193] Remove currentScriptURL --- dist/buttons.js | 20 +------------------- dist/buttons.min.js | 2 +- src/current-script.coffee | 15 --------------- src/main.coffee | 6 ------ test/unit/current-script.spec.coffee | 12 ------------ 5 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 src/current-script.coffee delete mode 100644 test/unit/current-script.spec.coffee diff --git a/dist/buttons.js b/dist/buttons.js index 7f96b06c..f7e9f2d0 100644 --- a/dist/buttons.js +++ b/dist/buttons.js @@ -15,7 +15,7 @@ return document.createElement(tag); }; - var apiBaseURL, baseURL, buttonClass, htmlPath, setBaseURL; + var apiBaseURL, baseURL, buttonClass, htmlPath; buttonClass = "github-button"; @@ -28,19 +28,6 @@ apiBaseURL = "https://api.github.com/"; - setBaseURL = function(url) { - baseURL = url; - }; - - var currentScript, currentScriptURL; - - currentScript = "currentScript"; - - - /* istanbul ignore next */ - - currentScriptURL = !{}.hasOwnProperty.call(document, currentScript) && document[currentScript] && delete document[currentScript] && document[currentScript] ? document[currentScript].src : void 0; - var stringify = function(obj) { var name, params, value; params = []; @@ -443,11 +430,6 @@ } else if (typeof exports === "object" && typeof exports.nodeName !== "string") { exports.render = render$2; } else { - { - if (currentScriptURL) { - setBaseURL(currentScriptURL.replace(/\/[^\/]*([?#].*)?$/, "")); - } - } if (location.protocol + "//" + location.host + location.pathname === baseURL + htmlPath) { render(document.body, parse(location.hash.replace(/^#/, ""))); } else { diff --git a/dist/buttons.min.js b/dist/buttons.min.js index ad168e46..0b7b4f78 100644 --- a/dist/buttons.min.js +++ b/dist/buttons.min.js @@ -1 +1 @@ -!function(){"use strict";var d,l,s,e,t,o,p=window.document,n=p.location,h=window.encodeURIComponent,c=window.decodeURIComponent,r=window.Math,u=function(e){return p.createElement(e)};l="github-button",d=(/^http:/.test(n)?"http":"https")+"://buttons.github.io",s="/buttons.html",e=function(e){d=e},t="currentScript",o=!{}.hasOwnProperty.call(p,t)&&p[t]&&delete p[t]&&p[t]?p[t].src:void 0;var f,g,a;f=function(e,t,o){e.addEventListener?e.addEventListener(""+t,o):e.attachEvent("on"+t,o)},g=function(t,o,n){var r;f(t,o,r=function(e){return t.removeEventListener?t.removeEventListener(""+o,r):t.detachEvent("on"+o,r),n(e)})},a=function(e){var t,o;/m/.test(p.readyState)||!/g/.test(p.readyState)&&!p.documentElement.doScroll?setTimeout(e):p.addEventListener?(o=0,g(p,"DOMContentLoaded",t=function(){!o&&(o=1)&&e()}),g(window,"load",t)):(t=function(){/m/.test(p.readyState)&&(p.detachEvent("onreadystatechange",t),e())},p.attachEvent("onreadystatechange",t))};var m,w,b,v,x,i,C,y,F,k,z="body{margin:0}a{color:#24292e;text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn,.social-count{display:inline-block;font-weight:600;vertical-align:bottom;cursor:pointer;border:1px solid #d1d2d3;border-radius:0.25em}.btn:focus,.social-count:focus{border-color:#c8e1ff}.btn{background-color:#eff3f6;background-image:-webkit-linear-gradient(top, #fafbfc, #e4ebf0);background-image:-moz-linear-gradient(top, #fafbfc, #e4ebf0);background-image:linear-gradient(to bottom, #fafbfc, #e4ebf0);background-repeat:repeat-x;background-size:110% 110%;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFAFBFC', endColorstr='#FFE4EBF0')}.btn:active{background-color:#e9ecef;background-image:none;border-color:#afb1b2;box-shadow:inset 0 0.15em 0.3em rgba(27,31,35,0.15)}.btn:hover{background-color:#e6ebf1;background-image:-webkit-linear-gradient(top, #f0f3f6, #dce3ec);background-image:-moz-linear-gradient(top, #f0f3f6, #dce3ec);background-image:linear-gradient(to bottom, #f0f3f6, #dce3ec);border-color:#afb1b2;-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')\";*filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF0F3F6', endColorstr='#FFDCE3EC')}.social-count{position:relative;background-color:#fff}.social-count:hover{color:#0366d6}.octicon{position:relative;display:inline-block;vertical-align:top;fill:currentColor}.btn,.social-count{height:18px;padding:0 5px;line-height:18px}.btn{font-size:11px}.social-count{margin-left:5px;font-size:10px}.octicon{height:14px;top:2px}.large .btn,.large .social-count{height:26px;line-height:26px}.large .btn{padding:0 10px;font-size:12px}.large .social-count{padding:0 7px;margin-left:7px;font-size:11px}.large .octicon{height:18px;top:4px}.social-count b,.social-count i{position:absolute;top:50%;left:0;display:block;width:0;height:0;margin:-4px 0 0 -4px;_font-size:0;_line-height:0;border:solid transparent;border-width:4px 4px 4px 0}.social-count b{border-right-color:#d1d2d3}.social-count:focus b{border-right-color:#c8e1ff}.social-count i{margin-left:-3px;border-right-color:#fff}.social-count b,.social-count i{_border-top-color:red !important;_border-bottom-color:red !important;_border-left-color:red !important;_filter:chroma(color=red)}.large .social-count b,.large .social-count i{margin:-5px 0 0 -5px;border-width:5px 5px 5px 0}.large .social-count i{margin-left:-4px}\n",E={"mark-github":{width:16,height:16,path:''},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),E.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,p,h,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=z:d.appendChild(l(z)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(p=i("a")).href=t.href,p.target="_blank",/\.github\.com$/.test("."+p.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(p.href)&&(p.target="_top"):(p.href="#",p.target="_self"),p.className="btn",(h=t["aria-label"])&&p.setAttribute("aria-label",h),p.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),p.appendChild(l(" ")),p.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(p),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(f=g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count","watchers"):g[4]?(b="forks_count","network"):g[5]?(b="open_issues_count","issues"):(b="stargazers_count","stargazers")):(u="/users/"+g[1],b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ").slice(0,n<2?-1:void 0)+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],p.querySelectorAll)t=p.querySelectorAll("a."+l);else for(o=0,r=(i=p.getElementsByTagName("a")).length;o'},eye:{width:16,height:16,path:''},star:{width:14,height:16,path:''},"repo-forked":{width:10,height:16,path:''},"issue-opened":{width:14,height:16,path:''},"cloud-download":{width:16,height:16,path:''}};m=function(e,t){return e=(""+e).toLowerCase().replace(/^octicon-/,""),n.hasOwnProperty(e)||(e="mark-github"),'"},b={},w=function(e,t){var o,n,r,a,i,l,c,d;1<(l=b[e]||(b[e]=[])).push(t)||(a=0,n=function(){if(!a&&(a=1))for(delete b[e];t=l.shift();)t.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(d=new o,f(d,"abort",n),f(d,"error",n),f(d,"load",function(){n(200!==d.status,function(){try{return JSON.parse(d.responseText)}catch(e){}}())}),d.open("GET",e),d.send()):((r=this||window)._=function(e){r._=null,n(200!==e.meta.status,e.data)},(c=r.document.createElement("script")).async=!0,c.src=e+(/\?/.test(e)?"&":"?")+"callback=_",f(c,"error",i=function(){r._&&r._({meta:{}})}),c.readyState&&f(c,"readystatechange",function(){"loaded"===c.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(c)))},v=function(e,t,o){var r,a,n,i,l,c,d,s,p,h,u,f,g,b;t&&(n=this,c=e.ownerDocument,l=function(e){return c.createTextNode(e)},(d=(i=function(e){return c.createElement(e)})("style")).type="text/css",e.appendChild(d),d.styleSheet?d.styleSheet.cssText=k:d.appendChild(l(k)),(s=e.appendChild(i("div"))).className="widget"+(/^large$/i.test(t["data-size"])?" large":""),a=function(){o&&o(s)},(p=i("a")).href=t.href,p.target="_blank",/\.github\.com$/.test("."+p.hostname)?/^https?:\/\/((gist\.)?github\.com\/[^\/?#]+\/[^\/?#]+\/archive\/|github\.com\/[^\/?#]+\/[^\/?#]+\/releases\/download\/|codeload\.github\.com\/)/.test(p.href)&&(p.target="_top"):(p.href="#",p.target="_self"),p.className="btn",(h=t["aria-label"])&&p.setAttribute("aria-label",h),p.innerHTML=m(t["data-icon"],/^large$/i.test(t["data-size"])?16:14),p.appendChild(l(" ")),p.appendChild(i("span")).appendChild(l(t["data-text"]||"")),r=s.appendChild(p),/^(true|1)$/i.test(t["data-show-count"])&&"github.com"===r.hostname?!(g=r.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||g[6]?a():(f=g[2]?(u="/repos/"+g[1]+"/"+g[2],g[3]?(b="subscribers_count","watchers"):g[4]?(b="forks_count","network"):g[5]?(b="open_issues_count","issues"):(b="stargazers_count","stargazers")):(u="/users/"+g[1],b="followers"),w.call(n,"https://api.github.com/"+u,function(e,t){var o,n;e||(n=t[b],(o=i("a")).href=t.html_url+"/"+f,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",n+" "+b.replace(/_count$/,"").replace("_"," ").slice(0,n<2?-1:void 0)+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+n).replace(/\B(?=(\d{3})+(?!\d))/g,","))),r.parentNode.insertBefore(o,r.nextSibling)),a()})):a())},x=function(){var e,t,o,n,r,a,i;if(t=[],p.querySelectorAll)t=p.querySelectorAll("a."+l);else for(o=0,r=(i=p.getElementsByTagName("a")).length;o - it "should export current script url if available and safe", -> - if currentScriptURL - expect currentScriptURL - .to.have.string "current-script.spec" - else - expect currentScriptURL - .to.be.undefined From aa14538798dd9ce39d19e610020dab5ca59c33b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Sun, 17 Feb 2019 14:38:23 -0800 Subject: [PATCH 0105/1193] Callback style interface --- README.md | 111 ++++++++++--------------------------- dist/buttons.common.js | 45 +++------------ dist/buttons.d.ts | 10 +++- dist/buttons.esm.js | 50 ++++------------- dist/buttons.js | 77 +++++++++++++------------ dist/buttons.min.js | 2 +- src/batch.coffee | 5 +- src/container.coffee | 15 ++--- test/unit/container.coffee | 73 ++++++++++++++++++++++++ 9 files changed, 178 insertions(+), 210 deletions(-) create mode 100644 test/unit/container.coffee diff --git a/README.md b/README.md index a32541f0..f583b09f 100644 --- a/README.md +++ b/README.md @@ -4,45 +4,43 @@ github-buttons [![CircleCI](https://img.shields.io/circleci/project/github/ntkme/github-buttons.svg)](https://circleci.com/gh/ntkme/github-buttons) [![Codecov](https://img.shields.io/codecov/c/github/ntkme/github-buttons.svg)](https://codecov.io/gh/ntkme/github-buttons) +Usage +----- -To get started, checkout **[buttons.github.io](https://buttons.github.io)**! +### Use as a Snippet -Documentation -------------- +``` html + + +``` -### Quick Start +Get started quickly with **[github:button configurator](https://buttons.github.io)**. -The easiest way to get started is to use the **[github:button configurator](https://buttons.github.io)**. +The source code for the configurator is available at [ntkme/github-buttons-app](https://github.com/ntkme/github-buttons-app). -The source code for the configurator is at [ntkme/github-buttons-app](https://github.com/ntkme/github-buttons-app). +### Use as a Module -### Components +``` javascript +import { render } from 'github-buttons' -- [vue-github-button](https://github.com/ntkme/vue-github-button) for [Vue](https://vuejs.org) +// export function render(anchor: HTMLAnchorElement, callback: (el: HTMLElement) => void): void; +render(anchor, function (el) { + anchor.parentNode.replaceChild(el, anchor) +}) -### Basic Usage (without component) +// export function render(options: object, callback: (el: HTMLElement) => void): void; +render(options, function (el) { + document.body.appendChild(el) +}) +``` -#### Markup Syntax +### Use as a Component -``` html - -{{ text }} -``` +- [vue-github-button](https://github.com/ntkme/vue-github-button) for [Vue](https://vuejs.org) -``` html - - -``` +### Options -#### Config +These options are the same for all the use cases described above: | Attribute | Description | | --------- | ----------- | @@ -56,7 +54,7 @@ The source code for the configurator is at [ntkme/github-buttons-app](https://gi ##### Built-in Button Types -Button type is detected through button's `href` attribute. +Button type is detected from `href`. - `https://github.com/:user` (follow) - `https://github.com/:user/:repo` (star) @@ -65,63 +63,12 @@ Button type is detected through button's `href` attribute. - `https://github.com/:user/:repo/issues` (issues) - `https://github.com/:user/:repo/issues/new` (issues) -Tailing slash, query string, and hash in the `href` are handled. +Tailing slash, query string, and hash in the `href` won't affect type detection. - `https://github.com/:user/` (follow) - `https://github.com/:user?tab=repositories` (follow) -- `https://github.com/:user/:repo#license` (star) -- `https://github.com/:user/:repo/#license` (star) - -### Advanced Usage - -#### Import as a Module - -This module works with CommonJS or AMD loader. - -The default behavior of including the ` -``` - Get started quickly with **[github:button configurator](https://buttons.github.io)**. The source code for the configurator is available at [ntkme/github-buttons-app](https://github.com/ntkme/github-buttons-app). @@ -45,7 +40,7 @@ These options are the same for all the use cases described above: | Attribute | Description | | --------- | ----------- | | `href` | GitHub link for the button. | -| `title` | `title` attribute for the button's `