Introduce useful custom buttons for ABP to you.

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
maybee
Posts: 130
Joined: Sun Jan 17, 2010 7:48 pm
Contact:

Re: introduce useful custom buttons for ABP to you.

Post by maybee »

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();
Wladimir Palant

Re: introduce useful custom buttons for ABP to you.

Post by Wladimir Palant »

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();
maybee
Posts: 130
Joined: Sun Jan 17, 2010 7:48 pm
Contact:

Re: introduce useful custom buttons for ABP to you.

Post by maybee »

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)
Wladimir Palant

Re: introduce useful custom buttons for ABP to you.

Post by Wladimir Palant »

"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.
chimalli

Re: Introduce useful custom buttons for ABP to you.

Post by chimalli »

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?
Post Reply