Skip to content

Instantly share code, notes, and snippets.

@dividedmind
Created July 2, 2011 19:36
Show Gist options
  • Save dividedmind/1061566 to your computer and use it in GitHub Desktop.
Save dividedmind/1061566 to your computer and use it in GitHub Desktop.
user script to link chosen stream to google+ logo
// Google+ default stream
// version 0.1
// 2011-07-02
// Public domain
//
// ==UserScript==
// @name Google+ default stream
// @description sets default stream on Google+
// @match https://*.google.com/*
// ==/UserScript==
// set this to your own chosen stream
var TARGET_STREAM = "https://plus.google.com/stream/circles/p4e439570e5a3376";
if (window.location.host === "plus.google.com") {
var logo = document.getElementsByClassName("a-U-Pg-T")[0].getElementsByClassName("a-b-h-Jb")[0];
if (logo)
logo.href = TARGET_STREAM;
}
// also update Google+ links from other google services
var contentDocument = document;
var contentFrame;
if (contentFrame = contentDocument.getElementById("canvas_frame"))
contentDocument = contentFrame.contentDocument;
var links = contentDocument.getElementsByClassName("gbzt");
if (links && links[0].host === "plus.google.com")
links[0].href = TARGET_STREAM;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment