El 6 de diciembre de 2010 13:13, Samuel Gómez <fuljencio@gmail.com
escribió:
See:
http://vipinnova.com/libreoffice/download/package-negotiation.js
Samuel I see the script much better!
OK now, I took the most popular distros from
http://distrowatch.com/stats.php?section=popularity
and made this:
if (ua.indexOf('Ubuntu') > -1 ||
ua.indexOf('Mint') > -1 ||
ua.indexOf('Debian') > -1 ||
ua.indexOf('Arch') > -1) return 'deb';
if (ua.indexOf('Fedora') > -1 ||
ua.indexOf('SUSE') > -1 ||
ua.indexOf('PCLinuxOS') > -1 ||
ua.indexOf('Mandriva') > -1) return 'rpm';
Does anyone know if any of these package manager associations is wrong?
Don't know either, but it looks good.
And, about the user agent infixes, I'm not sure of it for Arch. I'd
say the rest are OK.
Now we need just to test it. Can you provide an URL for a HTML document
with
that associated JS to ask people to test it please :D
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.