Return to Snippet

Revision: 31365
at September 3, 2010 12:08 by Pyro979


Initial Code
// ==UserScript==
// @name        Helvetireader 2
// @description Helvetireader style for Google Reader that also removes a lot of features so you probably won't like it!
// @include     https://*.google.com/reader/view/*
// @include     http://*.google.com/reader/view/*
// @include     htt*://*.google.*/reader/view*
// @author      Helvetireader by Jon Hicks (http://www.hicksdesign.co.uk) with favicon override by MkFly
// ==/UserScript==


var favvy = document.createElement('link');
favvy.setAttribute('type', 'image/x-icon');
favvy.setAttribute('rel', 'shortcut icon');
favvy.setAttribute('href', 'http://www.helvetireader.com/favicon.png');
var head = document.getElementsByTagName('head')[0];
head.appendChild(favvy);

var cssNode = document.createElement('link');
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = 'http://www.helvetireader.com/css/helvetireader.2.css';
cssNode.media = 'screen';
cssNode.title = 'dynamicLoadedSheet';
document.getElementsByTagName("head")[0].appendChild(cssNode);

//Bottom Looks Funny Fix 
setTimeout(runOnLoadSetup,3000);
function runOnLoadSetup() 
{
	var minimizeControl = document.getElementById("lhn-subscriptions-minimize");//get minimize control
	simulateClick(minimizeControl);//click minimize
	simulateClick(minimizeControl);//click maximize, and now it should repaint
}

function simulateClick(el) 
{
  var evt = document.createEvent("MouseEvents");
  evt.initMouseEvent("click", true, true, window,0, 0, 0, 0, 0, false, false, false, false, 0, null);
  
  el.dispatchEvent(evt);
}

Initial URL

                                

Initial Description

                                

Initial Title
Suggestion for Helvetireader² (with 100% less reloading)

Initial Tags

                                

Initial Language
JavaScript