Posted By

Pyro979 on 08/31/10


Tagged

greasemonkey


Versions (?)

Suggestion for Helvetireader²


 / Published in: JavaScript
 

  1. // ==UserScript==
  2. // @name Helvetireader 2
  3. // @description Helvetireader style for Google Reader that also removes a lot of features so you probably won't like it!
  4. // @include https://*.google.com/reader/view/*
  5. // @include http://*.google.com/reader/view/*
  6. // @include htt*://*.google.*/reader/view*
  7. // @author Helvetireader by Jon Hicks (http://www.hicksdesign.co.uk) with favicon override by MkFly
  8. // ==/UserScript==
  9.  
  10.  
  11. var favvy = document.createElement('link');
  12. favvy.setAttribute('type', 'image/x-icon');
  13. favvy.setAttribute('rel', 'shortcut icon');
  14. favvy.setAttribute('href', 'http://www.helvetireader.com/favicon.png');
  15. var head = document.getElementsByTagName('head')[0];
  16. head.appendChild(favvy);
  17.  
  18. var cssNode = document.createElement('link');
  19. cssNode.type = 'text/css';
  20. cssNode.rel = 'stylesheet';
  21. cssNode.href = 'http://www.helvetireader.com/css/helvetireader.2.css';
  22. cssNode.media = 'screen';
  23. cssNode.title = 'dynamicLoadedSheet';
  24. document.getElementsByTagName("head")[0].appendChild(cssNode);
  25.  
  26. window.refreshVar = setTimeout(simulateRefresh,500);
  27.  
  28. function simulateRefresh()
  29. {
  30. var e = document.createEvent('KeyboardEvent');
  31. e.initKeyEvent('keypress', true, true, window, false, false, false, false, 82, 82);
  32. document.body.dispatchEvent(e);
  33. console.debug(window.refreshVar);
  34. }

Report this snippet  

You need to login to post a comment.