Last active
June 8, 2016 08:13
-
-
Save m0sa/79d8c595a3088afa795d to your computer and use it in GitHub Desktop.
SO Hangouts Authuser Redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name SO Hangouts Authuser Redirect | |
// @namespace http://m0sa.net/ | |
// @version 1.1 | |
// @description authuser=1 | |
// @author m0sa | |
// @include https://plus.google.com/hangouts/_/stackoverflow.com/* | |
// @include https://hangouts.google.com/hangouts/_/stackoverflow.com/* | |
// @grant none | |
// ==/UserScript== | |
var authuser = 1; | |
var initial = window.location.href; | |
var clean = initial.split('#')[0].replace(/[\?&]authuser=\d+/, ''); | |
var updated = clean + (clean.indexOf('?') >=0 ? '&' : '?') + 'authuser=' + authuser + window.location.hash; | |
if (initial != updated) | |
{ | |
window.location.href = updated; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment