From 18bbb85315b190ccf5698fab3a39b576e7a2dbcd Mon Sep 17 00:00:00 2001 From: Arne Georg Gleditsch Date: Sat, 15 Aug 2009 12:59:34 +0200 Subject: Make Ajax interface default for Gecko and Opera browsers. --- lib/LXRng/Context.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/LXRng/Context.pm b/lib/LXRng/Context.pm index bf717ab..fe1a0fe 100644 --- a/lib/LXRng/Context.pm +++ b/lib/LXRng/Context.pm @@ -54,6 +54,11 @@ sub new { $$self{'prefs'} = { map { /^(.*?)(?:=(.*)|)$/; ($1 => $2) } @prefs }; } + else { + if ($args{'query'}->user_agent() =~ /(Gecko|Opera)\//) { + $$self{'prefs'}{'navmethod'} = 'ajax'; + } + } foreach my $tree (keys %$config) { my $base = $$config{$tree}{'base_url'}; $base =~ s,^https?://[^/]+,,; -- cgit v1.2.3