Skip to content

Instantly share code, notes, and snippets.

@iznax
Last active Feb 5, 2018
Embed
What would you like to do?
Testing file access
<!doctype html>
<html>
<head>
<style type="text/css">
.code
{
width: 100%;
height: 256px;
padding: 0 0 0 0;
border: 4;
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal;
<!-- color: #333; -->
font-size:12px;
}
</style>
</head>
<body>
<div>
<div>
<button id="top1" class="topTab" type="button" onclick='Load("5f300eb14dd19034582ff7a134b519a0ad5cea5d/Readme.md")'>File #1</button>
<button id="top2" class="topTab" type="button" onclick='Load("55e3070f302d3f7a68a1b17a037be0bf3ef8671c/Second.txt")'>File #2</button>
</div>
<textarea id="code" class="code">ABC</textarea>
</div>
<script>
'use strict';
function LoadX()
{
var widget = document.getElementById("code");
widget.innerHTML = "xyz";
}
function Load(name)
{
var request = new XMLHttpRequest();
//request.responseType = 'text';
request.onload = function()
{
var widget = document.getElementById("code");
widget.innerHTML = request.responseText;
};
request.open('GET', "https://gist.githubusercontent.com/iznax/0dc1565d42467591f1f85e96c1fb9e5b/raw/"+name);
request.send();
}
</script>
</body>
</html>
Main:
LDA #1
LDA #2
LDA #3
LDA #4
LDA #5
LDA #6
LDX #7
LDY #8
RTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment