Last active
March 16, 2022 20:32
-
-
Save craigshoemaker/5690be0f18b240ce03faea9e43e9d7ab to your computer and use it in GitHub Desktop.
CA TOC
This file contains 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
(function() { | |
let css = []; | |
css.push('.new-doc {background:#fee1ff; padding: 2px }'); | |
css.push('.wishlist {border: solid 2px #509c6b;margin-top:2px;}'); | |
css.push('.updates {border: solid 2px #c019c4; margin-top: 2px;}'); | |
let style = document.getElementsByTagName('style')[1]; | |
style.type = 'text/css'; | |
style.appendChild(document.createTextNode(css.join('\n'))); | |
let labels = [ | |
'from your code to the cloud', | |
'replicas', | |
'custom domains', | |
'observability overview', | |
'health probes', | |
'metrics', | |
'log streaming', | |
'security and isolation features', | |
'customer-managed keys', | |
'managed identity', | |
'easyauth integration', | |
'architecture overview', | |
'deploy with a custom internal vnet', | |
'deploy with a custom external vnet', | |
'firewall integration', | |
'visual studio', | |
'visual studio code', | |
'terraform', | |
'github actions', | |
'work with different storage options', | |
'billing', | |
'dapr overview', | |
'2 - revisions and traffic splitting', | |
'1 - communicate between containers' | |
]; | |
let wishlist = [ | |
'dapr overview', | |
'2 - revisions and traffic splitting', | |
'1 - communicate between containers', | |
// existing | |
'set up https ingress', | |
'scale an app', | |
'arm api specification' | |
]; | |
let updates = [ | |
'quotas' | |
]; | |
let toc = document.querySelector('ul[aria-label="Table of contents"]'); | |
let anchors = toc.querySelectorAll('a, ul li a, span ul li a') | |
anchors.forEach((e) => { | |
let lbl = e.innerText.toLowerCase(); | |
if (labels.includes(lbl)) { | |
e.classList.add('new-doc'); | |
} | |
if (wishlist.includes(lbl)) { | |
e.classList.add('wishlist'); | |
} | |
if(updates.includes(lbl)) { | |
e.classList.add('updates'); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment