Seriously though… What is your Time Worth?

I was really annoyed when someone called me and told me my voicemailbox was full.

Comcast could not be more worthless about this, as you can find they’re mostly interested in teaching you how to delete 1 voice at a time!

You can search all these things:

Here is the most popular AND STUPID forum article: https://forums.businesshelp.comcast.com/t5/Business-Voice/Voicemail-box-full-no-notification-or-bulk-delete-option/td-p/35647 where they explicitly say things like this:

I can help you configure your Business VoiceEdge service to get the most out of it. We do have options for notification and voicemail management. Please send a private message so we can review your account and voice settings. “

The Truth: There is no way to bulk delete your voicemail through Comcast employees


Honestly though, I could not deal with that. I’m a Business Owner potentially losing business because someone cannot get through to me…

So I wrote a little script to do it all for me!

Lets Get To The Code!

This first chunk will listen to ALL XMLHttpRequest’s that happen, which is exactly what we want to do.

// https://stackoverflow.com/a/5202999
function addXMLRequestCallback(callback) {
  var oldSend, i;
  if (XMLHttpRequest.callbacks) {
    XMLHttpRequest.callbacks.push(callback);
  } else {
    XMLHttpRequest.callbacks = [callback];
    oldSend = XMLHttpRequest.prototype.send;
    XMLHttpRequest.prototype.send = function () {
      for (i = 0; i < XMLHttpRequest.callbacks.length; i++) {
        XMLHttpRequest.callbacks[i](this);
      }
      oldSend.apply(this, arguments);
    };
  }
}

Next is a small debounce helper function to make sure we can LOOP through all buttons with a delay. comcast overwrites their own setTimeout and setInterval with some logging so things are not straightforward here…

var debounce = (func, wait) => {
  var timeout;
  return function executedFunction(...args) {
    const later = () => {
      timeout = null;
      func(...args);
    };
    clearTimeout(timeout);
    timeout = setTimeout(later, wait);
  };
};

Now for the real juice. How to find the delete buttons.

Visit https://business.comcat.com/myaccount/Secure/Phone/Voicemail/Inbox

function getDeleteButton() {
  var buttons = document.querySelectorAll("[data-role='delete-single'");
  if (buttons.length > 0) {
    return buttons[Math.floor(Math.random() * buttons.length)];
  } else {
    return false;
  }
}

function pressDelete() {
  var button = getDeleteButton();
  if (button) {
    console.log("trying now");
    button.click();
  } else {
    alert("ALL DONE... reloading in 1 second");
    setTimeout(function () {
      window.location.reload(true);
    }, 100);
  }
}

Then we debounce to give a little delay on the subsequent actions:

var debouncedRequestDelete = debounce(pressDelete, 1000);

Aaaaand finally, create the handler and start the script!

addXMLRequestCallback(debouncedRequestDelete);

pressDelete();

Now sit and watch things get deleted!

You might have an error if their servers are overloaded. Then you only have to refresh the page and paste the script in again!

Hope you like it!!


PS: I will bulk-delete your Comcast Voicemails for $100. email me

What takes you 3 hours of insanity… What is your time worth?