our %count;
our $mobile;
+our $VERSION = '1.01';
+
if (m{<td class=hl>} .. m{</?td>}) {
$count{-source} = 'http://stats.wikimedia.org/archive/squid_reports/';
$count{-title } = 'Wikimedia';
# select relevant columns
/>Browser versions(.*)/ ... m{</table>} && last or next;
my ($tr, $id, $count2, $count) = split /(?:<[^>]*>)+/;
-$mobile = $count2 =~ /(?<!non) mobile/ if $id ~~ ' ';
+$mobile = $count2 !~ /non mobile/ if $id ~~ ' ';
next if $id ~~ ['Total', ' '];
# convert to usable syntax
$version //= 0;
given ($browser) {
when (['Firefox', 'Iceweasel']) {
- $browser = 'firefox';
+ $browser = $mobile ? 'and_ff' : 'firefox';
continue;
}
when ('MSIE') {
- $browser = 'ie';
+ $browser = $mobile ? 'ie_mob' : 'ie';
continue;
}
when ('Opera') {
}
}
when ('Chrome') {
- $browser = 'chrome';
+ $browser = $mobile ? 'and_chr' : 'chrome';
s/\.\d+$// for $version;
}
when ('Android') {
$browser = 'android';
}
+ when ('BlackBerry') {
+ $browser = 'bb';
+ }
+ when ('UCWEB') {
+ $browser = 'and_uc';
+ }
s/\.0$// for $version;
}