Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@thethomaseffect
Created August 26, 2019 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thethomaseffect/e3feb098bee2dcc598d2d21f05dd39f9 to your computer and use it in GitHub Desktop.
Save thethomaseffect/e3feb098bee2dcc598d2d21f05dd39f9 to your computer and use it in GitHub Desktop.
Adds a button in the top right to open the currently open log in XIVAnalysis
// ==UserScript==
// @name Open XIVAnalysis from FFLogs
// @namespace http://fflogs.com/
// @version 0.1
// @description Adds a button in the top right to open the currently open log in XIVAnalysis
// @author thethomaseffect#8330 Frank Reynolds (Phoenix)
// @match https://www.fflogs.com/reports/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const path = 'https://xivanalysis.com/find/' + location.pathname.split('/').pop() + '/'
const fullpath = !!location.hash ? path + location.hash.split('=').pop() + '/' : path
document.querySelector('#main-menu').innerHTML += '<li class="right visible"><a href="' + fullpath + '" target="_blank"><img src="https://xivanalysis.com/logo.png" style="margin-top: 0px; width: 42px;"></img></a></li>'
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment