/[pub]/suikawiki/script/misc/plugins/view/Downgrade.wp2
Suika

Diff of /suikawiki/script/misc/plugins/view/Downgrade.wp2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by wakaba, Fri Jan 16 07:54:22 2004 UTC revision 1.3 by wakaba, Sun Feb 8 08:44:00 2004 UTC
# Line 31  Function: Line 31  Function:
31      my $ua_name = $wiki->{var}->{client}->{user_agent_name};      my $ua_name = $wiki->{var}->{client}->{user_agent_name};
32            
33      ## Gecko Mozilla      ## Gecko Mozilla
34      if ($ua_name =~m#Gecko/([0-9]+)#) {      if ($ua_name =~m#\bGecko/([0-9]+)#) {
35        my $geckover = $1;        my $geckover = $1;
36        $flag->{media_type_no_rdf_plus_xml} = 1;        $flag->{media_type_no_rdf_plus_xml} = 1;
37        $flag->{http_no_see_other} = 1 if $geckover > 20030331;        $flag->{http_no_see_other} = 1 if $geckover > 20030331;
# Line 45  Function: Line 45  Function:
45      ## Classic Mozilla      ## Classic Mozilla
46      } elsif ($ua_name =~ m#^Mozilla/([0-4]\.[0-9]+)#) {      } elsif ($ua_name =~ m#^Mozilla/([0-4]\.[0-9]+)#) {
47        my $mozver = 0+$1;        my $mozver = 0+$1;
48          $flag->{html_no_pi} = 1;
49        $flag->{html_no_id} = 1;        $flag->{html_no_id} = 1;
50        $flag->{media_type_no_xml} = 1;        $flag->{media_type_no_xml} = 1;
51        $flag->{html_no_latin1} = 1 if $mozver < 3;        $flag->{html_no_latin1} = 1 if $mozver < 3;
52          ## ISSUE: Is NN3 support latin-1 character on Japanese Windoze?          ## ISSUE: Is NN3 support latin-1 character on Japanese Windoze?
53        $flag->{charset_name_with_x} = 1 if $mozver < 3;        $flag->{charset_name_with_x} = 1 if $mozver < 3;
54        $flag->{http_refresh_no_semicolon_in_uri} = 1;        $flag->{http_refresh_no_semicolon_in_uri} = 1;
55        if ($mozver < 1) {        if ($mozver >= 4) {
56            $flag->{ua_netscape4} = 1;
57            $flag->{stylesheet_non_standard} = 1;
58            $flag->{html_link_no_media} = 1;
59          } elsif ($mozver < 1) {
60          $flag->{http_no_see_other} = 1;          $flag->{http_no_see_other} = 1;
61          $flag->{media_type_no_parameter} = 1;          $flag->{media_type_no_parameter} = 1;
62            $flag->{stylesheet_no_css} = 1;
63          } else {
64            $flag->{stylesheet_no_css} = 1;
65        }        }
66                
67      ## IE      ## IE
68        if ($ua_name =~ /MSIE ([2-9]\.[0-9]+)/) {        if ($ua_name =~ /\bMSIE ([2-9]\.[0-9]+)/) {
69          my $iever = 0+$1;          my $iever = 0+$1;
70          $flag->{html_no_div} = 1 if $iever < 3;          if ($iever >= 6) {
         $flag->{html_no_latin1} = (3 <= $iever and $iever < 4) ? 1 : 0;  
           ## ISSUE: Is WinIE4 support latin-1 character on Japanese Windoze?  
         $flag->{http_refresh_no_quoted_url} = 1 if $iever < 3;  
         if ($iever >= 5) {  
71            $flag->{media_type_no_xml} = 0;            $flag->{media_type_no_xml} = 0;
72            $flag->{media_type_no_plus_xml} = 1;            $flag->{media_type_no_plus_xml} = 1;
73              $flag->{ua_winie60} = 1;
74            } elsif ($iever >= 5) {
75              $flag->{media_type_no_xml} = 0;
76              $flag->{media_type_no_plus_xml} = 1;
77              if ($iever >= 5.5) {
78                $flag->{ua_winie55} = 1;
79              } else {
80                $flag->{ua_winie50} = 1;
81              }
82            } elsif ($iever >= 4) {
83              $flag->{ua_winie40} = 1;
84            } elsif ($iever >= 3) {
85              $flag->{html_no_latin1} = 1;
86                ## ISSUE: Is WinIE4 support latin-1 character on Japanese Windoze?
87              $flag->{ua_winie30} = 1;
88            } else { # WinIE 2
89              $flag->{html_no_div} = 1;
90              $flag->{stylesheet_no_css} = 1;
91              $flag->{http_refresh_no_quoted_url} = 1;
92          }          }
93            $flag->{media_type_no_app_js} = 1;
94            $flag->{stylesheet_non_standard} = 1 if $iever >= 3;
95            $flag->{ua_netscape4} = 0;
96        }        }
97      ## WinIE 1.0      ## WinIE 1.0
98      } elsif ($ua_name =~ m#^Microsoft Internet Explorer#) {      } elsif ($ua_name =~ m#^Microsoft Internet Explorer\b#) {
99        $flag->{html_no_id} = 1;        $flag->{html_no_id} = 1;
100        $flag->{html_no_div} = 1;        $flag->{html_no_div} = 1;
101        $flag->{http_no_see_other} = 1;        $flag->{http_no_see_other} = 1;
102      } elsif ($ua_name =~ /^Infomosaic/) {        $flag->{stylesheet_no_css} = 1;
103        } elsif ($ua_name =~ /^Infomosaic\b/) {
104        $flag->{media_type_no_parameter} = 1;        $flag->{media_type_no_parameter} = 1;
105        $flag->{html_no_id} = 1;        $flag->{html_no_id} = 1;
106        $flag->{html_no_div} = 1;        $flag->{html_no_div} = 1;
107          $flag->{stylesheet_no_css} = 1;
108      }      }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24