Skip to content

Instantly share code, notes, and snippets.

@acapps
Created June 10, 2014 15:46
Show Gist options
  • Save acapps/7e432abd830dd65798bd to your computer and use it in GitHub Desktop.
Save acapps/7e432abd830dd65798bd to your computer and use it in GitHub Desktop.
Customize the Zipwhip Options menu text. Using the option in Zipwhip to link off to your own JavaScript file.
function findByText(_tag, _search, _value)
{
var aTags = document.getElementsByTagName(_tag);
var i = 0;
for (i = 0; i < aTags.length; i++)
{
if (aTags[i].textContent == _search)
{
aTags[i].innerText = _value;
break;
}
}
}
var timedOverwrite = function()
{
window.setTimeout( function() { optionsMenu(); }, 3000);
}
var optionsMenu = function()
{
var y = Ext.getCmp('zw-menubar-wrapper');
var x = y.getEl().child('div .zw-z-button');
x.on('click', overwriteOptionsMenu);
}
var overwriteOptionsMenu = function()
{
findByText("span", "About Zipwhip", "About Alan");
findByText("span", "Zipwhip.com", "AlanCapps.com");
console.log("done...");
}
timedOverwrite();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment