Skip to content

Instantly share code, notes, and snippets.

@rayantony
Last active September 8, 2016 04:58
Show Gist options
  • Select an option

  • Save rayantony/de6e9e0ebab6fa2d6a4ab2cf566c7ff9 to your computer and use it in GitHub Desktop.

Select an option

Save rayantony/de6e9e0ebab6fa2d6a4ab2cf566c7ff9 to your computer and use it in GitHub Desktop.
Bulk Script Injection of Url List Parsing and Live Loading CSS and JS Scripts

Bulk Script Injection of Url List Parsing and Live Loading CSS and JS Scripts

=== Bulk Inject Multiple Files with Mixed File Types [in progress unstable]

Usage load <script src="{file_version}"></script> thats it. URI ready if your browser is to utilize bookmark and address bar loading.

To test, load up the debug mode file prefilled with data debug-embed

Basic project is a couple hours in and is essentially a bulk injector of scripts and css files. It will parse the list which should for the moment be separated by spaces then, it will determine what's a css file, which is a javascript file, including versioned ones with variable query strings appended. As quickly as it is determined the respective input file type, the file is dynamically injected into the document head. So you get instant results.

I have no protections built in but I imagine if you load a few jquery's into a page you're going to be none too pleased, so watch that. You can inject bootstrap 1,2,3,4+, Foundation, three.js, your own libraries of scripts and or styles. Like a poor man's webPack with next to zero footprint or dependencies.

Add animations, slide shows, canvas elements, all kinds of effects. I have some routing needs I want to tackle with it if it becomes anything I'll make it a point to publish here. Other than that it's just a morning project.

this is a simple injector of some css flare it can load by itself or its part of a set below xtras.js

And here's the bulk loader This is the the main one you want. Still playing with the inputs, deciding if I have time to test google sheets csv list of urls, load from local, or whenther persistence is part of a regular use case.

debug version is simple and will output a summary table in html, both on the console and your dom. to use it now just toggle debugmode to true. This effectively demonstrates the parsing of a random incoming list without uniform separation or attention paid to file type. The list has non-uniform spacing, broken names and titles, incomplete paths, duplicates, all intentionally to test its tolerance and filtering ability. Which though an afterthought and a bit primitive, so far very effective.

You can style the debug box, the strList variable is the current main way in and most demo versions include a prompt box where upon loading it will request which files you want to have injected. This also is toggleable just change the strList string. <script src="http://statspring.com/#file-debug-latest.js"></script>

(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=true;
var strList = 'http://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css http://cdn.rawgit.com/FezVrasta/dropdown http://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js https://ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js https://ajax.googleapis.com/webfont.css https://ajax.googleapis.com/webfont.js http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css?tracked http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.csshttp://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css//cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css http://fezvrasta.github.io/bootstrap-material-design/index.csshttp://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.jshttp://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js?ver1=1 https://cdn.rawgit.com/FezVrasta/dropdown.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');

function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}

  for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*':  if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
  debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){ 
  jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){ 
  cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else { 
  debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
 break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p>  <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4>  <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}

if(debugmode){
 document.write('<div id=\"bulkinject-debug-output-data\"></div>');
 document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
 console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}

;})();

This is debugging off and loading something nicer combining my personal skeleton edit with Medium's CSS and JS and a varnish of my Xtras latest version. This shows how it can be used to test, play, or build around remote modules dynamically on the fly

(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;
var strList = 'https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://raymondanthony.github.io/xtras/xtras.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*':  if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
  debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){ 
  jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){ 
  cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else { 
  debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
 break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p>  <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4>  <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}
if(debugmode){
 document.write('<div id="bulkinject-debug-output-data"></div>');
 document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
 console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}
;})();

latest minified empty url list ready for you to add whatever

(function (){var strSearch=' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;var strList='';var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');strList=strPreWash2;var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');function cssFileIn(csurl){var cssFileNew=csurl;var extCSS=document.createElement('link');extCSS.setAttribute('rel','stylesheet');extCSS.setAttribute('type','text/css');extCSS.setAttribute('media','all');extCSS.setAttribute('charset','UTF-8');extCSS.setAttribute('href',cssFileNew);document.head.appendChild(extCSS);}function jsFileIn(jsurl){var jsFileNew=jsurl;var script=document.createElement('script');script.type='text/javascript';script.charset='UTF-8';script.async='async';script.crossorigin='anonymous';script.src=jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}for (var i=0; i !== filein.length;++i) {newref= filein[i].trim();if(newref.contains('.')) {extension= newref.substring(newref.substring().lastIndexOf('.'));}switch(extension){case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;default:
case '*':  if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){ debugalerts('oh no a monster got in',i,'no',extension,newref);break;}else if(extension.contains('.js?')){ 
  jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;}else if(extension.contains('.css?')){ 
  cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;}else{ 
  debugalerts('oh no its a monster',i,'no',extension,newref);break;} break;}}function debugalerts(results,ind,loading,ext,fname){var debugrow='<tr><td>'+results+'</td><td>'+(ind+1)+'</td><td>'+loading+'</td><td>'+ext+'</td><td>'+fname+'</td></tr>';globalrows=globalrows+debugrow;}function dbgtable(){var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p><h4>potential valid file URLs in array after parsing fields '+filein.length+'</h4><div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';var dbgdone='</table></div></div></br>';return dbgpre+globalrows+dbgdone;}if(debugmode){ document.write('<div id="bulkinject-debug-output-data"></div>');document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);};})();

Copy and paste these into the bookmarklet when prompted

rayrc this one is preloaded below as rayrc.js https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://rayrc.github.io/scripts/xtras.js

medium.com this one is preloaded below as medium.js

https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css
https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js

material design bootstrap set, this one is preloaded below as matbs.js

http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css 
http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.css 
http://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css 
http://cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css 
http://fezvrasta.github.io/bootstrap-material-design/index.css 
http://code.jquery.com/jquery-1.10.2.min.js 
http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js 
http://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js 
http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js  
http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js 
https://cdn.rawgit.com/FezVrasta/dropdown.js 

minified obviously add a "javascript:" prefix to load as a bookmarklet hit save and press when you want to use

function cssFileIn(a){var b=a,c=document.createElement("link");c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("media","all"),c.setAttribute("charset","UTF-8"),c.setAttribute("href",b),document.head.appendChild(c)}function jsFileIn(a){var b=a,c=document.createElement("script");c.type="text/javascript",c.charset="UTF-8",c.async="async",c.crossorigin="anonymous",c.src=b,document.getElementsByTagName("body")[0].appendChild(c)}for(var strSearch=" ",filesCount,extension,newref,tempstr,filein="",strList=prompt("paste urls"),filein=strList.replace("  "," ").replace("   "," ").replace("  "," ").trim().split(" "),i=0;i!==filein.length;++i)switch(newref=filein[i].trim(),newref.contains(".")&&(extension=newref.substring(newref.substring().lastIndexOf("."))),extension){case".js":jsFileIn(newref);break;case".css":cssFileIn(newref);break;default:case"*":}
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;
var strList = '';
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else {
debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p> <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4> <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}
if(debugmode){
document.write('<div id="bulkinject-debug-output-data"></div>');
document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}
;})();
var strSearch = " ",filesCount,extension,newref,tempstr;
var filein="";
var strList = prompt('Enter a string of style and script fil urls and hit ok to inject in the current page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js//','.js //').replace('.css//','.css //').replace('http: //','http://');
strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js//','.js //').replace('.css//','.css //').replace('http: //','http://').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(" ");
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains(".")) {
extension= newref.substring(newref.substring().lastIndexOf("."));
}
switch(extension)
{
case ".js": jsFileIn(newref);break;
case ".css": cssFileIn(newref);break;
default:
case "*": if(extension.contains(".js?")){ jsFileIn(newref);break;}
else if(extension.contains(".css?")){ cssFileIn(newref);break;}
else { break;}
break;
}
}
function cssFileIn(csurl){
var cssFileNew = csurl;
var extCSS = document.createElement("link");
extCSS.setAttribute("rel", "stylesheet");
extCSS.setAttribute("type", "text/css");
extCSS.setAttribute("media", "all");
extCSS.setAttribute("charset", "UTF-8");
extCSS.setAttribute("href", cssFileNew);
document.head.appendChild(extCSS);
}
function jsFileIn(jsurl){
var jsFileNew = jsurl;
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'UTF-8';
script.async = 'async';
script.crossorigin = 'anonymous';
script.src = jsFileNew;
document.getElementsByTagName('body')[0].appendChild(script);
}
(function (){var strSearch=' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;var strList='';var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');strList=strPreWash2;var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');function cssFileIn(csurl){var cssFileNew=csurl;var extCSS=document.createElement('link');extCSS.setAttribute('rel','stylesheet');extCSS.setAttribute('type','text/css');extCSS.setAttribute('media','all');extCSS.setAttribute('charset','UTF-8');extCSS.setAttribute('href',cssFileNew);document.head.appendChild(extCSS);}function jsFileIn(jsurl){var jsFileNew=jsurl;var script=document.createElement('script');script.type='text/javascript';script.charset='UTF-8';script.async='async';script.crossorigin='anonymous';script.src=jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}for (var i=0; i !== filein.length;++i) {newref= filein[i].trim();if(newref.contains('.')) {extension= newref.substring(newref.substring().lastIndexOf('.'));}switch(extension){case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){ debugalerts('oh no a monster got in',i,'no',extension,newref);break;}else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;}else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;}else{
debugalerts('oh no its a monster',i,'no',extension,newref);break;} break;}}function debugalerts(results,ind,loading,ext,fname){var debugrow='<tr><td>'+results+'</td><td>'+(ind+1)+'</td><td>'+loading+'</td><td>'+ext+'</td><td>'+fname+'</td></tr>';globalrows=globalrows+debugrow;}function dbgtable(){var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p><h4>potential valid file URLs in array after parsing fields '+filein.length+'</h4><div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';var dbgdone='</table></div></div></br>';return dbgpre+globalrows+dbgdone;}if(debugmode){ document.write('<div id="bulkinject-debug-output-data"></div>');document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);};})();
function cssFileIn(a){var b=a,c=document.createElement("link");c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("media","all"),c.setAttribute("charset","UTF-8"),c.setAttribute("href",b),document.head.appendChild(c)}function jsFileIn(a){var b=a,c=document.createElement("script");c.type="text/javascript",c.charset="UTF-8",c.async="async",c.crossorigin="anonymous",c.src=b,document.getElementsByTagName("body")[0].appendChild(c)}for(var strSearch=" ",filesCount,extension,newref,tempstr,filein="",strList=prompt("paste urls"),filein=strList.replace(" "," ").replace(" "," ").replace(" "," ").trim().split(" "),i=0;i!==filein.length;++i)switch(newref=filein[i].trim(),newref.contains(".")&&(extension=newref.substring(newref.substring().lastIndexOf("."))),extension){case".js":jsFileIn(newref);break;case".css":cssFileIn(newref);break;default:case"*":}
(function (){var strSearch=' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;var strList='';var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');strList=strPreWash2;var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');function cssFileIn(csurl){var cssFileNew=csurl;var extCSS=document.createElement('link');extCSS.setAttribute('rel','stylesheet');extCSS.setAttribute('type','text/css');extCSS.setAttribute('media','all');extCSS.setAttribute('charset','UTF-8');extCSS.setAttribute('href',cssFileNew);document.head.appendChild(extCSS);}function jsFileIn(jsurl){var jsFileNew=jsurl;var script=document.createElement('script');script.type='text/javascript';script.charset='UTF-8';script.async='async';script.crossorigin='anonymous';script.src=jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}for (var i=0; i !== filein.length;++i) {newref= filein[i].trim();if(newref.contains('.')) {extension= newref.substring(newref.substring().lastIndexOf('.'));}switch(extension){case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){ debugalerts('oh no a monster got in',i,'no',extension,newref);break;}else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;}else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;}else{
debugalerts('oh no its a monster',i,'no',extension,newref);break;} break;}}function debugalerts(results,ind,loading,ext,fname){var debugrow='<tr><td>'+results+'</td><td>'+(ind+1)+'</td><td>'+loading+'</td><td>'+ext+'</td><td>'+fname+'</td></tr>';globalrows=globalrows+debugrow;}function dbgtable(){var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p><h4>potential valid file URLs in array after parsing fields '+filein.length+'</h4><div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';var dbgdone='</table></div></div></br>';return dbgpre+globalrows+dbgdone;}if(debugmode){ document.write('<div id="bulkinject-debug-output-data"></div>');document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);};})();
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=true;
var strList = 'https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://raymondanthony.github.io/xtras/xtras.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else {
debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p> <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4> <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}
if(debugmode){
document.write('<div id="bulkinject-debug-output-data"></div>');
document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}
;})();
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta http-equiv="cleartype" content="on">
<meta name="language" content="English, en" />
<title>inject</title>
<meta name="description" content="inject" />
<meta name="keywords" content="inject" />
<meta name="author" content="ray" href="http//rayanthony.io/extensions/" />
<meta name="application-name" content="inject">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="inject">
<meta name="mobile-web-app-capable" content="yes">
<meta name="MobileOptimized" content="width" />
<meta name="HandheldFriendly" content="true" />
<meta http-equiv="cleartype" content="on">
<style>
@charset "UTF-8";
body {
font-family: 'Droid Serif', serif;
font-size: 14px;
color: #2f2f2f;
background-color: #f9f7f1;
background-color: #fff;
text-decoration: none;
text-rendering: optimizeLegibility;
/*-webkit-font-feature-settings: "liga"; Currently broken in Chrome >= v22. Falls back to text-rendering. Safari is unaffected. */
-moz-font-feature-settings: "liga=1";
-moz-font-feature-settings: "liga";
-ms-font-feature-settings: "liga" 1;
-o-font-feature-settings: "liga";
font-feature-settings: "liga";
-webkit-font-smoothing: antialiased;
}
header {
font-weight: 900;
font-size: 80px;
text-transform: uppercase;
display: inline-block;
line-height: 72px;
margin-bottom: 20px;
}
p {
margin-top: 0;
margin-bottom: 5px;
}
.header {
font-family: 'Playfair Display', serif;
font-weight: 900;
font-size: 80px;
text-transform: uppercase;
display: inline-block;
line-height: 72px;
margin-bottom: 20px;
}
.header-title, .btn {
margin: 0px 10px;
text-transform: uppercase;
}
p {
margin-top: 0;
margin-bottom: 5px;
}
.head {
text-align: center;
position: relative;
}
.subhead {
text-transform: uppercase;
border-bottom: 2px solid #2f2f2f;
border-top: 2px solid #2f2f2f;
padding: 12px 0 12px 0;
}
.weatherforcastbox {
position: relative;
width: 12%;
left: 10px;
border: 3px double #2f2f2f;
padding: 10px 15px 10px 15px;
line-height: 20px;
display: inline-block;
margin: 0 50px 20px -360px;
}
.content {
font-size: 0;
line-height: 0;
word-spacing: -.31em;
display: inline-block;
margin: 30px 2% 0 2%;
}
.rssFeed {
font-size: 1.3rem;
line-height: 30px;
width: 80.5%;
display: inline-block;
padding: 0 1% 0 1%;
vertical-align: top;
border-right: 1px solid #2f2f2f;
margin-bottom: 10px;
transition: all .7s;
}
.rssFeed a {
color: #333;
text-decoration: none;
}
.rssFeed a:hover {
color: #b3d4fc;
text-decoration: underline;
}
.rssHeader { font-family: 'Playfair Display', serif;
font-weight: 700;
font-size: 50px;
text-transform: uppercase;
display: inline-block;
line-height: 45px;
margin-bottom: 10px;
text-transform: uppercase;
border-bottom: 2px solid #2f2f2f;
border-top: 2px solid #2f2f2f;
padding: 12px 0 12px 0;}
.rssBody { border: 1px solid #999; }
.rssBody ul { list-style: none; }
.rssBody ul, .collumn .rssRow, .rssRow h4, .rssRow p {
margin: 0;
padding: 0;
}
.bg{
width: 100%;
height: 100%;
position: absolute;
z-index: 0;
top: 0;
left: 0;
-webkit-transition: -webkit-transform 0.3s;
-moz-transition: -moz-transform 0.3s;
transition: transform 0.3s;
}
h3 {
font-weight: normal;
font-size: 20px;
}
.rssRow .post .content {
z-index: 2;
position: relative;
pointer-events: none;
}
.rssRow .collumn .headline {
text-align: center;
line-height: normal;
font-family: 'Playfair Display', serif;
display: block;
margin: 0 auto;
font-feature-settings: "liga", "dlig";
}
.rssRow .collumn .headline.hl1 {
font-weight: 700;
font-size: 30px;
text-transform: uppercase;
padding: 10px 0 10px 0;
font-feature-settings: "liga", "dlig";
}
.rssRow .collumn .headline.hl2 {
font-weight: 400;
font-style: italic;
font-size: 24px;
box-sizing: border-box;
padding: 10px 0 10px 0;
}
padding: 0.8em; }
.rssRow h4 { font-size: 1.1em; }
.rssRow div {
font-size: 90%;
color: #333;
margin: 0.2em 0 0.4em 0;
}
.odd { font-weight: 400;
font-style: italic;
font-size: 22px;
background-color:rgba(0,0,0,0.15);
background-color:#fff;
}
.even { font-weight: 400;
font-style: normal;
font-size: 26px;
background-color:rgba(128,128,128,0.15);}
.rssRow .rssMedia {
padding: 0.5em;
font-size: 1em;
}
</style>
<body style="background:url('subtle_grunge.png') repeat;background-image:url('subtle_grunge.png') repeat;background-color:transparent">
<div id="output-data"></div>
<script>
var strSearch = " ",filesCount,extension,newref,tempstr;
var filein="";var globalrows="";
var strList = 'https://ajax.googleapis.com/webfont.js http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.css http://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css http://cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css http://fezvrasta.github.io/bootstrap-material-design/index.css http://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js https://ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js https://ajax.googleapis.com/webfont.css https://ajax.googleapis.com/webfont.js http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css?tracked http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.csshttp://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css//cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css http://fezvrasta.github.io/bootstrap-material-design/index.csshttp://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.jshttp://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js?ver1=1 https://cdn.rawgit.com/FezVrasta/dropdown.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js//','.js //').replace('.css//','.css //').replace('http: //','http://');
strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js//','.js //').replace('.css//','.css //').replace('http: //','http://').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(" ");
document.write('<br><div><h4>'+'files in array after parsing fields'+filein.length+'</h4><br>');
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains(".")) {
extension= newref.substring(newref.substring().lastIndexOf("."));
}
switch(extension)
{
case ".js": jsFileIn(newref);debugalerts("its a JS ",i,extension,newref);break;
case ".css": cssFileIn(newref);debugalerts("its a CSS ",i,extension,newref);break;
default:
case "*": if(extension.contains(".js?")){ jsFileIn(newref);debugalerts("its a versioned JS",i,extension,newref);break;}
else if(extension.contains(".css?")){ cssFileIn(newref);debugalerts("its a versioned CSS ",i,extension,newref);break;}
else { debugalerts("oh no its a monster",i,extension,newref);break;}
break;
}
}
function debugalerts(results,ind,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<header><h2># Injection of mixed fileurls, dirty string of x length, parse tests </h2></header><div style="display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;"><table border="2" style="background-color:whitesmoke;color:#222;font-size:110%;text-align:left;"><tr style="text-align:center;font-weight:bold;"><td>alert</td><td>#</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></br>';
return dbgpre+globalrows+dbgdone;
}
document.getElementById("output-data").innerHTML=dbgtable();
function cssFileIn(csurl){
var cssFileNew = csurl;
var extCSS = document.createElement("link");
extCSS.setAttribute("rel", "stylesheet");
extCSS.setAttribute("type", "text/css");
extCSS.setAttribute("media", "all");
extCSS.setAttribute("charset", "UTF-8");
extCSS.setAttribute("href", cssFileNew);
document.head.appendChild(extCSS);
}
function jsFileIn(jsurl){
var jsFileNew = jsurl;
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'UTF-8';
script.async = 'async';
script.crossorigin = 'anonymous';
script.src = jsFileNew;
document.getElementsByTagName('body')[0].appendChild(script);
}
</script>
</body>
</html>
var strSearch = " ",filesCount,extension,newref,tempstr;
var filein="";
var strList = '';
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js//','.js //').replace('.css//','.css //').replace('http: //','http://');
strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js//','.js //').replace('.css//','.css //').replace('http: //','http://').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(" ");
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains(".")) {
extension= newref.substring(newref.substring().lastIndexOf("."));
}
switch(extension)
{
case ".js": jsFileIn(newref);break;
case ".css": cssFileIn(newref);break;
default:
case "*": if(extension.contains(".js?")){ jsFileIn(newref);break;}
else if(extension.contains(".css?")){ cssFileIn(newref);break;}
else { break;}
break;
}
}
function cssFileIn(csurl){
var cssFileNew = csurl;
var extCSS = document.createElement("link");
extCSS.setAttribute("rel", "stylesheet");
extCSS.setAttribute("type", "text/css");
extCSS.setAttribute("media", "all");
extCSS.setAttribute("charset", "UTF-8");
extCSS.setAttribute("href", cssFileNew);
document.head.appendChild(extCSS);
}
function jsFileIn(jsurl){
var jsFileNew = jsurl;
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'UTF-8';
script.async = 'async';
script.crossorigin = 'anonymous';
script.src = jsFileNew;
document.getElementsByTagName('body')[0].appendChild(script);
}
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;
var strList = 'https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://raymondanthony.github.io/xtras/xtras.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else {
debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p> <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4> <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}
if(debugmode){
document.write('<div id="bulkinject-debug-output-data"></div>');
document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}
;})();
(function (){var strSearch=' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;var strList='https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js';var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');strList=strPreWash2;var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');function cssFileIn(csurl){var cssFileNew=csurl;var extCSS=document.createElement('link');extCSS.setAttribute('rel','stylesheet');extCSS.setAttribute('type','text/css');extCSS.setAttribute('media','all');extCSS.setAttribute('charset','UTF-8');extCSS.setAttribute('href',cssFileNew);document.head.appendChild(extCSS);}function jsFileIn(jsurl){var jsFileNew=jsurl;var script=document.createElement('script');script.type='text/javascript';script.charset='UTF-8';script.async='async';script.crossorigin='anonymous';script.src=jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}for (var i=0; i !== filein.length;++i) {newref= filein[i].trim();if(newref.contains('.')) {extension= newref.substring(newref.substring().lastIndexOf('.'));}switch(extension){case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){ debugalerts('oh no a monster got in',i,'no',extension,newref);break;}else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;}else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;}else{
debugalerts('oh no its a monster',i,'no',extension,newref);break;} break;}}function debugalerts(results,ind,loading,ext,fname){var debugrow='<tr><td>'+results+'</td><td>'+(ind+1)+'</td><td>'+loading+'</td><td>'+ext+'</td><td>'+fname+'</td></tr>';globalrows=globalrows+debugrow;}function dbgtable(){var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p><h4>potential valid file URLs in array after parsing fields '+filein.length+'</h4><div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';var dbgdone='</table></div></div></br>';return dbgpre+globalrows+dbgdone;}if(debugmode){ document.write('<div id="bulkinject-debug-output-data"></div>');document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);};})();
(function (){var strSearch=' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;var strList='https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://raymondanthony.github.io/xtras/xtras.js';var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');strList=strPreWash2;var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');function cssFileIn(csurl){var cssFileNew=csurl;var extCSS=document.createElement('link');extCSS.setAttribute('rel','stylesheet');extCSS.setAttribute('type','text/css');extCSS.setAttribute('media','all');extCSS.setAttribute('charset','UTF-8');extCSS.setAttribute('href',cssFileNew);document.head.appendChild(extCSS);}function jsFileIn(jsurl){var jsFileNew=jsurl;var script=document.createElement('script');script.type='text/javascript';script.charset='UTF-8';script.async='async';script.crossorigin='anonymous';script.src=jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}for (var i=0; i !== filein.length;++i) {newref= filein[i].trim();if(newref.contains('.')) {extension= newref.substring(newref.substring().lastIndexOf('.'));}switch(extension){case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){ debugalerts('oh no a monster got in',i,'no',extension,newref);break;}else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;}else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;}else{
debugalerts('oh no its a monster',i,'no',extension,newref);break;} break;}}function debugalerts(results,ind,loading,ext,fname){var debugrow='<tr><td>'+results+'</td><td>'+(ind+1)+'</td><td>'+loading+'</td><td>'+ext+'</td><td>'+fname+'</td></tr>';globalrows=globalrows+debugrow;}function dbgtable(){var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p><h4>potential valid file URLs in array after parsing fields '+filein.length+'</h4><div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';var dbgdone='</table></div></div></br>';return dbgpre+globalrows+dbgdone;}if(debugmode){ document.write('<div id="bulkinject-debug-output-data"></div>');document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);};})();
(function (){var strSearch=' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;var strList='';var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');strList=strPreWash2;var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');function cssFileIn(csurl){var cssFileNew=csurl;var extCSS=document.createElement('link');extCSS.setAttribute('rel','stylesheet');extCSS.setAttribute('type','text/css');extCSS.setAttribute('media','all');extCSS.setAttribute('charset','UTF-8');extCSS.setAttribute('href',cssFileNew);document.head.appendChild(extCSS);}function jsFileIn(jsurl){var jsFileNew=jsurl;var script=document.createElement('script');script.type='text/javascript';script.charset='UTF-8';script.async='async';script.crossorigin='anonymous';script.src=jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}for (var i=0; i !== filein.length;++i) {newref= filein[i].trim();if(newref.contains('.')) {extension= newref.substring(newref.substring().lastIndexOf('.'));}switch(extension){case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){ debugalerts('oh no a monster got in',i,'no',extension,newref);break;}else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;}else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;}else{
debugalerts('oh no its a monster',i,'no',extension,newref);break;} break;}}function debugalerts(results,ind,loading,ext,fname){var debugrow='<tr><td>'+results+'</td><td>'+(ind+1)+'</td><td>'+loading+'</td><td>'+ext+'</td><td>'+fname+'</td></tr>';globalrows=globalrows+debugrow;}function dbgtable(){var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p><h4>potential valid file URLs in array after parsing fields '+filein.length+'</h4><div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';var dbgdone='</table></div></div></br>';return dbgpre+globalrows+dbgdone;}if(debugmode){ document.write('<div id="bulkinject-debug-output-data"></div>');document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);};})();
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;
var strList = 'prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else {
debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p> <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4> <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}
if(debugmode){
document.write('<div id="bulkinject-debug-output-data"></div>');
document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}
;})();
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;
var strList = 'https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://raymondanthony.github.io/xtras/xtras.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else {
debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p> <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4> <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}
if(debugmode){
document.write('<div id="bulkinject-debug-output-data"></div>');
document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}
;})();
http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.css http://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css http://cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css http://fezvrasta.github.io/bootstrap-material-design/index.css http://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js https://cdn.rawgit.com/FezVrasta/dropdown.js
https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css
https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://raymondanthony.github.io/xtras/xtras.js
https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=false;
var strList = 'https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://raymondanthony.github.io/xtras/xtras.js');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else {
debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p> <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4> <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}
if(debugmode){
document.write('<div id="bulkinject-debug-output-data"></div>');
document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}
;})();
function cssFileIn(a){var b=a,c=document.createElement("link");c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("media","all"),c.setAttribute("charset","UTF-8"),c.setAttribute("href",b),document.head.appendChild(c)}function jsFileIn(a){var b=a,c=document.createElement("script");c.type="text/javascript",c.charset="UTF-8",c.async="async",c.crossorigin="anonymous",c.src=b,document.getElementsByTagName("body")[0].appendChild(c)}var strSearch=" ",filesCount,extension,newref,tempstr,filein="",strList="https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://rayrc.github.io/scripts/xtras.js",strListPreWash1=strList.replace(".csshttps:",".css https:").replace(".jshttps:",".js https:").replace(".csshttp:",".css http:").replace(".jshttp:",".js http:").replace(".js//",".js //").replace(".css//",".css //").replace("http: //","http://");strPreWash2=strListPreWash1.replace(".csshttps:",".css https:").replace(".jshttps:",".js https:").replace(".csshttp:",".css http:").replace(".jshttp:",".js http:").replace(".js//",".js //").replace(".css//",".css //").replace("http: //","http://").replace(" "," "),strList=strPreWash2;for(var filein=strList.replace(" "," ").replace(" "," ").replace(" "," ").trim().split(" "),i=0;i!==filein.length;++i)switch(newref=filein[i].trim(),newref.contains(".")&&(extension=newref.substring(newref.substring().lastIndexOf("."))),extension){case".js":jsFileIn(newref);break;case".css":cssFileIn(newref);break;default:case"*":if(extension.contains(".js?")){jsFileIn(newref);break}if(extension.contains(".css?")){cssFileIn(newref);break}}
https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://rayrc.github.io/scripts/xtras.js
/*
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr;var filein='';var strList = ' https://raymondanthony.github.io/xtras/xtrasblu.js ';
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');strList=strPreWash2;var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');for (var i = 0; i !== filein.length; ++i) {newref= filein[i].trim();if(newref.contains('.')) {extension= newref.substring(newref.substring().lastIndexOf('.'));}
switch(extension)
{case '.js': jsFileIn(newref);break;case '.css': cssFileIn(newref);break;default:
case '*': if(extension.contains('.js?')){ jsFileIn(newref);break;}else if(extension.contains('.css?')){ cssFileIn(newref);break;}else { break;}break;}}})();
*/
/*
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr;var filein='';var strList = ' https://d39dlwgeopmdw0.cloudfront.net/assets/web/skel.css https://cdn-static-1.medium.com/_/fp/css/main-base.z0KlLzixSjqiO0ooeem2tg.css https://cdn-static-1.medium.com/_/fp/js/main-base.bundle.qrVkR8Yb-53YHbfCsYTMAA.js https://rayrc.github.io/scripts/xtras.js ';
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');strList=strPreWash2;var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');for (var i = 0; i !== filein.length; ++i) {newref= filein[i].trim();if(newref.contains('.')) {extension= newref.substring(newref.substring().lastIndexOf('.'));}switch(extension)
{case '.js': jsFileIn(newref);break;case '.css': cssFileIn(newref);break;default:
case '*': if(extension.contains('.js?')){ jsFileIn(newref);break;}else if(extension.contains('.css?')){ cssFileIn(newref);break;}else { break;}break;}}})();
*/
/*
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='';
var strList = 'http://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css http://cdn.rawgit.com/FezVrasta/dropdown http://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js https://ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js https://ajax.googleapis.com/webfont.css https://ajax.googleapis.com/webfont.js http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css?tracked http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.csshttp://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css//cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css http://fezvrasta.github.io/bootstrap-material-design/index.csshttp://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.jshttp://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js?ver1=1 https://cdn.rawgit.com/FezVrasta/dropdown.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
document.write('<br><div><h4>'+'files in array after parsing fields'+filein.length+'</h4><br>');
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,extension,newref);break;
default:
case '*': if(extension.contains('.js?')){ jsFileIn(newref);debugalerts('its a versioned JS',i,extension,newref);break;}
else if(extension.contains('.css?')){ cssFileIn(newref);debugalerts('its a versioned CSS ',i,extension,newref);break;}
else { debugalerts('oh no its a monster',i,extension,newref);break;}
break;
}
}
function debugalerts(results,ind,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<header><h2># Injection of mixed fileurls, dirty string of x length, parse tests </h2></header><div style="display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;"><table border="2" style="background-color:whitesmoke;color:#222;font-size:110%;text-align:left;"><tr style="text-align:center;font-weight:bold;"><td>alert</td><td>#</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></br>';
return dbgpre+globalrows+dbgdone;
}
document.getElementById('output-data').innerHTML=dbgtable();
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
*/
(function (){
var strSearch = ' ',filesCount,extension,newref,tempstr,filein='';var globalrows='',debugmode=true;
var strList = 'http://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css http://cdn.rawgit.com/FezVrasta/dropdown http://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js https://ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js https://ajax.googleapis.com/webfont.css https://ajax.googleapis.com/webfont.js http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css?tracked http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.csshttp://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css//cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css http://fezvrasta.github.io/bootstrap-material-design/index.csshttp://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.jshttp://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js?ver1=1 https://cdn.rawgit.com/FezVrasta/dropdown.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/');
var strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js\/\/','.js \/\/').replace('.css\/\/','.css \/\/').replace('http: \/\/','http:\/\/').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(' ');
function cssFileIn(csurl){var cssFileNew = csurl;var extCSS = document.createElement('link');extCSS.setAttribute('rel', 'stylesheet');extCSS.setAttribute('type', 'text/css');extCSS.setAttribute('media', 'all');extCSS.setAttribute('charset', 'UTF-8');extCSS.setAttribute('href', cssFileNew);document.head.appendChild(extCSS);}
function jsFileIn(jsurl){var jsFileNew = jsurl;var script = document.createElement('script');script.type = 'text/javascript';script.charset = 'UTF-8';script.async = 'async';script.crossorigin = 'anonymous';script.src = jsFileNew;document.getElementsByTagName('body')[0].appendChild(script);}
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains('.')) {
extension= newref.substring(newref.substring().lastIndexOf('.'));
}
switch(extension)
{
case '.js': jsFileIn(newref);debugalerts('its a JS ',i,'yes',extension,newref);break;
case '.css': cssFileIn(newref);debugalerts('its a CSS ',i,'yes',extension,newref);break;
default:
case '*': if((extension.contains('.js')<=0) && (extension.contains('.css')<=0) && (extension.contains('.js?')<=0) && (extension.contains('.css?')<=0)){
debugalerts('oh no a monster got in',i,'no',extension,newref);break;
} else if(extension.contains('.js?')){
jsFileIn(newref);debugalerts('its a versioned JS',i,'yes',extension,newref);break;
} else if(extension.contains('.css?')){
cssFileIn(newref);debugalerts('its a versioned CSS ',i,'yes',extension,newref);break;
} else {
debugalerts('oh no its a monster',i,'no',extension,newref);break;
}
break;
}
}
function debugalerts(results,ind,loading,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>' + loading + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<div id=\"bulkinject-debug-container-outer\"><h2>Bulk Injector Debug Mode</h2><p>input x number of files of type css js as URLs</p><p>handles dirty strings parses list handles versioned extensions query strings as valid js and css </p> <h4>potential valid file URLs in array after parsing fields '+filein.length+' </h4> <div id=\"bulkinject-debug-container-inner\" style=\"display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;\"><table border=\"2\" style=\"background-color:whitesmoke;color:#222;font-size:110%;text-align:left;\"><tr style=\"text-align:center;font-weight:bold;\"><td>alert</td><td>#</td><td>loading</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></div></br>';
return dbgpre+globalrows+dbgdone;
}
if(debugmode){
document.write('<div id=\"bulkinject-debug-output-data\"></div>');
document.getElementById('bulkinject-debug-output-data').innerHTML=dbgtable();
console.log(document.getElementById('bulkinject-debug-output-data').innerHTML);
}
;})();
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta http-equiv="cleartype" content="on">
<meta name="language" content="English, en" />
<title>inject</title>
<meta name="description" content="inject" />
<meta name="keywords" content="inject" />
<meta name="author" content="ray" href="http//rayanthony.io/extensions/" />
<meta name="application-name" content="inject">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="inject">
<meta name="mobile-web-app-capable" content="yes">
<meta name="MobileOptimized" content="width" />
<meta name="HandheldFriendly" content="true" />
<meta http-equiv="cleartype" content="on">
<style>
@charset "UTF-8";
body {
font-family: 'Droid Serif', serif;
font-size: 14px;
color: #2f2f2f;
background-color: #f9f7f1;
background-color: #fff;
text-decoration: none;
text-rendering: optimizeLegibility;
/*-webkit-font-feature-settings: "liga"; Currently broken in Chrome >= v22. Falls back to text-rendering. Safari is unaffected. */
-moz-font-feature-settings: "liga=1";
-moz-font-feature-settings: "liga";
-ms-font-feature-settings: "liga" 1;
-o-font-feature-settings: "liga";
font-feature-settings: "liga";
-webkit-font-smoothing: antialiased;
}
header {
font-weight: 900;
font-size: 80px;
text-transform: uppercase;
display: inline-block;
line-height: 72px;
margin-bottom: 20px;
}
p {
margin-top: 0;
margin-bottom: 5px;
}
.header {
font-family: 'Playfair Display', serif;
font-weight: 900;
font-size: 80px;
text-transform: uppercase;
display: inline-block;
line-height: 72px;
margin-bottom: 20px;
}
.header-title, .btn {
margin: 0px 10px;
text-transform: uppercase;
}
p {
margin-top: 0;
margin-bottom: 5px;
}
.head {
text-align: center;
position: relative;
}
.subhead {
text-transform: uppercase;
border-bottom: 2px solid #2f2f2f;
border-top: 2px solid #2f2f2f;
padding: 12px 0 12px 0;
}
.weatherforcastbox {
position: relative;
width: 12%;
left: 10px;
border: 3px double #2f2f2f;
padding: 10px 15px 10px 15px;
line-height: 20px;
display: inline-block;
margin: 0 50px 20px -360px;
}
.content {
font-size: 0;
line-height: 0;
word-spacing: -.31em;
display: inline-block;
margin: 30px 2% 0 2%;
}
.rssFeed {
font-size: 1.3rem;
line-height: 30px;
width: 80.5%;
display: inline-block;
padding: 0 1% 0 1%;
vertical-align: top;
border-right: 1px solid #2f2f2f;
margin-bottom: 10px;
transition: all .7s;
}
.rssFeed a {
color: #333;
text-decoration: none;
}
.rssFeed a:hover {
color: #b3d4fc;
text-decoration: underline;
}
.rssHeader { font-family: 'Playfair Display', serif;
font-weight: 700;
font-size: 50px;
text-transform: uppercase;
display: inline-block;
line-height: 45px;
margin-bottom: 10px;
text-transform: uppercase;
border-bottom: 2px solid #2f2f2f;
border-top: 2px solid #2f2f2f;
padding: 12px 0 12px 0;}
.rssBody { border: 1px solid #999; }
.rssBody ul { list-style: none; }
.rssBody ul, .collumn .rssRow, .rssRow h4, .rssRow p {
margin: 0;
padding: 0;
}
.bg{
width: 100%;
height: 100%;
position: absolute;
z-index: 0;
top: 0;
left: 0;
-webkit-transition: -webkit-transform 0.3s;
-moz-transition: -moz-transform 0.3s;
transition: transform 0.3s;
}
h3 {
font-weight: normal;
font-size: 20px;
}
.rssRow .post .content {
z-index: 2;
position: relative;
pointer-events: none;
}
.rssRow .collumn .headline {
text-align: center;
line-height: normal;
font-family: 'Playfair Display', serif;
display: block;
margin: 0 auto;
font-feature-settings: "liga", "dlig";
}
.rssRow .collumn .headline.hl1 {
font-weight: 700;
font-size: 30px;
text-transform: uppercase;
padding: 10px 0 10px 0;
font-feature-settings: "liga", "dlig";
}
.rssRow .collumn .headline.hl2 {
font-weight: 400;
font-style: italic;
font-size: 24px;
box-sizing: border-box;
padding: 10px 0 10px 0;
}
padding: 0.8em; }
.rssRow h4 { font-size: 1.1em; }
.rssRow div {
font-size: 90%;
color: #333;
margin: 0.2em 0 0.4em 0;
}
.odd { font-weight: 400;
font-style: italic;
font-size: 22px;
background-color:rgba(0,0,0,0.15);
background-color:#fff;
}
.even { font-weight: 400;
font-style: normal;
font-size: 26px;
background-color:rgba(128,128,128,0.15);}
.rssRow .rssMedia {
padding: 0.5em;
font-size: 1em;
}
</style>
<body style="background:url('subtle_grunge.png') repeat;background-image:url('subtle_grunge.png') repeat;background-color:transparent">
<div id="output-data"></div>
<script>
var strSearch = " ",filesCount,extension,newref,tempstr;
var filein="";var globalrows="";
var strList = 'https://ajax.googleapis.com/webfont.js http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.css http://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css http://cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css http://fezvrasta.github.io/bootstrap-material-design/index.css http://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js https://ajax.googleapis.com/ajax/libs/webfont/1.5.10/webfont.js https://ajax.googleapis.com/webfont.css https://ajax.googleapis.com/webfont.js http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css?tracked http://fezvrasta.github.io/bootstrap-material-design/dist/css/bootstrap-material-design.csshttp://fezvrasta.github.io/bootstrap-material-design/dist/css/ripples.min.css//cdn.rawgit.com/FezVrasta/dropdown.js/master/jquery.dropdown.css http://fezvrasta.github.io/bootstrap-material-design/index.csshttp://code.jquery.com/jquery-1.10.2.min.js http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.jshttp://fezvrasta.github.io/bootstrap-material-design/dist/js/material.js http://fezvrasta.github.io/bootstrap-material-design/dist/js/ripples.min.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js?ver1=1 https://cdn.rawgit.com/FezVrasta/dropdown.js http://cdnjs.cloudflare.com/ajax/libs/noUiSlider/6.2.0/jquery.nouislider.min.js'+prompt('Enter a string of script and Style link Urls space separated to inject them into another page \n');
var strListPreWash1=strList.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js//','.js //').replace('.css//','.css //').replace('http: //','http://');
strPreWash2=strListPreWash1.replace('.csshttps:','.css https:').replace('.jshttps:','.js https:').replace('.csshttp:','.css http:').replace('.jshttp:','.js http:').replace('.js//','.js //').replace('.css//','.css //').replace('http: //','http://').replace(' ',' ');
strList=strPreWash2;
var filein=strList.replace(' ',' ').replace(' ',' ').replace(' ',' ').trim().split(" ");
document.write('<br><div><h4>'+'files in array after parsing fields'+filein.length+'</h4><br>');
for (var i = 0; i !== filein.length; ++i) {
newref= filein[i].trim();
if(newref.contains(".")) {
extension= newref.substring(newref.substring().lastIndexOf("."));
}
switch(extension)
{
case ".js": jsFileIn(newref);debugalerts("its a JS ",i,extension,newref);break;
case ".css": cssFileIn(newref);debugalerts("its a CSS ",i,extension,newref);break;
default:
case "*": if(extension.contains(".js?")){ jsFileIn(newref);debugalerts("its a versioned JS",i,extension,newref);break;}
else if(extension.contains(".css?")){ cssFileIn(newref);debugalerts("its a versioned CSS ",i,extension,newref);break;}
else { debugalerts("oh no its a monster",i,extension,newref);break;}
break;
}
}
function debugalerts(results,ind,ext,fname){
var debugrow='<tr><td>' + results + '</td><td>' + (ind+1) + '</td><td>'+ ext +'</td><td>'+ fname +'</td></tr>';
globalrows=globalrows+debugrow;
}
function dbgtable(){
var dbgpre='<header><h2># Injection of mixed fileurls, dirty string of x length, parse tests </h2></header><div style="display:block;position:relative;margin:0px;padding:2px;left:20%;right:50%;"><table border="2" style="background-color:whitesmoke;color:#222;font-size:110%;text-align:left;"><tr style="text-align:center;font-weight:bold;"><td>alert</td><td>#</td><td>extension</td><td>name</td></tr>';
var dbgdone='</table></div></br>';
return dbgpre+globalrows+dbgdone;
}
document.getElementById("output-data").innerHTML=dbgtable();
function cssFileIn(csurl){
var cssFileNew = csurl;
var extCSS = document.createElement("link");
extCSS.setAttribute("rel", "stylesheet");
extCSS.setAttribute("type", "text/css");
extCSS.setAttribute("media", "all");
extCSS.setAttribute("charset", "UTF-8");
extCSS.setAttribute("href", cssFileNew);
document.head.appendChild(extCSS);
}
function jsFileIn(jsurl){
var jsFileNew = jsurl;
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'UTF-8';
script.async = 'async';
script.crossorigin = 'anonymous';
script.src = jsFileNew;
document.getElementsByTagName('body')[0].appendChild(script);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment