The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniWeb > OmniWeb General
FAQ Members List Calendar Today's Posts

 
ad block in OmniWeb Thread Tools Search this Thread Display Modes
I'd appreciate a bit of advice. I've never been able to get Adblock to work correctly in OmniWeb.

Let's say I wanted to go to block the OMNI logo at the top of the forums. The url is:

http://forums.omnigroup.com/images/o...ilogolarge.gif

Why doesn't adding *\.gif* to the blocked URLs list get rid of the image? ("From blocked URLs" is checked.) *omnigroup* doesn't work, either. Where am I going wrong?

(This is on the 5.5 "sneaky peek", but I had the same issues with 5.1; I just checked to make sure. This is so obvious that I'm just going to assume I'm doing it wrong, not that it's a bug.)
 
It would be /.\*.gif I believe (at least that is what works for .swf).

However, the easiest way by far to block specific images is to control-click the image and select Filter Image from the contextual menu (it may be in the Image sub-heading). If you want to make it less specific, open the Blocked URLs list and trim back the automatically regexpressed URL to the level you want.

Edit: Made a typo (see later posts). This should have been /.*\.gif

Last edited by JKT; 2006-08-12 at 10:25 AM..
 
Thanks for that tip Jonathan.
 
you could always use a custom CSS sheet and tell OW to use that for the default pages.

Look for it here
 
Quote:
Originally Posted by JKT
However, the easiest way by far to block specific images is to control-click the image and select Filter Image from the contextual menu (it may be in the Image sub-heading).
Hrm. I tried that and it wasn't blocked. :/ Tried reloading, tried restarting OmniWeb.

Is there anything else I could be doing wrong? Should I post a bug report or something on the sneaky peek board?
 
Do you have anything in your White List? If you have anything related to the filtered URL, could it be superseding your filter in the Black List?
 
Quote:
Originally Posted by JKT
Do you have anything in your White List? If you have anything related to the filtered URL, could it be superseding your filter in the Black List?
Nothing. Here are some screenshots to demonstrate my attempt to block the OMNI logo:

My preference pane

My black and white lists

This is with 5.1. 5.5 is concurrently installed, but I had this sort of trouble before.

Edit: fixed second link
 
Quote:
Originally Posted by Paranoid Randroid
Nothing. Here are some screenshots to demonstrate my attempt to block the OMNI logo:

My preference pane

My black and white lists

This is with 5.1. 5.5 is concurrently installed, but I had this sort of trouble before.

Edit: fixed second link
What happens if you remove all the entries in your black list except for the Omni logo?
 
Quote:
Originally Posted by JKT
It would be /.\*.gif I believe (at least that is what works for .swf).
Didn't see that when reading it for the first time. It's wrong (typo?). X-)

This regex would block any URL that has in it: a slash (/) followed by any char (.) followed by an asterisk (\* - normally, an asterisk woud mean "the char before, zero or more times"; it is escaped by the backslash, though, so \* just means "one asterisk"), followed by any char (.), followed by the string "gif". I would, for example, match on the URL http://some.host.com/a*bgif/index.html - if * was allowed in URLs. ;-)

You probably meant /.*\.gif - which means: a slash (/) followed by any char (.) zero or more times (*), followed by a period (\. - this time the . is escaped and thus literally means "one period") followed by the string "gif".

This is somewhat more and also less than needed, though. Why look for the slash? There will be one already at the beginning of the URL (in http://), so it makes no sense to use it for the match. Additionally, "/.*\.gif" also matches anywhere inside the string, not only at the end. So the (hypothetical) URL "http://home.user.com/great.gifs/me.jpg" would be blocked, too.

a) You don't have to match the whole string via .* - the regex "bart" will match "bart" as well as "bartsimpson", "simpson, bart" or any other string containing "bart" anywhere inside.

b) If you want the end, use "$", which stands for "end of string" (or end of line, to be precise).

So, to match all URLs ending with ".gif", the most straightforward way will be to use "\.gif$". (A literal period (\.), followed by the string "gif" (gif), followed by the end of the string ($).)

Similarly, \.swf$ can be used to block all flash content (at least if the URL really ends with .swf, but that's the case, normally :-) ).
 
You're right, it is a typo. It should have been /.*\.gif
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Please block IP ranges Forrest Forums Feedback 13 2010-07-21 12:40 AM
How to block flash ads? superjoppe OmniWeb Feature Requests 14 2008-05-21 01:09 PM
Block diagram won't stay where I put it Clint OmniGraffle General 1 2007-07-10 03:59 PM
Block Intellitext JKT OmniWeb Feature Requests 2 2006-09-29 10:48 AM
is there any way to block evil floaters? gumby OmniWeb Feature Requests 2 2006-06-13 05:38 AM


All times are GMT -8. The time now is 05:03 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.