Travis build: 1802

This commit is contained in:
30secondsofcode
2018-03-12 18:55:28 +00:00
parent b8ce5306a6
commit 9ab3f40f35

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><link rel="stylesheet" href="./mini.css"><title>30 seconds of code</title><meta charset="utf-8"><meta name="description" content="Curated collection of useful Javascript snippets that you can understand in 30 seconds or less."><meta name="keywords" content="javascript, snippets, code, programming"><meta name="author" content="Angelos Chalaris (chalarangelo@gmail.com)"><meta name="viewport" content="width=device-width,initial-scale=1"><meta property="og:title" content="30 seconds of code"><meta property="og:description" content="Curated collection of useful Javascript snippets that you can understand in 30 seconds or less."/><meta property="og:type" content="website"/><meta property="og:image" content="favicon.png"><link rel="icon" type="image/png" href="favicon.png"><script>const search = (node) => { <!DOCTYPE html><html lang="en"><head><link rel="stylesheet" href="./mini.css"><title>30 seconds of code</title><meta charset="utf-8"><meta name="description" content="Curated collection of useful Javascript snippets that you can understand in 30 seconds or less."><meta name="keywords" content="javascript, snippets, code, programming"><meta name="author" content="Angelos Chalaris (chalarangelo@gmail.com)"><meta name="viewport" content="width=device-width,initial-scale=1"><meta property="og:title" content="30 seconds of code"><meta property="og:description" content="Curated collection of useful Javascript snippets that you can understand in 30 seconds or less."/><meta property="og:type" content="website"/><meta property="og:image" content="favicon.png"><link rel="icon" type="image/png" href="favicon.png"><script>const search = (node) => {
let matchingTags = []; let matchingTags = [];
Array.from(node.parentElement.parentElement.getElementsByTagName('a')).forEach(x => { Array.from(node.parentElement.parentElement.getElementsByTagName('a')).forEach(x => {
let data = [x.innerText.toLowerCase(), ...x.getAttribute('tags').split(',')].map(v => !!(v.indexOf(node.value.toLowerCase()) + 1)); let data = [x.textContent.toLowerCase(), ...x.getAttribute('tags').split(',')].map(v => !!(v.indexOf(node.value.toLowerCase()) + 1));
if(data.includes(true)){ if(data.includes(true)){
x.style.display = ''; x.style.display = '';
matchingTags.push(x.getAttribute('tags').split(',')[0]); matchingTags.push(x.getAttribute('tags').split(',')[0]);
@ -9,7 +9,7 @@
else x.style.display = 'none'; else x.style.display = 'none';
}); });
Array.from(node.parentElement.parentElement.getElementsByTagName('h3')).forEach(x => { Array.from(node.parentElement.parentElement.getElementsByTagName('h3')).forEach(x => {
x.style.display = matchingTags.includes(x.innerText.toLowerCase()) ? '' : 'none'; x.style.display = matchingTags.includes(x.textContent.toLowerCase()) ? '' : 'none';
}) })
} }
function scrollToTop(){ function scrollToTop(){