File:  [mozdev] / calendarhelp / www / help.js
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Mon May 23 11:45:22 2005 UTC (13 years, 10 months ago) by whiteley
Branches: MAIN
CVS tags: HEAD
online update 0.5+ (product switching)

/*********************************************************
 CalendarHelp source code
 Copyright (C) 2004, 2005 Rod Whiteley
 Licensed under the Open Software License version 2.1
 OSI Certified Open Source Software
 http://calendarhelp.mozdev.org
 *********************************************************/
// loaded by html in online viewer

var p = location.search.match(/\?product=(\S+)/);
p = (p && p[1])? p[1] : "";

var ext = false, sun = false, fut = false;
switch (p) {
	case "sunbird":
		sun = true;
		break;
	case "future":
		sun = true;
		fut = true;
		break;
	default:
		ext = true;
	}

with (document.styleSheets[0]) {
	var n = cssRules.length
	if (!ext) insertRule(".extensions {display:none}", n);
	if (!sun) insertRule(".sunbird {display:none}", n);
	if (!fut) insertRule(".future {display:none}", n);
	insertRule('.thiscal:before {content:"' + (ext? _anycal : sunbird) + '";}', n);
	insertRule('.thismozcal:before {content:"' + (ext? mozcal : _mozsunbird) + '";}', n);
	insertRule('.thispref:before {content:"' + (ext? _calpref : _sunpref) + '";}', n);
	}



FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>