From 841b56cd2b970466d68fbc4165f86760759c0169 Mon Sep 17 00:00:00 2001 From: Mageia SVN-Git Migration Date: Mon, 7 Feb 2011 23:18:17 +0000 Subject: Synthesized commit during git-svn import combining previous Mandriva history with Mageia. This commit consitsts of the following subversion commits: ------------------------------------------------------------------------ r485 | dmorgan | 2011-02-07 23:18:17 +0000 (Mon, 07 Feb 2011) | 1 line Import cleaned indexhtml ------------------------------------------------------------------------ In addition to the above commits, the following cleaning work has been recorded: o mails - replacement was done in headers except for Subject in header-ur which does not contain Mandriva... - dropped most mail bodys, except for French & English, rewritten to a minimal version - a good mail should be designed and translated o about - command is about-mandriva, have to look at what uses it - removed MDV graphics from style/css o HTML - a simple page should be placed there, until web team provides something o po - all translations should be dropped, strings updated when the real page is ready o COPYING - added COPYING file (GNU GPL v3). indexhtml.spec file stated "GPL" (should be changed to GPL3+) --- HTML/script.js | 148 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 88 insertions(+), 60 deletions(-) (limited to 'HTML/script.js') diff --git a/HTML/script.js b/HTML/script.js index 71e40e6..fff1fb8 100644 --- a/HTML/script.js +++ b/HTML/script.js @@ -1,67 +1,95 @@ -/* $Id$ +/** + * @copyright Copyright (c) 2011 Romain d'Alverny + * @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3 and later * + * Redirect browser online IF it is in online mode. + * Or stay on offline page and listen to online event. + * + * Browser targets: Mozilla Firefox 3.6+, Konqueror. */ -var remoteweb = 'http://start.mandriva.com/'; - -String.prototype.rtrim = function() { return this.replace(/\s*$/, ""); }; -String.prototype.ltrim = function() { return this.replace(/^\s*/, ""); }; -String.prototype.trim = function() { return this.rtrim().ltrim(); }; -String.prototype.encodeURI = function() { return this.replace(/\+/g,"%2B"); }; - -function actOnline() { - // #1 - var release = ''; - var pack = ''; - var product = ''; - var lang = ''; - try { - var t = document.getElementsByTagName('meta'); - for( var i=0; i