Quellcode durchsuchen

Добавить обучение

dev
Ursprung
Commit
bafec2efa3
8 geänderte Dateien mit 82 neuen und 0 gelöschten Zeilen
  1. +20
    -0
      обучение/01.HelloWorld.html
  2. BIN
      обучение/01.HelloWorld.png
  3. +3
    -0
      обучение/01.div.html
  4. +3
    -0
      обучение/01.module.js
  5. +30
    -0
      обучение/02.Loader.html
  6. BIN
      обучение/02.Loader.png
  7. +23
    -0
      обучение/02.loader.js
  8. +3
    -0
      обучение/02.no-borders.js

+ 20
- 0
обучение/01.HelloWorld.html Datei anzeigen

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<body>
<script>
var MM = [

[
"HelloWorld",
"dmFyIGRpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOwpkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKGRpdik7CmRpdi5pbm5lckhUTUwgPSAiPHA+SGVsbG8sIFdvcmxkITwvcD4iOw==",
],

];
var module = MM[0];
var code = atob(module[1]);
eval(code);
</script>
</body>
</html>

BIN
обучение/01.HelloWorld.png Datei anzeigen

Vorher Nachher
Breite: 490  |  Höhe: 506  |  Größe: 51KB

+ 3
- 0
обучение/01.div.html Datei anzeigen

@@ -0,0 +1,3 @@
<div>
<p>Hello, World!</p>
</div>

+ 3
- 0
обучение/01.module.js Datei anzeigen

@@ -0,0 +1,3 @@
var div = document.createElement("div");
document.body.appendChild(div);
div.innerHTML = "<p>Hello, World!</p>";

+ 30
- 0
обучение/02.Loader.html Datei anzeigen

@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<body>
<script>
var MM = [

[
"Loader",
"ZnVuY3Rpb24gTXVyb20oKQp7Cn0KTXVyb20ucHJvdG90eXBlLmxvYWRNb2R1bGVzID0gZnVuY3Rpb24oKQp7CiAgICAvLyBTa2lwIGAwYCBtb2R1bGUgYmVjYXVzZSBpdCdzIHVzLgogICAgZm9yICh2YXIgaSA9IDE7IGkgPCBNTS5sZW5ndGg7ICsraSkKICAgIHsKICAgICAgICB2YXIgbW9kdWxlID0gTU1baV07CiAgICAgICAgdmFyIG5hbWUgPSBtb2R1bGVbMF07CiAgICAgICAgdmFyIGNvZGUgPSBhdG9iKG1vZHVsZVsxXSk7CiAgICAgICAgdHJ5CiAgICAgICAgewogICAgICAgICAgICBldmFsKGNvZGUpOwogICAgICAgIH0KICAgICAgICBjYXRjaCAoZSkKICAgICAgICB7CiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoIkNvdWxkIG5vdCBsb2FkICciICsgbmFtZSArICInIG1vZHVsZTogJyIgKyBlICsgIiciKTsKICAgICAgICB9CiAgICB9Cn07CnZhciBNID0gbmV3IE11cm9tKCk7Ck0ubG9hZE1vZHVsZXMoKTsK",
],

[
"HelloWorld",
"dmFyIGRpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOwpkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKGRpdik7CmRpdi5pbm5lckhUTUwgPSAiPHA+SGVsbG8sIFdvcmxkITwvcD4iOw==",
],

[
"NoBorders",
"dmFyIGRpdiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpOwpkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKGRpdik7CmRpdi5pbm5lckhUTUwgPSAiPHA+TGV0IDxzdHJvbmc+TVVST008L3N0cm9uZz4gc2hvdyB5b3Ugbm8gYm9yZGVyczwvcD4iOwo=",
],

];
var module = MM[0];
var code = atob(module[1]);
eval(code);
</script>
</body>
</html>

BIN
обучение/02.Loader.png Datei anzeigen

Vorher Nachher
Breite: 460  |  Höhe: 611  |  Größe: 62KB

+ 23
- 0
обучение/02.loader.js Datei anzeigen

@@ -0,0 +1,23 @@
function Murom()
{
}
Murom.prototype.loadModules = function()
{
// Skip `0` module because it's us.
for (var i = 1; i < MM.length; ++i)
{
var module = MM[i];
var name = module[0];
var code = atob(module[1]);
try
{
eval(code);
}
catch (e)
{
console.error("Could not load '" + name + "' module: '" + e + "'");
}
}
};
var M = new Murom();
M.loadModules();

+ 3
- 0
обучение/02.no-borders.js Datei anzeigen

@@ -0,0 +1,3 @@
var div = document.createElement("div");
document.body.appendChild(div);
div.innerHTML = "<p>Let <strong>MUROM</strong> show you no borders</p>";

Laden…
Abbrechen
Speichern