Skip to content

Instantly share code, notes, and snippets.

@PlaceReporter99
Last active September 2, 2023 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PlaceReporter99/dc95781c7373b0dc86a07b22eb304d19 to your computer and use it in GitHub Desktop.
Save PlaceReporter99/dc95781c7373b0dc86a07b22eb304d19 to your computer and use it in GitHub Desktop.
Userscript and bookmarklet to obtain your Stack Exchange chat fkey
javascript:(function(){'use strict';const button=document.createElement("button");button.appendChild(document.createTextNode("get fkey"));button.setAttribute("class","button");button.setAttribute("onclick","alert(document.getElementById('fkey').getAttribute('value'));");document.getElementById("chat-buttons").appendChild(button)})();
// ==UserScript==
// @name Get fkey
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Get your Stack Exchange chat fkey
// @author PlaceReporter99
// @match https://chat.stackexchange.com/**
// @match https://chat.stackoverflow.com/**
// @match https://chat.meta.stackexchange.com/**
// @icon https://www.google.com/s2/favicons?sz=64&domain=stackexchange.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
const button = document.createElement("button");
button.appendChild(document.createTextNode("get fkey"));
button.setAttribute("class", "button");
button.setAttribute("onclick", "alert(document.getElementById('fkey').getAttribute('value'));");
document.getElementById("chat-buttons").appendChild(button);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment