The Adblock Project Forum Index The Adblock Project
Pull up a seat ...stay a while.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Feature Request] Per session blocking

 
Post new topic   Reply to topic    The Adblock Project Forum Index -> Main
View previous topic :: View next topic  
Author Message
Nahor



Joined: 06 Dec 2003
Posts: 12

PostPosted: Thu Jan 15, 2004    Post subject: [Feature Request] Per session blocking Reply with quote

I'd like to have blocks that are valid only until I quite the browser.

Quite often, I go to a website by following a link from a news article. Once I'm done visiting this site, I never go back to it (or maybe a few month later).
Those site have sometimes annoying flashing images that don't have an easily recognizable url (http://web.com/images/click_me.gif). So there isn't any generic rule that can be used. It's very site specific.

Since I don't go to this site very often, I don't want to add one rule to block only one image. This would just make the list of rules unmanagable and slow after a while.
So usually I use quickblock for that.

The problem is then that I have to use quickblock every time the page refreshes or that I navigate to another page on the same site. So if the site has an autorefresh or if it's a forum site for instance, this become painful very quickly.

What I'd like is to be able to block images until I restart the browser. That way, the images will be blocked for as long as a surf this site. And when I'm done, AdBlock will forget about them and thus won't make any unnecessary URL checks.
Back to top
View user's profile Send private message
Lanny Chambers
Guest





PostPosted: Thu Jan 15, 2004    Post subject: Reply with quote

Why not simply disable animations in the prefs? Mine are set to loop once then stop, and I almost never regret that setting.

Too bad Mozilla didn't implement [ESC] to stop animations.
Back to top
MW
Guest





PostPosted: Thu Jan 15, 2004    Post subject: Reply with quote

as i understand, AdBlock will be having a feature in upcoming releases which will "prune" unused filters determined by a default preset (i think 30 days was mentioned) ..... check this thread
Back to top
Nahor



Joined: 06 Dec 2003
Posts: 12

PostPosted: Fri Jan 16, 2004    Post subject: Reply with quote

Lanny Chambers wrote:
Why not simply disable animations in the prefs? Mine are set to loop once then stop, and I almost never regret that setting.

Too bad Mozilla didn't implement [ESC] to stop animations.
I don't set this option because I often open pages in the background and if I block looping I may miss the animation if not the image altogether if it terminates with a blank image. While not really important, it's just annoying.

Anyway, AdBlock doesn't block only images, but other embedded objects too. And those you can't stop with just ESC or a preference setting.
Back to top
View user's profile Send private message
Nahor



Joined: 06 Dec 2003
Posts: 12

PostPosted: Fri Jan 16, 2004    Post subject: Reply with quote

MW wrote:
as i understand, AdBlock will be having a feature in upcoming releases which will "prune" unused filters determined by a default preset (i think 30 days was mentioned) .....
While it could be useful and better than the current system, if I already know that I won't reuse this rule for a while, why not just prevent it from being remebered?
Back to top
View user's profile Send private message
MW
Guest





PostPosted: Fri Jan 16, 2004    Post subject: Reply with quote

i hear u..... Smile

BTW there is a way to use AdBlock on a per session basis too.....
just copy your Adblock preference including the filters u want to persist across sessions from your prefs.js to user.js (if u don't have user.js then just use notepad to create one)
the preference line to copy is the one beginning with user_pref("adblock.patterns"

then when u add a new preference (which will add it to the prefs.js).... it will always be overwritten by the line in user.js the NEXT time u restart mozilla, effectively removing the last "sessions" filters. The only caveat to this approach is that if there was a filter u encountered which u wanted to persist u would have to add it to your list in the user.js otherwise it would be overwritten......
Back to top
rue
Developer


Joined: 22 Oct 2003
Posts: 752

PostPosted: Fri Jan 16, 2004    Post subject: Reply with quote

This could be an intriguing feature, if implemented properly.
.
It's not high on the priority-list, so nothing immediate. But, all things in good time.
.
Btw, good call MW -- even I didn't know about user.js.
Back to top
View user's profile Send private message
MW
Guest





PostPosted: Fri Jan 16, 2004    Post subject: Reply with quote

You're welcome....glad i could contibute albiet ever so little....
BTW, the optional use of user.js is documented (i forget exactly where but it is easy enough to search on mozilla website or any of the many mozilla support sites)....
essentially user.js Contains personal prefs which mozilla should NEVER overwrite and is used to customize mozilla to your own taste..... so i just figured that this could be utilized as a way for Nahor to get his wish Smile Smile
Back to top
MW
Guest





PostPosted: Fri Jan 16, 2004    Post subject: Reply with quote

Link from mozilla FAQ....
http://www.mozilla.org/unix/customizing.html#prefs
Back to top
Nahor



Joined: 06 Dec 2003
Posts: 12

PostPosted: Fri Jan 16, 2004    Post subject: Reply with quote

Thanks MW. A bit akward though.
I have a better solution (for me): I never start any rule with "http", they always start with "*" or "/". For hostnames, I start with "*://..." that way the rule works whatever the protocol (http, https, ....).
So a temporary rule can be easily identified because it doesn't start with those two letters.
Back to top
View user's profile Send private message
MW
Guest





PostPosted: Sat Jan 17, 2004    Post subject: Reply with quote

not sure why u say it's awkward.... u would only have to copy the user_pref line ONCE to the user.js and just leave it. ( i rarely update/add a "permanent" filter now a days, and it is simple to add it it to user.js if i need to). There would be no need to update it unless u wanted to add a filter which persisted across sessions. It seems (to me) that this method is smoother than looking at a list of filters to determine which are temp or permenant....

As for your methos of using "*" & "*://", firstly "*" are no longer needed at the begin or end of a simple filter except for specific cases.
Secondly,you are descreasing the speed & performance of AdBlock by using those type of wildcards too much, as outlined here as well as here
and here

Smile
Back to top
Nahor



Joined: 06 Dec 2003
Posts: 12

PostPosted: Sat Jan 17, 2004    Post subject: Reply with quote

MW wrote:
not sure why u say it's awkward.... u would only have to copy the user_pref line ONCE to the user.js and just leave it. ( i rarely update/add a "permanent" filter now a days, and it is simple to add it it to user.js if i need to). There would be no need to update it unless u wanted to add a filter which persisted across sessions. It seems (to me) that this method is smoother than looking at a list of filters to determine which are temp or permenant....
I'm still updating the list now and then. But mostly I know that I will forget about the user.js file. Especially if I don't update very often. And then figuring out why the rule doesn't stick will be a real headache.

MW wrote:
As for your methos of using "*" & "*://", firstly "*" are no longer needed at the begin or end of a simple filter except for specific cases.
Secondly,you are descreasing the speed & performance of AdBlock by using those type of wildcards too much, as outlined here as well as here
and here
Thanks for the info.
Do you know if "http://foo.com" is really better than "://foo.com"? I mean one of the link you gave says "simple-filters which include a complete host-name are matched faster than any other filter". Here, the "complete host-name" is given. Just the protocol is missing. Having one rule for any protocol is easier to maintain than having one for http and one for https. Most of the time it's http, so I guess I could add the https one for those that matter but it would still be better to have rules that are protocol independent
Back to top
View user's profile Send private message
MW
Guest





PostPosted: Sat Jan 17, 2004    Post subject: Reply with quote

Nahor wrote:
MW wrote:
not sure why u say it's awkward.... u would only have to copy the user_pref line ONCE to the user.js and just leave it. ( i rarely update/add a "permanent" filter now a days, and it is simple to add it it to user.js if i need to). There would be no need to update it unless u wanted to add a filter which persisted across sessions. It seems (to me) that this method is smoother than looking at a list of filters to determine which are temp or permenant....
I'm still updating the list now and then. But mostly I know that I will forget about the user.js file. Especially if I don't update very often. And then figuring out why the rule doesn't stick will be a real headache.
A valid point ....but keep in mind u can manually edit user.js even while mozilla is open and it will stick, unlike prefs.js which will get overwritten. Perhaps some aspirin can help too...hehe..Wink Wink


Nahor wrote:
MW wrote:
As for your methos of using "*" & "*://", firstly "*" are no longer needed at the begin or end of a simple filter except for specific cases.
Secondly,you are descreasing the speed & performance of AdBlock by using those type of wildcards too much, as outlined here as well as here
and here
Thanks for the info.
Do you know if "http://foo.com" is really better than "://foo.com"? I mean one of the link you gave says "simple-filters which include a complete host-name are matched faster than any other filter". Here, the "complete host-name" is given. Just the protocol is missing. Having one rule for any protocol is easier to maintain than having one for http and one for https. Most of the time it's http, so I guess I could add the https one for those that matter but it would still be better to have rules that are protocol independent
good question, i don't know....rue could answer that definatively i'm sure.
Back to top
rue
Developer


Joined: 22 Oct 2003
Posts: 752

PostPosted: Sun Jan 18, 2004    Post subject: Reply with quote

Nahor:
Each filter-string is checked with this pattern: /^https?:\/\/[^*\/]+\//. So, both http and https are accounted-for.
.
(btw, i edited this post to include the required trailing-slash.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Adblock Project Forum Index -> Main All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group