Created
July 24, 2019 18:33
-
-
Save Farmatique/943977ed67891309016c579b3dc90edf to your computer and use it in GitHub Desktop.
Pardot cut "Select" from the first option inside <select>
This file contains hidden or 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
setTimeout(function(){ | |
var theElements = document.querySelectorAll("#pardot-form select"); // seach all dropdown elements with " #pardot-forms select " | |
for(var i=0; i<theElements.length; i++) { | |
var str = theElements[i].children[0].innerHTML; | |
var res = str.match(/^Select\b (...+).../i); | |
theElements[i].children[0].innerHTML = ''; | |
theElements[i].children[0].innerHTML = res[1]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment