8d85552d04f1f6a7cbab27f3a1e4e7af7fa58794 — Hristos N. Triantafillou 1 year, 11 months ago 06d658b
Try to load my init.el

I used to handle this in the Django backend, but this actually makes
more sense now that I implement it.
2 files changed, 49 insertions(+), 0 deletions(-)

M site/init.el.html
A site/js/init.el.js
M site/init.el.html => site/init.el.html +6 -0
@@ 3,3 3,9 @@
<p><a href="https://git.sr.ht/~hristoast/dot-emacs">My Emacs configuration</a> is the result of many years of trying new things, and wanting a good amount of features but also <span class="bold">not</span> wanting a full-on IDE.  It has toggle-able support for several laguages, and is self-installing (for the most part).</p>

<p>Check it out on <a href="https://git.sr.ht/~hristoast/dot-emacs">sourcehut</a>!</p>

<noscript class="bold center">If you allow javascript, my init.el will load here!</noscript>

<pre><code>Loading my init.el ...</code></pre>

<script src="/js/init.el.js" type="text/javascript"></script>

A site/js/init.el.js => site/js/init.el.js +43 -0
@@ 0,0 1,43 @@
  hristoast - init.el.js
  Copyright (C) 2019  Hristos N. Triantafillou

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

const initUrl = "https://raw.githubusercontent.com/hristoast/dot-emacs/master/init.el";
var code = document.getElementsByTagName("code")[0];

function loadTheReadme() {
    var request = new XMLHttpRequest();
    request.open('GET', initUrl, true);

    request.onload = function() {
        if (this.status >= 200 && this.status < 400) {
            var resp = this.response;
            code.textContent = resp;
        } else {
            code.textContent = "My init.el could not be loaded, sorry!";

    request.onerror = function() {
        code.textContent = "My init.el could not be loaded, sorry!";


window.onload = loadTheReadme();