developer

Open Source Project Index

Code you can use, projects you can join

  • All
  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • J
  • K
  • L
  • M
  • N
  • O
  • P
  • Q
  • R
  • S
  • T
  • U
  • V
  • W
  • X
  • Y
  • Z

`+project.name+`

`+project.language+`

`+(project.description|| "")+`

`+overViewLink+`Source Code
`+(project.forksCount || 0 )+` `+(project.starsCount || 0 )+`
`); } }) document.getElementById('repo-data-holder').innerHTML = projectHtml; } function updateLanguageList(languages){ let selectHtml=""; let checkboxHtml=""; languages.forEach(function(languageName, i){ selectHtml+=``; checkboxHtml+=`
`; }) const selectHtmlContainer = document.getElementById('language-selector'); selectHtmlContainer.innerHTML = selectHtmlContainer.innerHTML + selectHtml; const checkboxContainer = document.getElementById('checkbox-container'); checkboxContainer.innerHTML = checkboxContainer.innerHTML + checkboxHtml; addAlphabetChangeEvent(); } function disableAlphabetsFromFilter(){ document.querySelectorAll('.alphabet-filter li:not(.all)').forEach(function(element){ if(!alphabetProjectMap[element.innerText]){ element.classList.add('disabled'); } }); } function filterProjectsByAlphabet(list,alphabet){ return alphabet==="All" ? list : list.filter(function(val){ return val.name.toUpperCase().startsWith(alphabet); }) } function addAlphabetChangeEvent(){ document.querySelector('.alphabet-filter ul').addEventListener("click", function(event){ const element = event.target; if(element.nodeName==='LI' && !element.classList.contains('disabled')){ selectedAplphabet = element.innerText; document.querySelector('li.selected').classList.remove('selected'); element.classList.add('selected'); updateProjectList(filterForMultipleLanguages(allProjects, languagesSelected ,selectedAplphabet)); } }); } function langaugeDropdownChanged(event){ const selectedLanguage = event.value; if(selectedLanguage==='All'){ projectsFilteredByLanguage = allProjects; languagesSelected = allLanguages.slice(); updateProjectList(filterProjectsByAlphabet(projectsFilteredByLanguage,selectedAplphabet)); document.querySelectorAll(".d.checkbox").forEach(function(el){ el.classList.remove('hidden'); el.querySelector('input').removeAttribute("disabled"); el.querySelector('input').checked = true; }); }else{ projectsFilteredByLanguage = languageProjectMap[selectedLanguage]; languagesSelected = [selectedLanguage] updateProjectList(filterProjectsByAlphabet(projectsFilteredByLanguage,selectedAplphabet)); document.querySelectorAll(".d.checkbox").forEach(function(el){ el.classList.add('hidden'); }); document.querySelector('.d.checkbox[data-check="'+selectedLanguage+'"]').classList.remove('hidden'); document.querySelector('.d.checkbox[data-check="'+selectedLanguage+'"] input').setAttribute("disabled", true); document.querySelector('.d.checkbox[data-check="'+selectedLanguage+'"] input').checked = true; } } function languageCheckboxChanged(event){ const selectedLanguage = event.value; const checked = event.checked; if(selectedLanguage==="All"){ if(checked) { projectsFilteredByLanguage = allProjects; updateProjectList(filterProjectsByAlphabet(allProjects,selectedAplphabet)); uncheckAllLanguages(true); languagesSelected = allLanguages.slice(); }else{ projectsFilteredByLanguage = []; languagesSelected = []; updateProjectList([]); uncheckAllLanguages(false); } return; } if(checked){ languagesSelected.push(selectedLanguage); if(languagesSelected.length === allLanguages.length){ uncheckAllLanguages(true); } }else{ languagesSelected.splice(languagesSelected.indexOf(selectedLanguage), 1); document.querySelector('.d.checkbox[data-check="All"] input').checked = false; } updateProjectList(filterForMultipleLanguages(allProjects, languagesSelected ,selectedAplphabet)); } function uncheckAllLanguages(check){ document.querySelectorAll(".d.checkbox input").forEach(function(element){ element.checked = check; }); } function filterForMultipleLanguages(list, languagesSelected, alphabet){ return alphabet==="All" ? list.filter(function(project){return languagesSelected.indexOf(project.language) != -1;}) : list.filter(function(project){return project.name.toUpperCase().startsWith(alphabet) && languagesSelected.indexOf(project.language) != -1;}); } function compare(a,b) { const aname = a.name.toUpperCase(); const bname = b.name.toUpperCase(); if (aname < bname) return -1; if (aname > bname) return 1; return 0; }