Last active
February 4, 2020 10:12
-
-
Save danhollick/5112efd521b22c05fde446f599bb278c to your computer and use it in GitHub Desktop.
Use text changing function
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
window.onmessage = async event => { | |
const message = event.data.pluginMessage | |
if (message.type === 'selectionChange') { | |
// this ๐ | |
const contrast = document.getElementById('contrast') | |
contrast.textContent = message.contrast | |
// becomes this ๐ | |
changeText('contrast', message.contrast) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment