Salve ho compilato questo codice per il mio sito versione amp,ma funziona solo nella pagina principale,come devo fare per farlo funzionare su tutto il tema amp
<head >
<meta charset="UTF-8">
<title>Document</title>
</head>
<body style="background-color: rgb(255, 255, 255)">
<button onclick="dark()"><img src="https://www.chefconsulenza.com/wp-content/uploads/ampdarkmode.png" height="20" width="20"/></button>



<script>
function dark() {
if (document.body.style.backgroundColor == 'rgb(255, 255, 255)') {

document.body.style.backgroundColor = '#333';
}
else {
document.body.style.backgroundColor = 'rgb(255, 255, 255)';
}
}
</script>

</body>
</html>