Created
June 19, 2010 12:05
-
-
Save lpalli/444841 to your computer and use it in GitHub Desktop.
MediaWiki - H4 100% for Greasemonkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MediaWiki - H4 100% | |
// version 0.1 BETA! | |
// 2010-03-17 | |
// Copyright (c) 2010, Luca Palli | |
// Released under the GPL license | |
// http://www.gnu.org/copyleft/gpl.html | |
// | |
// -------------------------------------------------------------------- | |
// | |
// This is a Greasemonkey user script. To install it, you need | |
// Greasemonkey 0.3 or later: 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 "MediaWiki - H4 100%", and click Uninstall. | |
// | |
// -------------------------------------------------------------------- | |
// | |
// ==UserScript== | |
// @name MediaWiki - H4 100% | |
// @namespace http://monte-ceneri.org/ | |
// @description Change the H4 font size to 100% and increase the line-height to preserve the page layout. | |
// @include http://wiki.inser.ch/wiki/* | |
// ==/UserScript== | |
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
addGlobalStyle('h4 { font-size: 100% ! important; line-height: 1.66em ! important; }'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment