Created
May 14, 2018 15:00
-
-
Save Page-Carbajal/4821a7227e3007bcc208414372c4e73e to your computer and use it in GitHub Desktop.
Injecting jQuery on Runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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