summaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/mumi.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/assets/js/mumi.js b/assets/js/mumi.js
new file mode 100644
index 0000000..317bdcf
--- /dev/null
+++ b/assets/js/mumi.js
@@ -0,0 +1,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.innerHTML = req.responseText;
+ };
+ req.onerror = function (e) {
+ var target = document.getElementById(targetId);
+ target.innerHTML = "Never mind...";
+ };
+ req.open('GET', URL, true);
+ req.send();
+ };
+ loadSnippet ('snippet-recent', '/snippet/recent');
+ loadSnippet ('snippet-priority', '/snippet/priority');
+})();
+// @license-end