Created
December 2, 2023 09:55
-
-
Save jsilva74/84c5dbe41cfddbe7a1e3882e4cb79477 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Link in ICAO | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0.0 | |
// @description try to take over the world! | |
// @author You | |
// @match https://server.fseconomy.net/aircraftlog.jsp* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=fseconomy.net | |
// @grant none | |
// ==/UserScript== | |
/* global $ */ | |
(function() { | |
'use strict'; | |
$('document').ready(function() { | |
const table = $('table:eq(0)') | |
const home = $('table:eq(0) tbody tr td:eq(3)').text() | |
const location = $('table:eq(0) tbody tr td:eq(4)').text() | |
$('table:eq(0) tbody tr td:eq(3)').html(`<a href="https://server.fseconomy.net/airport.jsp?icao=${home}" target='_blank'>${home}</a>`) | |
$('table:eq(0) tbody tr td:eq(4)').html(`<a href="https://server.fseconomy.net/airport.jsp?icao=${location}" target='_blank'>${location}</a>`) | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment