Monotone-Parent: e3f0ba86e1168ac7457fd47477e96ee5177b581a

Monotone-Revision: 5ced3caff6941c97131463243328da8efd133cf1

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-04-20T17:45:17
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau committed 2010-04-20 17:45:17 +00:00
1 parent 1112a46b7b
commit b9e50361c3
3 files changed
+62 -18

No files matched your search

+25 -3
View File
@@ -964,17 +964,27 @@ function configureLoadImagesButton() {
var imgs = content.select("IMG");
$(imgs).each(function(img) {
var unsafeSrc = img.getAttribute("unsafe-src");
if (unsafeSrc && unsafeSrc.length > 0) {
if (unsafeSrc) {
hiddenImgs.push(img);
}
});
content.hiddenImgs = hiddenImgs;
var hiddenObjects = [];
var objects = content.select("OBJECT");
$(objects).each(function(obj) {
if (obj.getAttribute("unsafe-data")
|| obj.getAttribute("unsafe-classid")) {
hiddenObjects.push(obj);
}
});
content.hiddenObjects = hiddenObjects;
if (typeof(loadImagesButton) == "undefined" ||
loadImagesButton == null ) {
return;
}
if (hiddenImgs.length == 0) {
if ((hiddenImgs.length + hiddenObjects.length) == 0) {
loadImagesButton.setStyle({ display: 'none' });
}
}
@@ -1255,8 +1265,20 @@ function onMessageLoadImages(event) {
log ("unsafesrc: " + unSafeSrc);
img.src = img.getAttribute("unsafe-src");
});
content.hiddenImgs = null;
$(content.hiddenObjects).each(function(obj) {
var unSafeData = obj.getAttribute("unsafe-data");
if (unSafeData) {
obj.setAttribute("data", unSafeData);
}
var unSafeClassId = obj.getAttribute("unsafe-classid");
if (unSafeClassId) {
obj.setAttribute("classid", unSafeClassId);
}
});
content.hiddenObjects = null;
var loadImagesButton = $("loadImagesButton");
loadImagesButton.setStyle({ display: 'none' });