adding all weblabels from weblabels.fsf.org
[weblabels.fsf.org.git] / www.fsf.org / 20131028 / files / static.fsf.org / plone2012 / accessibility.js
CommitLineData
5a920362 1
2/* - accessibility.js - */
3// accessibility.js
4// provides global function setBaseFontSize, which is used on the
5// accessibility page to set small, normal or large type.
6//
7// font size is stored in a "fontsize" cookie, which is read on each pageload.
8
9/*global createCookie, readCookie */
10
11function setBaseFontSize($fontsize, $reset) {
12 var $body = jQuery('body');
13 if ($reset) {
14 $body.removeClass('smallText').removeClass('largeText');
15 createCookie("fontsize", $fontsize, 365);
16 }
17 $body.addClass($fontsize);
18}
19
20jQuery(function($) {
21 var $fontsize = readCookie("fontsize");
22 if ($fontsize) {
23 setBaseFontSize($fontsize, 0);
24 }
25});
26