<commit_before>/**  veneer.js custom html tag definition
 {
	tagName: 'veneer-bootstrap',
	version: '1.0.0', tags: 'native util bootstrap external',
	purpose: 'Loads bootstrap CSS and JS packages',
	attribs: { 
		js: "should jQuery and bootstrap.js be included?",
		icons: "should font awesome be loaded? "
	},
	events:  [ 'insert' ]
 }
**/

//////////////////////////////////////////////
 
 veneer("veneer-bootstrap", {
	proto: HTMLInputElement.prototype,
	events: {
		insert: function ldr(e){ 
		var elm=e.target;
		
		var href="";
			veneer.$("head")[0].appendChild(veneer.elm("link",{href:"//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css", rel: "stylesheet" }));
		
			if(elm.icons){
			veneer.$("head")[0].appendChild(veneer.elm("link",{href:"//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css", rel: "stylesheet" }));
			}
		
			if(elm.js && !elm.widgets){
				veneer.include(["//code.jquery.com/jquery-latest.min.js"])[0].onload=function(){
					veneer.include("//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js");
				}
				
			}
			
			if(elm.widgets){
				veneer.include(["http://danml.com/veneer/lib/files/veneer-bs.js"]);
				document.body.appendChild(veneer.elm("veneer-bs"));
			}
			
			function onJq(){
				if(!window.jQuery){ return setTimeout(onJq, 36); }
				eval(elm.innerHTML)
			}
			
			if(elm.innerHTML.trim() && (elm.widgets || elm.js)){
				onJq();
			}
			
		}
	},
	props:{
		js: veneer.bool,
		widgets: veneer.bool,
		icons: veneer.bool
	},
	css: "veneer-bootstrap { white-space: pre;display:none; } "
  });
  <commit_msg>fixed double-loading css file if already hard-linked in page html<commit_after>/**  veneer.js custom html tag definition
 {
	tagName: 'veneer-bootstrap',
	version: '1.0.0', tags: 'native util bootstrap external',
	purpose: 'Loads bootstrap CSS and JS packages',
	attribs: { 
		js: "should jQuery and bootstrap.js be included?",
		icons: "should font awesome be loaded? "
	},
	events:  [ 'insert' ]
 }
**/

//////////////////////////////////////////////
 
 veneer("veneer-bootstrap", {
	proto: HTMLInputElement.prototype,
	events: {
		insert: function ldr(e){ 
		var elm=e.target;
		
		var href="";
		
			if(!veneer.$("link[href*='bootstrap']")[0]){
				veneer.$("head")[0].appendChild(veneer.elm("link",{href:"//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css", rel: "stylesheet" }));
			}
		
			if(elm.icons){
				if(!veneer.$("link[href*='font-awesome']")[0]){
			veneer.$("head")[0].appendChild(veneer.elm("link",{href:"//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css", rel: "stylesheet" }));
			}
			}
		
			if(elm.js && !elm.widgets){
			
				if(!window.jQuery){
					veneer.include(["//code.jquery.com/jquery-latest.min.js"]);
				}
			}
			
			if(elm.widgets){
				document.body.appendChild(veneer.elm("veneer-bs"));
				veneer.include(["http://danml.com/veneer/lib/files/veneer-bs.js"]);
			}
			
			function onJq(){
				if(!window.jQuery){ return setTimeout(onJq, 36); }
				if(elm.js){ veneer.include("//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"); } 
				eval(elm.innerHTML);
			}
			
			if(elm.innerHTML.trim() && (elm.widgets || elm.js)){
				onJq();
			}
			
		}
	},
	props:{
		js: veneer.bool,
		widgets: veneer.bool,
		icons: veneer.bool
	},
	css: "veneer-bootstrap { white-space: pre;display:none; } "
  });
  
{'fraction_non_alphanumeric': 0.22202486678507993, 'fraction_numerical': 0.010361160449970397, 'mean_word_length': 3.0226190476190475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2987183', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1239, 'n_words': 183}