MHP - Addon cookies too! v1

Finished Scripts and Buttons ready for download can be found here.

Moderators: Support Staff², Support Staff, AvantGuard, Developer

Post Reply
addonsfan
Avantic Elite
Avantic Elite
Posts: 1940
Joined: Sun Aug 05, 2007 11:56 am
Windows Version: Windows 7
Avant Version: N/A
IE Version: N/A
Location: California, USA
Contact:

MHP - Addon cookies too! v1

Post by addonsfan » Tue Dec 18, 2007 5:37 am

Now you can add cookies to your addons! This simple auto-execute addon gives you easy access to save cookies throughout each website. The purpose of this, is to make it easier for addon developers to give their creations memory.

This script comes with two functions:
getCookie(name) - returns -1 on non-existing cookies
setCookie(name, value, days to be save) - does not return anything

Your script will save the cookies into the cookie file for the current website. You should respect all websites, and prevent breaking their site by using cookie names they most likely won't be using.

To use this in your own script, simply request that the user installs this. You can use this with any auto-execute and command button scripts. Do not copy and paste the code into your own script, there is reason for this.

One of the reasons I am releasing this script, is because I plan on coming out with many more addons that use cookies, and I think it would be most efficient if the two functions weren't being redefined in every addon. Addon's are a wonderful thing. They are even better when they're smart, and they're best when they can remember.

Future updates of this addon may include advance error detections and more functions. Please feel free to contribute, as long as you post each revision in this thread.

Download it...
The attachment addon-cookies.aba is no longer available
[url=aba://forum.avantbrowser.com/download/file.php?id=378]Or automatically install it[/url]

Updated to 1.1 by DrDrrae.
Attachments
addon-cookies.aba
(1.01 KiB) Downloaded 433 times

addonsfan
Avantic Elite
Avantic Elite
Posts: 1940
Joined: Sun Aug 05, 2007 11:56 am
Windows Version: Windows 7
Avant Version: N/A
IE Version: N/A
Location: California, USA
Contact:

Re: MHP - Addon cookies too! v1

Post by addonsfan » Tue Dec 18, 2007 7:04 am

Major revision
Addon cookies too! v1.1

Please install this one insead:
addon-cookies.aba
(1.01 KiB) Downloaded 434 times
[url=aba://forum.avantbrowser.com/download/file.php?id=377]Auto install this addon[/url]

There are two major changes:
1) I've added a variable to the script which is defined as true when ran. This allows developers to check if the script is available. My scripts will not work without it.
2) I forgot to remove debug alerts for the last release.

Post Reply