.js files are now uglified

This commit is contained in:
Jonny Barnes 2016-09-26 13:19:52 +01:00
parent d73062f3cf
commit f0c8e8fbb9
11 changed files with 18 additions and 438 deletions

View file

@ -1,26 +1,2 @@
/* global Autolinker */
//the autlinker object
var autolinker = new Autolinker();
//the youtube regex
var ytidregex = /watch\?v=([A-Za-z0-9\-_]+)/;
//grab the notes and loop through them
var notes = document.querySelectorAll('.e-content');
for (var i = 0; i < notes.length; i++) {
//get Youtube ID
var ytid = notes[i].textContent.match(ytidregex);
if (ytid !== null) {
var id = ytid[1];
var iframe = document.createElement('iframe');
iframe.classList.add('youtube');
iframe.setAttribute('src', '//www.youtube.com/embed/' + id);
iframe.setAttribute('frameborder', 0);
iframe.setAttribute('allowfullscreen', 'true');
notes[i].appendChild(iframe);
}
//now linkify everything
var orig = notes[i].innerHTML;
var linked = autolinker.link(orig);
notes[i].innerHTML = linked;
}
for(var autolinker=new Autolinker,ytidregex=/watch\?v=([A-Za-z0-9\-_]+)/,notes=document.querySelectorAll(".e-content"),i=0;i<notes.length;i++){var ytid=notes[i].textContent.match(ytidregex);if(null!==ytid){var id=ytid[1],iframe=document.createElement("iframe");iframe.classList.add("youtube"),iframe.setAttribute("src","//www.youtube.com/embed/"+id),iframe.setAttribute("frameborder",0),iframe.setAttribute("allowfullscreen","true"),notes[i].appendChild(iframe)}var orig=notes[i].innerHTML,linked=autolinker.link(orig);notes[i].innerHTML=linked}
//# sourceMappingURL=maps/links.js.map