Skip to content

Instantly share code, notes, and snippets.

@Page-Carbajal
Created May 14, 2018 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Page-Carbajal/4821a7227e3007bcc208414372c4e73e to your computer and use it in GitHub Desktop.
Save Page-Carbajal/4821a7227e3007bcc208414372c4e73e to your computer and use it in GitHub Desktop.
Injecting jQuery on Runtime
// Force jQuery Injection
(function($d){
if( 'undefined' === typeof jQuery ){
var head = document.getElementsByTagName("head")[0];
var customScript = document.createElement("script");
customScript.src = scriptSource;
customScript.onload = function(){
if( jQuery ){
/******** Start writing you jQuery code here ************/
jQuery('.row:nth-of-type(9) .ch-btn:first-of-type').css({ 'marginLeft':'-30px', 'marginRight':'-30px', 'marginTop':'-20px' });
}
// Do not modify anymore
};
head.appendChild(customScript);
return true;
}
})(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment