Socket
Socket
Sign inDemoInstall

github-buttons

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-buttons - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

7

dist/buttons.common.js

@@ -0,1 +1,6 @@

/*!
* github-buttons v2.0.5
* (c) 2019 なつき
* @license BSD-2-Clause
*/
'use strict';

@@ -20,3 +25,3 @@

var name = "github-buttons";
var version = "2.0.4";
var version = "2.0.5";

@@ -23,0 +28,0 @@ var apiBaseURL, iframeURL;

@@ -0,1 +1,6 @@

/*!
* github-buttons v2.0.5
* (c) 2019 なつき
* @license BSD-2-Clause
*/
var document = window.document;

@@ -16,3 +21,3 @@

var name = "github-buttons";
var version = "2.0.4";
var version = "2.0.5";

@@ -19,0 +24,0 @@ var apiBaseURL, iframeURL;

@@ -0,1 +1,6 @@

/*!
* github-buttons v2.0.5
* (c) 2019 なつき
* @license BSD-2-Clause
*/
(function () {

@@ -19,3 +24,3 @@ 'use strict';

var name = "github-buttons";
var version = "2.0.4";
var version = "2.0.5";

@@ -22,0 +27,0 @@ var apiBaseURL, buttonClass, iframeURL;

@@ -1,1 +0,6 @@

!function(){"use strict";var c,d,s=window.document,t=s.location,h=window.encodeURIComponent,l=window.decodeURIComponent,r=window.Math,p=function(t){return s.createElement(t)};c="github-button",d=(/^http:/.test(t)?"http":"https")+"://unpkg.com/github-buttons@2.0.4/dist/buttons.html";var u,f,e;u=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},f=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)})},e=function(t){var e,o;/m/.test(s.readyState)||!/g/.test(s.readyState)&&!s.documentElement.doScroll?setTimeout(t):s.addEventListener?(o=0,f(s,"DOMContentLoaded",e=function(){!o&&(o=1)&&t()}),f(window,"load",e)):(e=function(){/m/.test(s.readyState)&&(s.detachEvent("onreadystatechange",e),t())},s.attachEvent("onreadystatechange",e))};var m,v,g,b,w="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{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{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",o={"mark-github":{width:16,height:16,path:'<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>'},eye:{width:16,height:16,path:'<path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/>'},star:{width:14,height:16,path:'<path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"/>'},"repo-forked":{width:10,height:16,path:'<path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/>'},"issue-opened":{width:14,height:16,path:'<path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"/>'},"cloud-download":{width:16,height:16,path:'<path fill-rule="evenodd" d="M9 12h2l-3 3-3-3h2V7h2v5zm3-8c0-.44-.91-3-4.5-3C5.08 1 3 2.92 3 5 1.02 5 0 6.52 0 8c0 1.53 1 3 3 3h3V9.7H3C1.38 9.7 1.3 8.28 1.3 8c0-.17.05-1.7 1.7-1.7h1.3V5c0-1.39 1.56-2.7 3.2-2.7 2.55 0 3.13 1.55 3.2 1.8v1.2H12c.81 0 2.7.22 2.7 2.2 0 2.09-2.25 2.2-2.7 2.2h-2V11h2c2.08 0 4-1.16 4-3.5C16 5.06 14.08 4 12 4z"/>'}};m=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),o.hasOwnProperty(t)||(t="mark-github"),'<svg version="1.1" width="'+e*o[t].width/o[t].height+'" height="'+e+'" viewBox="0 0 '+o[t].width+" "+o[t].height+'" class="octicon octicon-'+t+'" aria-hidden="true">'+o[t].path+"</svg>"},g={},v=function(t,e){var o,n,r,a,i,l,c,d;1<(l=g[t]||(g[t]=[])).push(e)||(a=0,n=function(){if(!a&&(a=1))for(delete g[t];e=l.shift();)e.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(t){}}())}),d.open("GET",t),d.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=_",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)))},b=function(t,e,o){var r,a,n,i,l,c,d,s,h,p,u,f,g,b;e&&(n=this,c=t.ownerDocument,l=function(t){return c.createTextNode(t)},(d=(i=function(t){return c.createElement(t)})("style")).type="text/css",t.appendChild(d),d.styleSheet?d.styleSheet.cssText=w:d.appendChild(l(w)),(s=t.appendChild(i("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),a=function(){o&&o(s)},(h=i("a")).href=e.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=e["aria-label"])&&h.setAttribute("aria-label",p),h.innerHTML=m(e["data-icon"],/^large$/i.test(e["data-size"])?18:14),h.appendChild(l(" ")),h.appendChild(i("span")).appendChild(l(e["data-text"]||"")),r=s.appendChild(h),/^(true|1)$/i.test(e["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"),v.call(n,"https://api.github.com"+u,function(t,e){var o,n;t||(n=e[b],(o=i("a")).href=e.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())};var a,n,x,C,y,i;n=window.devicePixelRatio||1,a=function(t){return(1<n?r.ceil(r.round(t*n)/n*2)/2:r.ceil(t))||0},x=function(t){var e,o,n;return n=t.scrollWidth,o=t.scrollHeight,t.getBoundingClientRect&&(e=t.getBoundingClientRect(),n=r.max(n,a(e.width||e.right-e.left)),o=r.max(o,a(e.height||e.bottom-e.top))),[n,o]},C=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"},y=function(o,n){var t,e,r,a,i,l,c;if(null!=o&&null!=n)if(o.getAttribute&&(o=function(t){var e,o,n,r,a;for(r={href:t.href,title:t.title,"aria-label":t.getAttribute("aria-label")},o=0,n=(a=["icon","text","size","show-count"]).length;o<n;o++)r[e="data-"+(e=a[o])]=t.getAttribute(e);return null==r["data-text"]&&(r["data-text"]=t.textContent||t.innerText),r}(o)),(t=window.HTMLElement)&&t.prototype.attachShadow&&!t.prototype.attachShadow.prototype)e=p("span"),(l=o.title)&&(e.title=l),b(e.attachShadow({mode:"closed"}),o,function(){n(e)});else{for(a in r=p("iframe"),i={allowtransparency:!0,scrolling:"no",frameBorder:0})c=i[a],r.setAttribute(a,c);C(r,[1,0]),r.style.border="none",r.src="javascript:0",f(r,"load",function(){var t;t=r.contentWindow,b.call(t,t.document.body,o,function(t){var e;e=x(t),r.parentNode.removeChild(r),f(r,"load",function(){C(r,e)}),r.src=d+"#"+function(t){var e,o,n;for(e in o=[],t)null!=(n=t[e])&&o.push(h(e)+"="+h(n));return o.join("&")}(o),(l=o.title)&&(r.title=l),n(r)})}),s.body.appendChild(r)}},i=function(){var t,e,o,n,r,a,i,l;if(e=[],s.querySelectorAll)e=s.querySelectorAll("a."+c);else for(n=0,a=(l=s.getElementsByTagName("a")).length;n<a;n++)~(" "+(t=l[n]).className+" ").replace(/[ \t\n\f\r]+/g," ").indexOf(" "+c+" ")&&e.push(t);for(o=function(e){y(e,function(t){e.parentNode.replaceChild(t,e)})},r=0,i=e.length;r<i;r++)o(t=e[r])},t.protocol+"//"+t.host+t.pathname===d?b(s.body,function(t){var e,o,n,r,a,i;for(r={},e=0,o=(i=t.split("&")).length;e<o;e++)""!==(n=i[e])&&(a=n.split("="),r[l(a[0])]=null!=a[1]?l(a.slice(1).join("=")):void 0);return r}(t.hash.replace(/^#/,""))):e(i)}();
/*!
* github-buttons v2.0.5
* (c) 2019 なつき
* @license BSD-2-Clause
*/
!function(){"use strict";var t,e=window.document,o=e.location,n=window.encodeURIComponent,r=window.decodeURIComponent,a=window.Math,i=function(t){return e.createElement(t)};t=(/^http:/.test(o)?"http":"https")+"://unpkg.com/github-buttons@2.0.5/dist/buttons.html";var l,c,d;l=function(t,e,o){t.addEventListener?t.addEventListener(""+e,o):t.attachEvent("on"+e,o)},c=function(t,e,o){var n;n=function(r){return t.removeEventListener?t.removeEventListener(""+e,n):t.detachEvent("on"+e,n),o(r)},l(t,e,n)},d=function(t){var o,n;/m/.test(e.readyState)||!/g/.test(e.readyState)&&!e.documentElement.doScroll?setTimeout(t):e.addEventListener?(n=0,c(e,"DOMContentLoaded",o=function(){!n&&(n=1)&&t()}),c(window,"load",o)):(o=function(){/m/.test(e.readyState)&&(e.detachEvent("onreadystatechange",o),t())},e.attachEvent("onreadystatechange",o))};var s,h,u,p,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\", 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{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{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",g={"mark-github":{width:16,height:16,path:'<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>'},eye:{width:16,height:16,path:'<path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/>'},star:{width:14,height:16,path:'<path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"/>'},"repo-forked":{width:10,height:16,path:'<path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/>'},"issue-opened":{width:14,height:16,path:'<path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"/>'},"cloud-download":{width:16,height:16,path:'<path fill-rule="evenodd" d="M9 12h2l-3 3-3-3h2V7h2v5zm3-8c0-.44-.91-3-4.5-3C5.08 1 3 2.92 3 5 1.02 5 0 6.52 0 8c0 1.53 1 3 3 3h3V9.7H3C1.38 9.7 1.3 8.28 1.3 8c0-.17.05-1.7 1.7-1.7h1.3V5c0-1.39 1.56-2.7 3.2-2.7 2.55 0 3.13 1.55 3.2 1.8v1.2H12c.81 0 2.7.22 2.7 2.2 0 2.09-2.25 2.2-2.7 2.2h-2V11h2c2.08 0 4-1.16 4-3.5C16 5.06 14.08 4 12 4z"/>'}};s=function(t,e){return t=(""+t).toLowerCase().replace(/^octicon-/,""),g.hasOwnProperty(t)||(t="mark-github"),'<svg version="1.1" width="'+e*g[t].width/g[t].height+'" height="'+e+'" viewBox="0 0 '+g[t].width+" "+g[t].height+'" class="octicon octicon-'+t+'" aria-hidden="true">'+g[t].path+"</svg>"},u={},h=function(t,e){var o,n,r,a,i,c,d,s;1<(c=u[t]||(u[t]=[])).push(e)||(a=0,n=function(){if(!a&&(a=1))for(delete u[t];e=c.shift();)e.apply(null,arguments)},(o=window.XMLHttpRequest)&&"withCredentials"in o.prototype?(s=new o,l(s,"abort",n),l(s,"error",n),l(s,"load",function(){n(200!==s.status,function(){try{return JSON.parse(s.responseText)}catch(t){}}())}),s.open("GET",t),s.send()):((r=this||window)._=function(t){r._=null,n(200!==t.meta.status,t.data)},(d=r.document.createElement("script")).async=!0,d.src=t+(/\?/.test(t)?"&":"?")+"callback=_",l(d,"error",i=function(){r._&&r._({meta:{}})}),d.readyState&&l(d,"readystatechange",function(){"loaded"===d.readyState&&i()}),r.document.getElementsByTagName("head")[0].appendChild(d)))},p=function(t,e,o){var n,r,a,i,l,c,d,u,p,g,b,m,v,w;e&&(a=this,c=t.ownerDocument,l=function(t){return c.createTextNode(t)},(d=(i=function(t){return c.createElement(t)})("style")).type="text/css",t.appendChild(d),d.styleSheet?d.styleSheet.cssText=f:d.appendChild(l(f)),(u=t.appendChild(i("div"))).className="widget"+(/^large$/i.test(e["data-size"])?" large":""),r=function(){o&&o(u)},(p=i("a")).href=e.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",(g=e["aria-label"])&&p.setAttribute("aria-label",g),p.innerHTML=s(e["data-icon"],/^large$/i.test(e["data-size"])?18:14),p.appendChild(l(" ")),p.appendChild(i("span")).appendChild(l(e["data-text"]||"")),n=u.appendChild(p),/^(true|1)$/i.test(e["data-show-count"])&&"github.com"===n.hostname?!(v=n.pathname.replace(/^(?!\/)/,"/").match(/^\/([^\/?#]+)(?:\/([^\/?#]+)(?:\/(?:(subscription)|(fork)|(issues)|([^\/?#]+)))?)?(?:[\/?#]|$)/))||v[6]?r():(v[2]?(b="/repos/"+v[1]+"/"+v[2],v[3]?(w="subscribers_count",m="watchers"):v[4]?(w="forks_count",m="network"):v[5]?(w="open_issues_count",m="issues"):(w="stargazers_count",m="stargazers")):(b="/users/"+v[1],m=w="followers"),h.call(a,"https://api.github.com"+b,function(t,e){var o,a;t||(a=e[w],(o=i("a")).href=e.html_url+"/"+m,o.target="_blank",o.className="social-count",o.setAttribute("aria-label",a+" "+w.replace(/_count$/,"").replace("_"," ").slice(0,a<2?-1:void 0)+" on GitHub"),o.appendChild(i("b")),o.appendChild(i("i")),o.appendChild(i("span")).appendChild(c.createTextNode((""+a).replace(/\B(?=(\d{3})+(?!\d))/g,","))),n.parentNode.insertBefore(o,n.nextSibling)),r()})):r())};var b,m,v,w,x,C;m=window.devicePixelRatio||1,b=function(t){return(m>1?a.ceil(a.round(t*m)/m*2)/2:a.ceil(t))||0},v=function(t){var e,o,n;return n=t.scrollWidth,o=t.scrollHeight,t.getBoundingClientRect&&(e=t.getBoundingClientRect(),n=a.max(n,b(e.width||e.right-e.left)),o=a.max(o,b(e.height||e.bottom-e.top))),[n,o]},w=function(t,e){t.style.width=e[0]+"px",t.style.height=e[1]+"px"},x=function(o,r){var a,l,d,s,h,u,f;if(null!=o&&null!=r)if(o.getAttribute&&(o=function(t){var e,o,n,r,a;for(r={href:t.href,title:t.title,"aria-label":t.getAttribute("aria-label")},o=0,n=(a=["icon","text","size","show-count"]).length;o<n;o++)r[e="data-"+(e=a[o])]=t.getAttribute(e);return null==r["data-text"]&&(r["data-text"]=t.textContent||t.innerText),r}(o)),(a=window.HTMLElement)&&a.prototype.attachShadow&&!a.prototype.attachShadow.prototype)l=i("span"),(u=o.title)&&(l.title=u),p(l.attachShadow({mode:"closed"}),o,function(){r(l)});else{for(s in d=i("iframe"),h={allowtransparency:!0,scrolling:"no",frameBorder:0})f=h[s],d.setAttribute(s,f);w(d,[1,0]),d.style.border="none",d.src="javascript:0",c(d,"load",function(){var e;e=d.contentWindow,p.call(e,e.document.body,o,function(e){var a;a=v(e),d.parentNode.removeChild(d),c(d,"load",function(){w(d,a)}),d.src=t+"#"+function(t){var e,o,r;for(e in o=[],t)null!=(r=t[e])&&o.push(n(e)+"="+n(r));return o.join("&")}(o),(u=o.title)&&(d.title=u),r(d)})}),e.body.appendChild(d)}},C=function(){var t,o,n,r,a,i,l,c;if(o=[],e.querySelectorAll)o=e.querySelectorAll("a.github-button");else for(r=0,i=(c=e.getElementsByTagName("a")).length;r<i;r++)~(" "+(t=c[r]).className+" ").replace(/[ \t\n\f\r]+/g," ").indexOf(" github-button ")&&o.push(t);for(n=function(t){x(t,function(e){t.parentNode.replaceChild(e,t)})},a=0,l=o.length;a<l;a++)n(t=o[a])},o.protocol+"//"+o.host+o.pathname===t?p(e.body,function(t){var e,o,n,a,i,l;for(a={},e=0,o=(l=t.split("&")).length;e<o;e++)""!==(n=l[e])&&(i=n.split("="),a[r(i[0])]=null!=i[1]?r(i.slice(1).join("=")):void 0);return a}(o.hash.replace(/^#/,""))):d(C)}();

19

package.json
{
"name": "github-buttons",
"version": "2.0.4",
"version": "2.0.5",
"description": "GitHub Buttons",

@@ -31,3 +31,3 @@ "keywords": [

"scripts": {
"build": "rollup -c rollup.config.js",
"build": "rollup -c rollup.config.js && eslint dist",
"pretest": "coffeelint src/ test/",

@@ -42,4 +42,5 @@ "test": "karma start --single-run"

"coffeescript": "=1.12.7",
"eslint": "^5.15.0",
"istanbul-instrumenter-loader": "^3.0.1",
"karma": "^4.0.0",
"karma": "^4.0.1",
"karma-chai": "^0.1.0",

@@ -56,7 +57,7 @@ "karma-chrome-launcher": "^2.2.0",

"karma-webpack": "^3.0.5",
"mocha": "^6.0.1",
"mocha": "^6.0.2",
"node-sass": "^4.11.0",
"octicons": "^8.4.2",
"octicons": "^8.5.0",
"raw-loader": "^1.0.0",
"rollup": "^1.2.3",
"rollup": "^1.4.0",
"rollup-plugin-coffee-script": "^2.0.0",

@@ -66,8 +67,8 @@ "rollup-plugin-json": "^3.1.0",

"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-uglify": "^6.0.2",
"rollup-plugin-terser": "^4.0.4",
"sass-loader": "^7.1.0",
"sinon": "^7.2.4",
"sinon": "^7.2.6",
"sinon-chai": "^3.3.0",
"webpack": "^4.29.5"
"webpack": "^4.29.6"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc