UserJS to Hide Filtered Elements
Wednesday, October 26, 2005 4:32:08 PM
Do you use Opera's filter.ini feature, or a HOSTS file to block certain content? Do you hate to see web pages rendered with large amounts of unused white-space when your filtering works? If so, then these pair of scripts may help.
As mentioned in my previous post, I use Opera's filter.ini feature. Because of this, Opera effectively blocks many third-party images, iframes, and JavaScripts. Effectively, this often results in large rectangular regions of unused white-space on websites that host advertisements. To compensate for this, I have developed a pair of User JS files that hide non-loaded images and iframes...
Download/view imgload.js
-and-
Download/view iframeload.js
As an added bonus to webpage readability, these scripts can also improve mouse gesture usability -- which don't work so well over blank/filtered-out inline frame elements.
Enjoy.
Update 2009/12/07 - Changed f.location to f.src in iframeload.js
As mentioned in my previous post, I use Opera's filter.ini feature. Because of this, Opera effectively blocks many third-party images, iframes, and JavaScripts. Effectively, this often results in large rectangular regions of unused white-space on websites that host advertisements. To compensate for this, I have developed a pair of User JS files that hide non-loaded images and iframes...
Download/view imgload.js
document.addEventListener("load",
function(e) {
var imgs = document.images;
for (var i = 0, o; o = imgs[ i ]; i++) {
if (!o.complete) o.style.display = "none";
}
}, false);
-and-
Download/view iframeload.js
document.addEventListener("load",
function(e) {
var ifrms = document.getElementsByTagName("iframe");
for (var i = 0, f; f = ifrms[ i ]; i++) {
// if (!f.location) f.style.display = "none"; // Version 1.0
if (!f.src) f.style.display = "none"; // Version 1.1
}
}, false);
As an added bonus to webpage readability, these scripts can also improve mouse gesture usability -- which don't work so well over blank/filtered-out inline frame elements.
Enjoy.
Update 2009/12/07 - Changed f.location to f.src in iframeload.js

dapxin # Tuesday, March 3, 2009 6:33:31 AM
Lee HarveyLee_Harvey # Tuesday, March 3, 2009 1:20:04 PM
Of course, if you visit a page that contains a ton of non-loadable images, then you're going to wait a very long time for the document.load event to kick-in (after the page has loaded) anyhow. Meaning: These scripts don't run until /after/ the page has loaded. They then filter-out (hide) any non-displayed images and silly inline frames with no location specified.
dapxin # Tuesday, March 3, 2009 6:05:54 PM
JIsildur # Monday, April 27, 2009 4:27:26 PM
Brent B. Powersb2pi # Wednesday, October 21, 2009 7:29:01 PM
Unfrotunately, my java script fu is weak, at best, but I'll let you know if I find anything else...
dapxin # Friday, October 30, 2009 11:47:52 PM
e.g http://tinypaste.com/261fe14
How can this be stopped?
dapxin # Wednesday, November 18, 2009 10:13:15 AM
dapxin # Wednesday, November 18, 2009 10:24:54 AM
// @exclude http://*tinypaste.com/*
To the header files. nice.
Lee HarveyLee_Harvey # Monday, December 7, 2009 1:32:28 PM
dapxin # Sunday, February 7, 2010 11:41:07 PM
eg.
http://www.moneysupermarket.com/
Has that got todo with the same problem ? Isn't it possible to implement a whitelist system using cookies ?
dapxin # Sunday, May 16, 2010 7:14:48 PM
http://craighickmanontennis.blogspot.com/2010/05/madrid-final-open-thread.html
the comments by disqus is blocked off It seems.