I'm working on modifying a UserStyle for Instapaper. Since the original UserStyle was written, Instapaper added to their header a number of JavaScript functions that control the width of the page and the typefaces used.
Here they are:
function loadDefaults()
{
_fontSize = 16;
_fontFamily = "G";
_lineHeight = 1.5;
_width = 500;
}
function loadFont()
{
var cookieData = readCookie("fontMetrics");
if (cookieData && (cookieData = cookieData.split("_")) && cookieData.length == 4) {
_fontSize = parseInt(cookieData[0]);
_fontFamily = cookieData[1];
_lineHeight = parseFloat(cookieData[2]);
_width = parseInt(cookieData[3]);
} else loadDefaults();
applyFont();
}
How would I go about modifying the UserScript to override these functions, since they execute after load?
So far, I've tried simply replacing these functions with blank overrides, but it didn't work. Since my script executes first, is there some way I can just remove the entire JavaScript block in the header?