From fe303999bb3d1067783ea96cef71ea2a4a69a2df Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 15 Dec 2018 23:21:02 +0100 Subject: embedding applets --- site/assets/js/app/site.js | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 site/assets/js/app/site.js (limited to 'site/assets/js') diff --git a/site/assets/js/app/site.js b/site/assets/js/app/site.js deleted file mode 100644 index eb6886c2..00000000 --- a/site/assets/js/app/site.js +++ /dev/null @@ -1,30 +0,0 @@ -const isiPhone = !!((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) -const isiPad = !!(navigator.userAgent.match(/iPad/i)) -const isAndroid = !!(navigator.userAgent.match(/Android/i)) -const isMobile = isiPhone || isiPad || isAndroid -const isDesktop = !isMobile - -const htmlClassList = document.body.parentNode.classList -htmlClassList.add(isDesktop ? 'desktop' : 'mobile') - -function toArray(a) { return Array.prototype.slice.apply(a) } -function choice(a) { return a[Math.floor(Math.random()*a.length)]} - -var site = (function(){ - var site = {} - site.init = function(){ - site.build() - } - site.build = function(){ - const paras = document.querySelectorAll("section p") - if (paras.length) { - paras[0].classList.add('first_paragraph') - } - toArray(document.querySelectorAll('header .links a')).forEach(tag => { - if (window.location.href.match(tag.href)) { - tag.classList.add('active') - } - }) - } - site.init() -})() \ No newline at end of file -- cgit v1.2.3-70-g09d2