Avant/Orca Javascript check (Cross Platform Addons)

General questions about scripts and buttons should be asked here. Development scripts and buttons may also be posted for feedback.

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

Post Reply
User avatar
sulpherdragon
Contributor
Contributor
Posts: 222
Joined: Sat Dec 15, 2007 9:51 pm
Windows Version: Windows 7
Avant Version: 2013 Build 23
Default engine: Firefox
IE Version:
Skin:
Contact:

Avant/Orca Javascript check (Cross Platform Addons)

Post by sulpherdragon » Sat Jul 19, 2008 1:23 am

I wrote a simple function for you guys to include in your Avant/Orca cross capable addons

Code: Select all

function OrcaAvantCheck()
{
// Orca = 1
// Avant = 2
// Error = 0

if (navigator.userAgent.indexOf("Gecko")>=0)
return 1;
if (navigator.userAgent.indexOf("MSIE")>=0)
return 2;

return 0;
}
I expect this wont work forever since Anderson should be changing stuff around, there is an error in Avant where it claims to be Orca, so until then im checking for "Gecko" and "MSIE". When he changes it we should be able to use "Avant" and "Orca" instead. A Return of 1 means the plugin is in Orca, a return of 2 mean Avant. If it returns 0 theres an error somewhere, most likely due to Anderson changing something. Enjoy
Image

User avatar
statm1
Moderator
Moderator
Posts: 2168
Joined: Thu Mar 10, 2005 10:03 pm
Windows Version: Windows 8/7
Avant Version: 2012 Build 181
IE Version: 10
Location: North Carolina, USA
Contact:

Re: Avant/Orca Javascript check (Cross Platform Addons)

Post by statm1 » Sun Jul 20, 2008 8:16 pm

Yea this is a known bug.. But thanks for your help in the mean time until he gets it fixed.
Image
-- Matt --

User avatar
sulpherdragon
Contributor
Contributor
Posts: 222
Joined: Sat Dec 15, 2007 9:51 pm
Windows Version: Windows 7
Avant Version: 2013 Build 23
Default engine: Firefox
IE Version:
Skin:
Contact:

Re: Avant/Orca Javascript check (Cross Platform Addons)

Post by sulpherdragon » Fri Aug 29, 2008 10:07 pm

This works properly now since Orca 1.1 build 4 came out.
Image

Post Reply

Who is online

Users browsing this forum: No registered users