M
Matej Cepl
I know about element.style.fontSize, but it seems to work here (with Mozilla
Firefox 1.0.6) just only when the fontSize was set via CSS. Can I get
somewhere current size of the font in the actual element. Explanation:
PeopleSoft uses very small font (9pt), which on Mozilla looks pretty small.
Unfortunately, it is set somewhere in their Javascript, so apparently it
fools even "Minimal font size" in Mozilla's settings. Therefore, I would
love to make small greasemonkey script to go through all elements on the
page and increase size of the fonts when it is lower than some threshold
(11pt?). Currently, the only thing I could do (and it works surprisingly
well, considering brutality of my script) is this:
---------------------------------------------------------------
// FixPSFonts
// version 0.1
// 2005-10-21
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script that removes all CSS styles
// from selected sites.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Unstyle", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name FixPSFonts
// @namespace http://www.ceplovi.cz/matej/progs/scripts
// @description remove all font-size in CSS styles
// @include *
// ==/UserScript==
(function() {
var stylesheets, i, all, element;
all = document.getElementsByTagName('*');
for (i = 0; i < all.length; i++) {
all.style.fontSize = "11pt";
}
})();
//
// ChangeLog
// 2005-10-21 - 0.1 - MC - first attempt (quite brutal one! )
//
---------------------------------------------------------------
Is there a way how to bit more gentle and change only some font sizes?
Thanks for any tip,
Matìj
--
Matej Cepl, http://www.ceplovi.cz/matej/blog/
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
Whenever Christ our life is revealed, then also you will be
revealed with Him in glory.
-- Colossians 3:4 (Green's Literal Translation)
Firefox 1.0.6) just only when the fontSize was set via CSS. Can I get
somewhere current size of the font in the actual element. Explanation:
PeopleSoft uses very small font (9pt), which on Mozilla looks pretty small.
Unfortunately, it is set somewhere in their Javascript, so apparently it
fools even "Minimal font size" in Mozilla's settings. Therefore, I would
love to make small greasemonkey script to go through all elements on the
page and increase size of the fonts when it is lower than some threshold
(11pt?). Currently, the only thing I could do (and it works surprisingly
well, considering brutality of my script) is this:
---------------------------------------------------------------
// FixPSFonts
// version 0.1
// 2005-10-21
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script that removes all CSS styles
// from selected sites.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Unstyle", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name FixPSFonts
// @namespace http://www.ceplovi.cz/matej/progs/scripts
// @description remove all font-size in CSS styles
// @include *
// ==/UserScript==
(function() {
var stylesheets, i, all, element;
all = document.getElementsByTagName('*');
for (i = 0; i < all.length; i++) {
all.style.fontSize = "11pt";
}
})();
//
// ChangeLog
// 2005-10-21 - 0.1 - MC - first attempt (quite brutal one! )
//
---------------------------------------------------------------
Is there a way how to bit more gentle and change only some font sizes?
Thanks for any tip,
Matìj
--
Matej Cepl, http://www.ceplovi.cz/matej/blog/
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
Whenever Christ our life is revealed, then also you will be
revealed with Him in glory.
-- Colossians 3:4 (Green's Literal Translation)