Skip to content

Instantly share code, notes, and snippets.

@cyu
Created Feb 5, 2011
Embed
What would you like to do?
A script that created a newspaper like UI for Google Reader (old)
var FP_HOST = "http://codeeg.com/readerfp";
var d = '<html>';
d += '<head>';
d += '<link href="' + FP_HOST + '/fp.css" type="text/css" rel="stylesheet"/>';
d += '</head>';
d += '<body>';
d += '<a name="top"/>';
d += '<div id="header"><h1>Google Reader FP</h1>';
d += '<a href="javascript:FP.reload()">Refresh</a>';
d += '</div>';
d += '<div id="scanner" style="display:none; position:absolute">';
d += '</div>';
d += '<table id="columns"><tr>';
d += '<td width="60%" valign="top" id="col1_cell"><div id="col1" onmouseover="FP.hideEntryScanner();"></div></td>';
d += '<td width="20%" valign="top" id="col2_cell"><div id="col2"></div></td>';
d += '<td width="20%" valign="top" id="col3_cell"><div id="col3"></div></td>';
d += '</tr></table>';
d += '<div id="footer">';
d += '<a id="reading_list_atom">Reading List (atom)</a>';
d += '</div>';
d += '</body>';
d += '</html>';
function init() {
var i, a, main;
document.body.innerHTML = "";
document.body.innerHTML = d;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1) {
a.disabled = true;
}
}
var ns = document.createElement("link");
ns.rel = "stylesheet";
ns.type = "text/css";
ns.href = FP_HOST + "/fp.css";
document.body.appendChild(ns);
script("prototype");
script("effects");
script("controls");
script("dragdrop");
script("fp");
document.title = " Google Reader FP, by Calvin Yu";
}
function script(name) {
var js = document.createElement("script");
js.type = "text/javascript";
js.src = FP_HOST + "/" + name + ".js";
js.appendChild(document.createTextNode(' '));
document.body.appendChild(js);
}
init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment