// ==UserScript==
// @name        Fix Mozilla Cloaking
// @namespace   http://www.scss.com.au/family/andrew/opera/userjs/
// @version     1.0
// @date        2006-01-29
// @author      Andrew Gregory <andrew at scss dot com dot au>
// @description If pretending to be a Mozilla browser, make sure the product properties are set.
// @include     *
// ==/UserScript==
// License:     http://creativecommons.org/licenses/by-nc-sa/2.0/

(function() {
  if (navigator.appName == 'Netscape' && !navigator.product) {
    opera.postError('gecko ua fixed');
    // cloak as Mozilla
    navigator.product = 'Gecko';
    var idx = navigator.userAgent.indexOf('Gecko/');
    if (idx != -1) {
      navigator.productSub = navigator.userAgent.substr(idx + 6, 8);
    }
    else {
      navigator.productSub = '20050901';
      navigator.userAgent += ' ' + navigator.product + '/' + navigator.productSub;
    }
  }
})();
