hugo-theme-relearn/js/github-buttons/github-buttons.min.js

7 lines
20 KiB
JavaScript
Raw Normal View History

/*!
* github-buttons v2.27.0
McShelby/hugo-theme-relearn#155
- make render() available on window.githubButtons
* (c) 2023 なつき
* @license BSD-2-Clause
*/(function(){"use strict";var e=window.document,a=e.location,i=window.Math,u=window.HTMLElement,r=window.XMLHttpRequest,y="github-button",j="https://"+"buttons.github.io"+"/buttons.html",n="github.com",$="https://api."+n,k=r&&"prototype"in r&&"withCredentials"in r.prototype,N=k&&u&&"attachShadow"in u.prototype&&!("prototype"in u.prototype.attachShadow),o=function(e,t){for(var n=0,s=e.length;n<s;n++)t(e[n])},h=function(e){return function(t,n,s){var a,r,i=e.createElement(t);if(n!=null)for(a in n)r=n[a],r!=null&&(i[a]!=null?i[a]=r:i.setAttribute(a,r));return s!=null&&o(s,function(t){i.appendChild(typeof t=="string"?e.createTextNode(t):t)}),i}},E=h(e),C=function(e){var t;return function(){t||(t=1,e.apply(this,arguments))}},c=function(e,t){return{}.hasOwnProperty.call(e,t)},g=function(e){return(""+e).toLowerCase()},V=function(e,t,n,s){t==null&&(t="&"),n==null&&(n="="),s==null&&(s=window.encodeURIComponent);var o,a,i=[];for(a in e)o=e[a],o!=null&&i.push(s(a)+n+s(o));return i.join(t)},b=function(e,t,n,s){t==null&&(t="&"),n==null&&(n="="),s==null&&(s=window.decodeURIComponent);var i={};return o(e.split(t),function(e){if(e!==""){var t=e.split(n);i[s(t[0])]=t[1]!=null?s(t.slice(1).join(n)):void 0}}),i},t=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},d=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},v=function(e,n,s){var o=function(){return d(e,n,o),s.apply(this,arguments)};t(e,n,o)},w=function(e,n,s){if(e.readyState!=null){var o="readystatechange",i=function(){if(n.test(e.readyState))return d(e,o,i),s.apply(this,arguments)};t(e,o,i)}},I=function(t){if(e.readyState==="complete"||e.readyState!=="loading"&&!e.documentElement.doScroll)setTimeout(t);else if(e.addEventListener){var n=C(t);v(e,"DOMContentLoaded",n),v(window,"load",n)}else w(e,/m/,t)},H="body{margin:0}a{text-decoration:none;outline:0}.widget{display:inline-block;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif;font-size:0;line-height:0;white-space:nowrap}.btn,.social-count{position:relative;display:inline-block;display:inline-flex;height:14px;padding:2px 5px;font-size:11px;font-weight:600;line-height:14px;vertical-align:bottom;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-repeat:repeat-x;background-position:-1px -1px;background-size:110% 110%;border:1px solid}.btn{border-radius:.25em}.btn:not(:last-child){border-radius:.25em 0 0 .25em}.social-count{border-left:0;border-radius:0 .25em .25em 0}.widget-lg .btn,.widget-lg .social-count{height:16px;padding:5px 10px;font-size:12px;line-height:16px}.octicon{display:inline-block;vertical-align:text-top;fill:currentColor;overflow:visible}",R=`.btn:focus-visible,.social-count:focus-visible{outline:2px solid #0969da;outline-offset:-2px}.btn{color:#24292f;background-color:#ebf0f4;border-color:#ccd1d5;border-color:rgba(31,35,40,.15);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3clinearGradient id='o' x2='0' y2='1'%3e%3cstop stop-color='%23f6f8fa'/%3e%3cstop offset='90%25' stop-color='%23ebf0f4'/%3e%3c/linearGradient%3e%3crect width='100%25' height='100%25' fill='url(%23o)'/%3e%3c/svg%3e");background-image:-moz-linear-gradient(top, #f6f8fa, #ebf0f4 90%);background-image:linear-gradient(180deg, #f6f8fa, #ebf0f4 90%);filter:progid:DXImageTransform.Microsoft.Gradient(startColorstr='#FFF6F8FA', endColorstr='#FFEAEFF3')}:root .btn{filter:none}.btn:hover,.btn:focus{background-color:#e9ebef;background-position:0 -0.5em;border-color:#cbcdd1;border-color:rgba(31,35,40,.15);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg'%3e%3clinearGradient id='o' x2='0' y2='1'%3e%3cstop stop-color='%23f3f4f6'/%3e%3cstop offset='90%25' stop-color='%23e9ebef'/%3e%3c/linearGradient%3e%3crect width='100%25' height='100%25' fill='url(%23o)'/%3e%3c/svg%3e");background-image:-moz-linear-gradient(top, #f3f4f6, #e9ebef 90%);background-image:linear-gradient(180deg, #f3f4f6, #e9ebef 90%);filter:prog