Introduce useful custom buttons for ABP to you.

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey

Re: introduce useful custom buttons for ABP to you.

Postby maybee » Wed Feb 16, 2011 6:06 am

Can you make a new button for me?
Please combine 'enable Adblock Plus' with 'refresh' of FF.
when clicking on the button, the status of Enabling Adblock Plus will be changed and then the page will be refreshed.
Enable Adblock Plus + Refresh(reload)

and the latest development build in version 1.3.5a2.2826
Disable everywhere (=enable Adblock Plus) doesn't work.
Code: Select all
/*Code*/
document.getElementById("abp-status-enabled").click();
maybee
 
Posts: 130
Joined: Sun Jan 17, 2010 8:48 pm

Re: introduce useful custom buttons for ABP to you.

Postby Wladimir Palant » Wed Feb 16, 2011 9:59 am

Only the menu item changed, the corresponding command still has the same ID. This will work everywhere:
Code: Select all
document.getElementById("abp-command-enable").doCommand();

To refresh the current page you do:
Code: Select all
content.location.reload();
Wladimir Palant
ABP Developer
 
Posts: 8397
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: introduce useful custom buttons for ABP to you.

Postby maybee » Wed Feb 16, 2011 11:54 am

thank you for the source code, Wladimir Palant.
I have added 2 buttons updated at this page.

Disable everywhere (Adblock Plus 1.3.5a2.2826 or higher)
Disable everywhere + Reload this page (Adblock Plus 1.3.5a2.2826 or higher)
maybee
 
Posts: 130
Joined: Sun Jan 17, 2010 8:48 pm

Re: introduce useful custom buttons for ABP to you.

Postby Wladimir Palant » Wed Feb 16, 2011 1:12 pm

"Disable everywhere" is only the new name for "Enable Adblock Plus". The code above will work both with Adblock Plus 1.3.3 and Adblock Plus 1.3.5.
Wladimir Palant
ABP Developer
 
Posts: 8397
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: Introduce useful custom buttons for ABP to you.

Postby chimalli » Fri Mar 18, 2011 8:48 pm

As long as I understand, this tool let me add an option as:

Code: Select all
disable Adblock Plus at this page + Refresh(reload)
disable Adblock Plus at this domain + Refresh(reload)


can somebody help with the code?
chimalli
 

Previous

Return to Adblock Plus for Firefox support

Who is online

Users browsing this forum: ShanaBrum and 12 guests