2

Screenshot / Code Snippet

Userscript

// ==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);

})();

Bookmarklet

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)})();

About

This Tampermonkey userscript adds a button to your user interface, that appears even when you are suspended. When clicked, it shows your fkey in an alert dialog.

License

No license yet.

Download

The GitHub Gist for the userscript is here.

Platform

Tested with Tampermonkey on Chrome.

Contact

I created this script, and I am currently the only contributor. You can message me in Stack Exchange chat. Remember to ping me with @TheEmptyStringPhotographer.

Code

This runs on Tampermonkey, and the code is in this GitHub Gist. You can leave a suggestion by posting an answer here, or a comment on the Gist.

0

You must log in to answer this question.

Browse other questions tagged .