Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name GoogleReaderNotSuckAnymore
- // @namespace google
- // @author Lucas Wiman (based on smholloway's example script)
- // @description Simple userscript to hide the top banner bar in Google Reader
- // @include http://www.google.com/reader*
- // @exclude http://plus.google.com/*
- // @version 001
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
- // ==/UserScript==
- try{
- // a function that loads jQuery and calls a callback function when jQuery has finished loading
- function addJQuery(callback) {
- var script = document.createElement("script");
- script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
- script.addEventListener('load', function() {
- var script = document.createElement("script");
- script.textContent = "(" + callback.toString() + ")();";
- document.body.appendChild(script);
- }, false);
- document.body.appendChild(script);
- }
- // load jQuery and execute the main function
- addJQuery(main);
- // hide the black banner at the top of Google Reader
- function main() {
- jQuery(document).ready(function($) {
- $('#viewer-header').css({height: '28px'});
- $('#logo-container').hide();
- $('#top-bar').css({height: 'auto'});
- $('#search').css({padding: '0 0 0 0'})
- });
- console.log("simple.user.js: Loaded");
- }
- } catch(e) {
- console.log(e);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement