Last active
March 6, 2024 19:21
-
-
Save Lukas238/ffdbd06a5fd156c6a0027e9e703b0198 to your computer and use it in GitHub Desktop.
Show links status for United view in web browser email previews
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 Show links status | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.0 | |
// @description try to take over the world! | |
// @author Lucas Dasso | |
// @updateURL https://gist.github.com/Lukas238/ffdbd06a5fd156c6a0027e9e703b0198/raw/show_links_status.user.js | |
// @downloadURL https://gist.github.com/Lukas238/ffdbd06a5fd156c6a0027e9e703b0198/raw/show_links_status.user.js | |
// @match https://view.enews.united.com/?qs=* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=united.com | |
// @grant none | |
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var $ = jQuery; | |
$('a').each(function(item){ | |
var trackingColors = { | |
enabled: 'green', | |
disabled: 'red' | |
}; | |
var selectedColor = trackingColors.enabled; // Default | |
var isENews = /enews\.united\.com/.test($(this).attr('href')); | |
if(!isENews){ | |
selectedColor = trackingColors.disabled; | |
} | |
$(this).css({ | |
'border': '3px solid ' + selectedColor, | |
'display': 'inline-block' | |
}); | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment