From 43acceb75957c880a5ba5a31aae221394a36d5f6 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 16 May 2024 11:31:39 +0800 Subject: replaced html-minifier -> html-minifier-terser --- public/js/getrepo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public') diff --git a/public/js/getrepo.js b/public/js/getrepo.js index 218109ce..f7234792 100644 --- a/public/js/getrepo.js +++ b/public/js/getrepo.js @@ -1 +1 @@ -function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return{s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2},f:function f(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i\n\t\t\t\"user\n\t\t\n\t\t
\n\t\t\t\n\t\t\t

").concat(profile.name,"

\n\t\t\t\n\t\t\t

").concat(profile.bio,"

\n\t\t\t

\n\t\t\tMail: ").concat(profile.email,"\n\t\t\t

\n\t\t\t

\n\t\t\t\tLocation: ").concat(profile.location,"\n\t\t\t

\n\t\t\t

\n\t\t\t\t@").concat(profile.login," \n\t\t\t\tRepos: ").concat(profile.public_repos,"\n\t\t\t\tGists: ").concat(profile.public_gists,"\n\t\t\t

\n\t\t
\n\t")},getRepos=function(){var _ref2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(){var repos,res,data;return _regeneratorRuntime().wrap(function _callee2$(_context2){for(;1;)switch(_context2.prev=_context2.next){case 0:return repos=[],_context2.next=3,fetch("https://api.github.com/users/".concat(username,"/repos?&sort=pushed"));case 3:return res=_context2.sent,_context2.next=6,res.json();case 6:data=_context2.sent,repos=repos.concat(data),repos.sort(function(a,b){return b.forks_count-a.forks_count}),repos.sort(function(a,b){return b.stargazers_count-a.stargazers_count}),displayRepos(repos);case 11:case"end":return _context2.stop()}},_callee2)}));return function getRepos(){return _ref2.apply(this,arguments)}}();getRepos();var displayRepos=function displayRepos(repos){var userHome="https://github.com/".concat(username);filterInput.classList.remove("hide");var _step,_iterator=_createForOfIteratorHelper(repos);try{for(_iterator.s();!(_step=_iterator.n()).done;){var repo=_step.value;if(!(repo.fork&&hideForks)){var langUrl="".concat("https://github.com/littleblack111","?tab=repositories&q=&language=").concat(repo.language),starsUrl="".concat("https://github.com/littleblack111","/").concat(repo.name,"/stargazers"),forksUrl="".concat("https://github.com/littleblack111","/").concat(repo.name,"/network/members"),listItem=document.createElement("li");listItem.classList.add("repo","animate","zoomIn"),listItem.innerHTML="\n\t\t\t

".concat(repo.name,"

\n\t\t\t").concat(repo.description?"".concat(repo.description,""):"","

"),0\n\t\t\t\u2B50 ").concat(repo.stargazers_count,"")),repo.language&&(listItem.innerHTML+="\n\t\t\t").concat(devicons[repo.language],"")),0\n\t\t\t").concat(devicons.Git," ").concat(repo.forks_count,"")),listItem.innerHTML+=repo.homepage&&""!==repo.homepage?"

\n\t\t\tCode ").concat(devicons.Github,"\n\t\t\tLive ").concat(devicons.Chrome,"
"):"

\n\t\t\tView Project ").concat(devicons.Github,"
"),repoList.append(listItem)}}}catch(err){_iterator.e(err)}finally{_iterator.f()}};filterInput.addEventListener("input",function(e){var _step2,search=e.target.value,repos=document.querySelectorAll(".repo"),searchLowerText=search.toLowerCase(),_iterator2=_createForOfIteratorHelper(repos);try{var _loop=function _loop(){var repo=_step2.value,lowerText=repo.innerText.toLowerCase();lowerText.includes(searchLowerText)?(repo.classList.remove("hide"),repo.style.position="relative"):(repo.classList.add("hide"),repo.addEventListener("animationend",function(){repo.style.position=""==searchLowerText?"relative":"absolute"}))};for(_iterator2.s();!(_step2=_iterator2.n()).done;)_loop()}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}),filterInput.onfocus=function(event){filterInput.style.transform="scale(1.1)"},filterInput.onblur=function(event){filterInput.style.transform=""};var devicons={Git:"",Github:"",Chrome:"",Assembly:" Assembly","C#":" C#","C++":" C++",C:" C",Clojure:" C",CoffeeScript:" CoffeeScript",Crystal:" Crystal",CSS:" CSS",Dart:" Dart",Dockerfile:" Docker",Elixir:" Elixir",Elm:" Elm",Erlang:" Erlang","F#":" F#",Go:" Go",Groovy:" Groovy",HTML:" HTML",Haskell:" Haskell",Java:" Java",JavaScript:" JavaScript",Julia:" Julia","Jupyter Notebook":" Jupyter",Kotlin:" Kotlin",Latex:" Latex",Lua:" Lua",Matlab:" Matlab",Nim:" Nim",Nix:" Nix",ObjectiveC:" ObjectiveC",OCaml:" OCaml",Perl:" Perl",PHP:" PHP",PLSQL:" PLSQL",Processing:" Processing",Python:" Python",R:" R",Ruby:" Ruby",Rust:" Rust",Sass:" Sass",Scala:" Scala",Shell:" Shell",Solidity:" Solidity",Stylus:" Stylus",Svelte:" Svelte",Swift:" Swift",Terraform:" Terraform",TypeScript:" TypeScript","Vim Script":" Vim Script",Vue:" Vue",Mail:""}; \ No newline at end of file +function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function(){};return{s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2},f:function f(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i\n\t\t\t\"user\n\t\t\n\t\t
\n\t\t\t\n\t\t\t

").concat(profile.name,"

\n\t\t\t\n\t\t\t

").concat(profile.bio,"

\n\t\t\t

\n\t\t\tMail: ").concat(profile.email,"\n\t\t\t

\n\t\t\t

\n\t\t\t\tLocation: ").concat(profile.location,"\n\t\t\t

\n\t\t\t

\n\t\t\t\t@").concat(profile.login," \n\t\t\t\tRepos: ").concat(profile.public_repos,"\n\t\t\t\tGists: ").concat(profile.public_gists,"\n\t\t\t

\n\t\t
\n\t")},getRepos=function(){var _ref2=_asyncToGenerator(_regeneratorRuntime().mark(function _callee2(){var repos,res,data;return _regeneratorRuntime().wrap(function _callee2$(_context2){for(;1;)switch(_context2.prev=_context2.next){case 0:return repos=[],_context2.next=3,fetch("https://api.github.com/users/".concat(username,"/repos?&sort=pushed"));case 3:return res=_context2.sent,_context2.next=6,res.json();case 6:data=_context2.sent,repos=repos.concat(data),repos.sort(function(a,b){return b.forks_count-a.forks_count}),repos.sort(function(a,b){return b.stargazers_count-a.stargazers_count}),displayRepos(repos);case 11:case"end":return _context2.stop()}},_callee2)}));return function getRepos(){return _ref2.apply(this,arguments)}}();getRepos();var displayRepos=function displayRepos(repos){var userHome="https://github.com/".concat(username);filterInput.classList.remove("hide");var _step,_iterator=_createForOfIteratorHelper(repos);try{for(_iterator.s();!(_step=_iterator.n()).done;){var repo=_step.value;if(!(repo.fork&&hideForks)){var langUrl="".concat("https://github.com/littleblack111","?tab=repositories&q=&language=").concat(repo.language),starsUrl="".concat("https://github.com/littleblack111","/").concat(repo.name,"/stargazers"),forksUrl="".concat("https://github.com/littleblack111","/").concat(repo.name,"/network/members"),listItem=document.createElement("li");listItem.classList.add("repo","animate","zoomIn"),listItem.innerHTML="\n\t\t\t

".concat(repo.name,"

\n\t\t\t").concat(repo.description?"".concat(repo.description,""):"","

"),0\n\t\t\t\u2B50 ").concat(repo.stargazers_count,"")),repo.language&&(listItem.innerHTML+="\n\t\t\t").concat(devicons[repo.language],"")),0\n\t\t\t").concat(devicons.Git," ").concat(repo.forks_count,"")),listItem.innerHTML+=repo.homepage&&""!==repo.homepage?"

\n\t\t\tCode ").concat(devicons.Github,"\n\t\t\tLive ").concat(devicons.Chrome,"
"):"

\n\t\t\tView Project ").concat(devicons.Github,"
"),repoList.append(listItem)}}}catch(err){_iterator.e(err)}finally{_iterator.f()}};filterInput.addEventListener("input",function(e){var _step2,search=e.target.value,repos=document.querySelectorAll(".repo"),searchLowerText=search.toLowerCase(),_iterator2=_createForOfIteratorHelper(repos);try{var _loop=function _loop(){var repo=_step2.value,lowerText=repo.innerText.toLowerCase();lowerText.includes(searchLowerText)?(repo.classList.remove("hide"),repo.style.position="relative"):(repo.classList.add("hide"),repo.addEventListener("animationend",function(){repo.style.position=""==searchLowerText?"relative":"absolute"}))};for(_iterator2.s();!(_step2=_iterator2.n()).done;)_loop()}catch(err){_iterator2.e(err)}finally{_iterator2.f()}}),filterInput.onfocus=function(event){filterInput.style.transform="scale(1.1)"},filterInput.onblur=function(event){filterInput.style.transform=""};var devicons={Git:"",Github:"",Chrome:"",Assembly:" Assembly","C#":" C#","C++":" C++",C:" C",Clojure:" C",CoffeeScript:" CoffeeScript",Crystal:" Crystal",CSS:" CSS",Dart:" Dart",Dockerfile:" Docker",Elixir:" Elixir",Elm:" Elm",Erlang:" Erlang","F#":" F#",Go:" Go",Groovy:" Groovy",HTML:" HTML",Haskell:" Haskell",Java:" Java",JavaScript:" JavaScript",Julia:" Julia","Jupyter Notebook":" Jupyter",Kotlin:" Kotlin",Latex:" Latex",Lua:" Lua",Matlab:" Matlab",Nim:" Nim",Nix:" Nix",ObjectiveC:" ObjectiveC",OCaml:" OCaml",Perl:" Perl",PHP:" PHP",PLSQL:" PLSQL",Processing:" Processing",Python:" Python",R:" R",Ruby:" Ruby",Rust:" Rust",Sass:" Sass",Scala:" Scala",Shell:" Shell",Solidity:" Solidity",Stylus:" Stylus",Svelte:" Svelte",Swift:" Swift",Terraform:" Terraform",TypeScript:" TypeScript","Vim Script":" Vim Script",Vue:" Vue",Mail:""}; \ No newline at end of file -- cgit v1.2.3