and tags get normal text size also in
some versions of Firefox, Safari, Konqueror, Chrome etc. */
tt, code, pre {
font-family: monospace, sans-serif;
}
/* Remove bullets when there are multiple edit page warnings */
ul.permissions-errors > li {
list-style: none;
}
ul.permissions-errors {
margin: 0;
}
/* No linewrap on the labels of the login/signup page */
body.page-Special_UserLogin .mw-label label,
body.page-Special_UserLogin_signup .mw-label label { white-space : nowrap; }
/* */
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline; filename=index.css
Content-Type: text/css; charset=UTF-8; name=index.css
Content-Location: http://en.wikipedia.org/w/index.php?title=MediaWiki:Print.css&usemsgcache=yes&ctype=text%2Fcss&smaxage=2678400&action=raw&maxage=2678400
Content-Transfer-Encoding: 8bit
/* */
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline; filename=index.css
Content-Type: text/css; charset=UTF-8; name=index.css
Content-Location: http://en.wikipedia.org/w/index.php?title=MediaWiki:Handheld.css&usemsgcache=yes&ctype=text%2Fcss&smaxage=2678400&action=raw&maxage=2678400
Content-Transfer-Encoding: 8bit
/* Flatten the main page table layout */
table.layout,
table.layout tbody,
table.layout tr,
table.layout th,
table.layout td,
#mp-topbanner,
#mp-topbanner tbody,
#mp-topbanner tr,
#mp-topbanner th,
#mp-topbanner td,
#mp-upper,
#mp-upper tbody,
#mp-upper tr,
#mp-upper th,
#mp-upper td,
#mp-tfp,
#mp-tfp tbody,
#mp-tfp tr,
#mp-tfp th,
#mp-tfp td {
display: block !important;
width: 100% !important;
}
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline
Content-Type: image/png
Content-Location: http://upload.wikimedia.org/wikipedia/en/1/18/Monobook-bullet.png
Content-Transfer-Encoding: Base64
iVBORw0KGgoAAAANSUhEUgAAAAkAAAANAQMAAABBztZFAAAABlBMVEUAAwBjjJzG
2b5OAAAAAXRSTlMAQObYZgAAABBJREFUCNdjYMAG7FARAwMADXkBNzRuJgIAAAAA
SUVORK5CYII=
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline; filename=index.css
Content-Type: text/css; charset=UTF-8; name=index.css
Content-Location: http://en.wikipedia.org/w/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&ctype=text%2Fcss&smaxage=2678400&action=raw&maxage=2678400
Content-Transfer-Encoding: 8bit
/* */
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline; filename=index.css
Content-Type: text/css; charset=UTF-8; name=index.css
Content-Location: http://en.wikipedia.org/w/index.php?title=-&action=raw&maxage=2678400&gen=css
Content-Transfer-Encoding: 8bit
/* generated user stylesheet */
a.new, #quickbar a.new { color: #CC2200; }
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline; filename=wikibits.js
Content-Type: application/x-javascript; charset=UTF-8; name=wikibits.js
Content-Location: http://bits.wikimedia.org/skins-1.5/common/wikibits.js?urid=257z49_1264870003
Content-Transfer-Encoding: Base64
Ly8gTWVkaWFXaWtpIEphdmFTY3JpcHQgc3VwcG9ydCBmdW5jdGlvbnMKCnZhciBj
bGllbnRQQyA9IG5hdmlnYXRvci51c2VyQWdlbnQudG9Mb3dlckNhc2UoKTsgLy8g
R2V0IGNsaWVudCBpbmZvCnZhciBpc19nZWNrbyA9IC9nZWNrby8udGVzdCggY2xp
ZW50UEMgKSAmJgoJIS9raHRtbHxzcG9vZmVyfG5ldHNjYXBlXC83XC4wLy50ZXN0
KGNsaWVudFBDKTsKdmFyIHdlYmtpdF9tYXRjaCA9IGNsaWVudFBDLm1hdGNoKC9h
cHBsZXdlYmtpdFwvKFxkKykvKTsKaWYgKHdlYmtpdF9tYXRjaCkgewoJdmFyIGlz
X3NhZmFyaSA9IGNsaWVudFBDLmluZGV4T2YoJ2FwcGxld2Via2l0JykgIT0gLTEg
JiYKCQljbGllbnRQQy5pbmRleE9mKCdzcG9vZmVyJykgPT0gLTE7Cgl2YXIgaXNf
c2FmYXJpX3dpbiA9IGlzX3NhZmFyaSAmJiBjbGllbnRQQy5pbmRleE9mKCd3aW5k
b3dz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ZXRhY2hFdmVudCggJ29uJyArIHJl
bW92ZSwgaGFuZGxlciApOwoJfQp9Ci8vbm90ZTogYWxsIHNraW5zIHNob3VsZCBj
YWxsIHJ1bk9ubG9hZEhvb2soKSBhdCB0aGUgZW5kIG9mIGh0bWwgb3V0cHV0LAov
LyAgICAgIHNvIHRoZSBiZWxvdyBzaG91bGQgYmUgcmVkdW5kYW50LiBJdCdzIHRo
ZXJlIGp1c3QgaW4gY2FzZS4KaG9va0V2ZW50KCJsb2FkIiwgcnVuT25sb2FkSG9v
ayk7CgovLyBGb3IgZnV0dXJlIHVzZS4KbXcgPSB7fTsKCgo=
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline; filename=ajax.js
Content-Type: application/x-javascript; charset=UTF-8; name=ajax.js
Content-Location: http://bits.wikimedia.org/skins-1.5/common/ajax.js?urid=257z49
Content-Transfer-Encoding: Base64
Ly8gcmVtb3RlIHNjcmlwdGluZyBsaWJyYXJ5Ci8vIChjKSBjb3B5cmlnaHQgMjAw
NSBtb2Rlcm5tZXRob2QsIGluYwp2YXIgc2FqYXhfZGVidWdfbW9kZSA9IGZhbHNl
Owp2YXIgc2FqYXhfcmVxdWVzdF90eXBlID0gIkdFVCI7CgovKioKKiBpZiBzYWph
eF9kZWJ1Z19tb2RlIGlzIHRydWUsIHRoaXMgZnVuY3Rpb24gb3V0cHV0cyBnaXZl
biB0aGUgbWVzc2FnZSBpbnRvIAoqIHRoZSBlbGVtZW50IHdpdGggaWQgPSBzYWph
eF9kZWJ1ZzsgaWYgbm8gc3VjaCBlbGVtZW50IGV4aXN0cyBpbiB0aGUgZG9jdW1l
bnQsIAoqIGl0IGlzIGluamVjdGVkLgoqLwpmdW5jdGlvbiBzYWpheF9kZWJ1Zyh0
ZXh0KSB7CglpZiAoIXNhamF4X2RlYnVnX21vZGUpIHJldHVybiBmYWxzZTsKCgl2
YXIgZT0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3NhamF4X2RlYnVnJyk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hIGZ1bmN0aW9uIG9yIG9iamVjdDogIiAr
IHRhcmdldCk7CgkJfQoKCQlyZXR1cm47Cgl9CgoJc2FqYXhfZGVidWcoZnVuY19u
YW1lICsgIiB1cmkgPSAiICsgdXJpICsgIiAvIHBvc3QgPSAiICsgcG9zdF9kYXRh
KTsKCXguc2VuZChwb3N0X2RhdGEpOwoJc2FqYXhfZGVidWcoZnVuY19uYW1lICsg
IiB3YWl0aW5nLi4iKTsKCWRlbGV0ZSB4OwoKCXJldHVybiB0cnVlOwp9CgovKioK
ICogQHJldHVybiBib29sZWFuIHdoZXRoZXIgdGhlIGJyb3dzZXIgc3VwcG9ydHMg
WE1MSHR0cFJlcXVlc3QKICovCmZ1bmN0aW9uIHdmU3VwcG9ydHNBamF4KCkgewoJ
dmFyIHJlcXVlc3QgPSBzYWpheF9pbml0X29iamVjdCgpOwoJdmFyIHN1cHBvcnRz
QWpheCA9IHJlcXVlc3QgPyB0cnVlIDogZmFsc2U7CglkZWxldGUgcmVxdWVzdDsK
CXJldHVybiBzdXBwb3J0c0FqYXg7Cn0KCg==
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline; filename=mwsuggest.js
Content-Type: application/x-javascript; charset=UTF-8; name=mwsuggest.js
Content-Location: http://bits.wikimedia.org/skins-1.5/common/mwsuggest.js?urid=257z49
Content-Transfer-Encoding: Base64
LyoKICogT3BlblNlYXJjaCBhamF4IHN1Z2dlc3Rpb24gZW5naW5lIGZvciBNZWRp
YVdpa2kKICoKICogdXNlcyBjb3JlIE1lZGlhV2lraSBvcGVuIHNlYXJjaCBzdXBw
b3J0IHRvIGZldGNoIHN1Z2dlc3Rpb25zCiAqIGFuZCBzaG93IHRoZW0gYmVsb3cg
c2VhcmNoIGJveGVzIGFuZCBvdGhlciBpbnB1dHMKICoKICogYnkgUm9iZXJ0IFN0
b2puaWMgKEFwcmlsIDIwMDgpCiAqLwoKLy8gc2VhcmNoX2JveF9pZCAtPiBSZXN1
bHRzIG9iamVjdAp2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XRvbG9hZF9mb3Jtc1tpXTsKCQllbGVtZW50ID0gZG9jdW1l
bnQuZ2V0RWxlbWVudEJ5SWQoIGlkICk7CgkJaWYoZWxlbWVudCAhPSBudWxsKQoJ
CQlvc19pbml0SGFuZGxlcnMoaWQsZm9ybSxlbGVtZW50KTsKCX0KfQoKaG9va0V2
ZW50KCJsb2FkIiwgb3NfTVdTdWdnZXN0SW5pdCk7Cg==
------------oRmhKhBOMc0OmEYXVxbplm
Content-Disposition: inline; filename=centralnotice.js
Content-Type: text/javascript; charset=utf-8; name=centralnotice.js
Content-Location: http://upload.wikimedia.org/centralnotice/wikipedia/en/centralnotice.js?257z49
Content-Transfer-Encoding: Quoted-Printable
function toggleNotice() {
var notice =3D document.getElementById('centralNotice');
if (!wgNoticeToggleState) {
notice.className =3D notice.className.replace('collapsed', 'expanded')=
;
toggleNoticeCookie('0');
} else {
notice.className =3D notice.className.replace('expanded', 'collapsed')=
;
toggleNoticeCookie('1');
}
wgNoticeToggleState =3D !wgNoticeToggleState;
}
function toggleNoticeStyle(elems, display) {
if(elems)
for(var i=3D0;i' + wgNotice+'