Skip to content

Instantly share code, notes, and snippets.

@rinsuki
Created June 15, 2018 17:48
Show Gist options
  • Save rinsuki/d9a87a9e3c8d162e4467834b15b4c470 to your computer and use it in GitHub Desktop.
Save rinsuki/d9a87a9e3c8d162e4467834b15b4c470 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name AxiosInMastodonConsole
// @namespace https://rinsuki.net
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://mstdn.maud.io/web/*
// @match https://imastodon.net/web/*
// @match https://tuner.1242.com/web/*
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js
// ==/UserScript==
(function() {
'use strict';
// Your code here...
const state = JSON.parse(document.getElementById("initial-state").innerText)
window.requestor = axios.create({headers: {Authorization: "Bearer "+state.meta.access_token}})
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment