hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit ce4e0addc0fe7b170cee66b89095c5e017ce1e2a
parent 097095b5f1be322ad929c4d8f7ba4b844f939e53
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Tue, 27 Jun 2017 09:58:32 -0400

Desactivate the `setClickableHashtags` function.

Diffstat:
Mstatic/dev/js/custom/init.js | 2+-
Mstatic/prod/js/script.js | 2+-
Mstatic/prod/js/script.min.js | 4++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/static/dev/js/custom/init.js b/static/dev/js/custom/init.js @@ -58,4 +58,4 @@ function setClickableHashtags(fn) { } setNavigation(); -setClickableHashtags(setHashtagSearch); +// setClickableHashtags(setHashtagSearch); diff --git a/static/prod/js/script.js b/static/prod/js/script.js @@ -448,4 +448,4 @@ function setClickableHashtags(fn) { } setNavigation(); -setClickableHashtags(setHashtagSearch); +// setClickableHashtags(setHashtagSearch); diff --git a/static/prod/js/script.min.js b/static/prod/js/script.min.js @@ -31,4 +31,4 @@ function isElementInViewport(el){var elRect=el.getBoundingClientRect();return(el return{doExtend:doExtend,queryAll:queryAll,setAttrs:setAttrs,setEvent:setEvent,setEventList:setEventList,getIndex:getIndex,getClosest:getClosest,getHeight:getHeight,setClass:setClass,unsetClass:unsetClass,hasClass:hasClass,toggleClass:toggleClass,setDebounce:setDebounce,setThrottle:setThrottle,isElement:isElement,isObject:isObject,triggerEvent:triggerEvent,triggerCustomEvent:triggerCustomEvent,isElementInViewport:isElementInViewport};})(window);function setNavigation(){'use strict';var $nav=document.querySelector('.nav');var $nav_button;var $nav_panel;var $nav_close;if($nav){$nav_button=document.querySelector('.nav-button');$nav_panel=$nav.querySelector('.nav__panel');$nav_close=$nav_panel.querySelector('.nav__close');du.setClass($nav_panel,'state--hidden');du.setEvent($nav_button,'click',function(thatEvt){thatEvt.preventDefault();du.toggleClass($nav_panel,'state--hidden');du.toggleClass($nav_panel,'state--visible');});du.setEvent($nav_close,'click',function(thatEvt){thatEvt.preventDefault();du.toggleClass($nav_panel,'state--hidden');du.toggleClass($nav_panel,'state--visible');});}} function setHashtagSearch(){var hashTags=du.queryAll('a.p-category');hashTags.forEach(function(tag){du.setEvent(tag,'click',function(thatEvt){thatEvt.preventDefault();console.log(tag.innerHTML);document.forms['search'].elements['q'].value=tag.innerHTML;document.forms['search'].submit();});});} function setClickableHashtags(fn){var hEntries=du.queryAll('.hentry');hEntries.map(function(hEntry){var hEntryHashTagged=hEntry.innerHTML.replace(/(^|\s)(#[a-zA-ZÀ-ú\d-]+)/ig,'$1<a class="p-category" href="$2" title="Chercher sur DuckDuckGo d\'autres entrées avec le tag $2">$2</a>');hEntry.innerHTML=hEntryHashTagged;});fn();} -setNavigation();setClickableHashtags(setHashtagSearch);- \ No newline at end of file +setNavigation();+ \ No newline at end of file