Getting rid of “Working on it…” in SharePoint 2013 app parts

Personally, I find the spinning text “Waiting for it” rather useless and repetitive, especially when you have several app parts on a SharePoint 2013 page.

The icon comes from the page “appredirect.aspx” where no CSS files are referenced and I cannot hide or change the image. Quite a branding issue in my book.

image

There is a simple solution. Add the following script in a Script Editor control on the page or within a JavaScript include file:

var frames = document.getElementsByTagName("iframe");
for (var i=0; i<frames.length; i++) {
frames[i].style.visibility='hidden';
showReady(frames[i]);
}
function showReady(frame) {
frame = document.getElementById(frame.id);
try {
var src = frame.contentWindow.location.href
var isRedirect = src.indexOf("appredirect") > 0;
if (isRedirect) {
setTimeout(function() { showReady(frame) }, 100);
return;
}
} catch (e) {
}
frame.style.visibility='visible';
}