Last active
November 25, 2016 00:23
-
-
Save peterberwind/315271eeae4ad56cbc15adc7e933af16 to your computer and use it in GitHub Desktop.
Checkout Customization
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
<script type="text/javascript"> | |
function replaceText(selector, text, newText, flags) { | |
var matcher = new RegExp(text, flags); | |
$(selector).each(function () { | |
var $this = $(this); | |
if (!$this.children().length) | |
$this.text($this.text().replace(matcher, newText)); | |
}); | |
} | |
function replaceAllText() { | |
setTimeout(function(){ | |
replaceText('*', '#E42000', 'red', 'g'); | |
replaceText('*', '#FED5DA', 'pink', 'g'); | |
replaceText('*', '#D8F3FA', 'blue', 'g'); | |
}, 1000); | |
} | |
$(document).ready(replaceAllText); | |
$('html').ajaxStop(replaceAllText); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment