Untitled

mail@pastecode.io avatar
unknown
html
2 years ago
1.3 kB
2
Indexable
Never
<div id="hyvor-talk-view"></div>
<script type="text/javascript">
    var HYVOR_TALK_WEBSITE = 5725;

    var htLight = {
        accent: "#659DBD",
        accentText: "#FFFFFF",
        footerHeader: "#FAFAFA",
        footerHeaderText: "#484848",
        box: "#FFFFFF",
        boxText: "#111111",
        boxLightText: "#AAAAAA",
        backgroundText: "#111111"
    }
    var htDark = {
        accent: "#ffffff",
        accentText: "#000000",
        footerHeader: "#1b1818",
        footerHeaderText: "#cac7c7",
        box: "#232121",
        boxText: "#ffffff",
        boxLightText: "#aaaaaa",
        backgroundText: "#ffffff"
    };
    var palette = htLight;
    if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
        palette = htDark;
    }

    document.getElementsByClassName("m-toggle-darkmode").forEach(function(x) {
        x.addEventListener("click", function() {
            var theme = document.documentElement.dataset.theme;
            palette = theme === "light" ? htDark : htLight;

            hyvor_talk && hyvor_talk.setPalette(palette)
        });
    });

    var HYVOR_TALK_CONFIG = {
        url: false,
        id: {{comment_id}}, 
        palette: palette
    };
</script>
<script async type="text/javascript" src="//talk.hyvor.com/web-api/embed.js"></script>