summaryrefslogtreecommitdiff
path: root/assets/js/mumi.js
blob: f98a902f127f5eb3ec4c7aef973dfc25def7cf7d (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0-or-later
(function () {
    var loadSnippet = function (targetId, URL) {
        var req = new XMLHttpRequest();
        req.onload = function (e) {
            var target = document.getElementById(targetId);
            target.outerHTML = req.responseText;
        };
        req.onerror = function (e) {
            var target = document.getElementById(targetId);
            target.outerHTML = "Never mind...";
        };
        req.open('GET', URL, true);
        req.send();
    };
    loadSnippet ('snippet-recent',    '/snippet/recent');
    loadSnippet ('snippet-priority',  '/snippet/priority');
})();
// @license-end