node-geogebra
Version:
Generate graphics with geogebra from nodejs
111 lines (101 loc) • 8.61 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name=viewport content="width=device-width,initial-scale=1">
<script src="./web3d/js/properties_keys_es-ES.js"></script>
<title>Simple2 - GeoGebra</title>
</head>
<body>
<!--
<article class="notranslate" data-param-enableshiftdragzoom="true"
data-param-enablelabeldrags="false"
data-param-filename="https://www.geogebra.org/resource/vnfambjf/vFwDpytjtPEFGPIQ/material-vnfambjf.ggb"
data-param-preventfocus="true" data-param-prerelease="false"
data-param-canary="false" data-param-showfullscreenbutton="true"
data-param-usebrowserforjs="false" data-param-autoscale="true"
data-param-scalecontainerclass="ggb-element-center-crop"
data-param-noscalemargin="true" data-param-id="ggbApplet6010891"
data-param-showreseticon="true"
data-param-appname="classic"
data-param-width="1071"
data-param-height="879"
data-reactid="229"
tabindex="10"
id="ggbApplet6010891"
data-scalex="1"
data-scaley="1"
aria-label="GeoGebra Clásico"
style="border-width: 0px; border-style: solid; outline-style: none;"><div class="GeoGebraFrame applet-unfocused jsloaded" lang="es" style="width: 1069px; height: 877px; border-width: 1px; border-style: solid;"><div class="gwt-SplitLayoutPanel" style="position: relative; width: 1069px; height: 877px;"><div aria-hidden="true" style="position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex; visibility: hidden;"> </div><div style="position: absolute; overflow: hidden; left: 0px; top: 0px; right: 0px; bottom: 0px;"><div class="ggbdockpanelhack" style="right: 0px; bottom: 0px; position: absolute; left: 0px; top: 0px;"><div aria-hidden="true" style="position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex; visibility: hidden;"> </div><div style="position: absolute; overflow: hidden; left: 0px; top: 0px; right: 0px; height: 0px;"><div class="TitleBarPanel cursor_drag TitleBarPanel-focus" style="right: 0px; bottom: 0px; position: absolute; left: 0px; top: 0px;"><div tabindex="0" class="button button-up" role="button" aria-pressed="false"><input type="text" tabindex="-1" aria-hidden="true" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAcCAYAAABlL09dAAABx0lEQVR42rVWMa6DMAzlCByBI/wj9ChMnbN2Q2Kt1CMwd+rAWomNlblTpM6VMnX2z0M23/UP0F/xLVmlIXnJs/0csmwjI6Iy29oiaBOdtgYtie3dBUV0F72LHujHAo85drrf7/IuXwLMo59kJhZdr1dq23Z0PCsgut1udDwe5e9uDvQruseMvu/pcDjQfr9POt5hI+fcMjCDhufzSXVdTwB4Pp/P04nxrN+Ls5Up+l6D4hc0lXlhg1DMAFcWeIypgDZNoxNV8sYTI9C3wBh/AebsjzGVk7INkmWeE2SehEX74/HA64sGHktGEsX0gwLNeZMlkxI8aeBOYqZOW5r47xZrdKbEAqgAGL+rhZ7G6NgnZhgkA+w/kPUA1lgvlZSJejDIiho+APaWdaYSMAilP4LmCdYh+wDkJZHS3UQDzLqzIrGdLGWDKcWAUEr/YHMvzRpFnip+dDRVr4Wub90GIB62QgNXmGSlCvmyXAPLOmf6o7whf6OBk41fhVELrHrv1ISkknTD4s39Lw1IEizwWttEL9aMUhlHtseJoA+QtUavYuqToBZY9+G1q4mrafWu04vcG5dp8a4A0lfMBt8IsOY/vmg2O+k3ed6K4NMCp/kAAAAASUVORK5CYII=" class="gwt-Image" draggable="false" role="button" style="width: 24px;"></div></div></div><div style="position: absolute; overflow: hidden; left: 0px; right: 0px; bottom: 0px; height: 0px;"><div class="zoomPanel zoomPanelPosition" style="right: 0px; bottom: 0px; position: absolute; left: 0px; top: 0px;"><div tabindex="4005" class="zoomPanelBtn zoomPanelBtn-up" role="button" aria-label="Pantalla completa" aria-pressed="false"><input type="text" tabindex="-1" aria-hidden="true" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;"><img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTcgMTRINXY1aDV2LTJIN3YtM3ptLTItNGgyVjdoM1Y1SDV2NXptMTIgN2gtM3YyaDV2LTVoLTJ2M3pNMTQgNXYyaDN2M2gyVjVoLTV6Ii8+PC9zdmc+" class="gwt-Image" draggable="false" role="button" alt="Pantalla completa" style="width: 24px;"></div></div></div><div style="position: absolute; overflow: hidden; left: 0px; right: 0px; bottom: 0px; height: 0px;"><div style="right: 0px; bottom: 0px; position: absolute; left: 0px; top: 0px;"></div></div><div style="position: absolute; overflow: hidden; left: 0px; top: 0px; right: 0px; bottom: 0px;"><div style="right: 0px; bottom: 0px; position: absolute; left: 0px; top: 0px;"><div class="EuclidianPanel" style="position: relative; overflow: visible; width: 1069px; height: 877px;"><canvas dir="ltr" tabindex="10000" width="1069" height="877" class="cursor_hit" style="position: relative; z-index: 0; width: 1069px; height: 877px;"></canvas></div></div></div></div></div></div><div aria-hidden="true" class="DockGlassPane" style="position: relative; overflow: hidden; display: none; z-index: 5000;"><div aria-hidden="true" style="border-width: 4px; border-style: solid; border-color: gray; display: none;"></div></div></div><span class="geogebraweb-dummy-invisible" tabindex="10000"></span></article>
-->
<article id="ggw" class="geogebraweb" data-param-useBrowserForJS="false" data-param-appname="classic"
data-param-showAppsPicker="false" data-param-enablelabeldrags="false"
data-param-perspective="2" data-param-app="false" data-param-showAppsPicker="false"
data-scalex="1" data-scaley="1"></article>
<script>
function insertScript() {
var app = document.createElement("script");
app.setAttribute("src", "./web3d/js/webfont.js");
document.head.appendChild(app);
app = document.createElement("script");
app.setAttribute("src", "./web3d/web3d.nocache.js");
window.setTimeout(function () {
document.head.appendChild(app);
}, 0);
}
function perspective(id, name) {
var ggw = document.getElementById("ggw");
if (ggw) {
ggw.className = "geogebraweb";
ggw.setAttribute("data-param-appname", "classic");
ggw.setAttribute("data-param-marginTop", 0);
if (id) {
if ((id + "").substring(0, 4) == "exam") {
ggw.setAttribute("data-param-enableGraphing", "true");
}
if (id == "exam-simple") {
ggw.setAttribute("data-param-enableGraphing", "false");
ggw.setAttribute("data-param-enableCAS", "false");
ggw.setAttribute("data-param-enable3D", "false");
}
if (id == "exam-graphing") {
ggw.setAttribute("data-param-enableCAS", "false");
ggw.setAttribute("data-param-enable3D", "false");
}
if (id == "exam-cas") {
ggw.setAttribute("data-param-enableCAS", "true");
ggw.setAttribute("data-param-enable3D", "false");
}
ggw.setAttribute("data-param-perspective", id);
}
if (location.pathname.match(/lti/)) {
ggw.setAttribute("data-param-showAppsPicker", "false");
//e("appsPicker") && e("appsPicker").style.setProperty("display", "none");
//c("GeoGebraHeader") && c("GeoGebraHeader").remove();
ggw.setAttribute("data-param-marginTop", 0);
}
if (window.ggbRerun) {
ggbRerun();
}
} else {
if (id) {
ggbApplet.setPerspective(id + "");
}
}
if (name && window.history && window.history.pushState && name != "picker" && location.host.indexOf("geogebra") >= 0 &&
location.href.indexOf("?") < 0 && !location.pathname.match(/\/.*\/.+/) && !isLocalhost()) {
var unbundled = name == "graphing" || name == "geometry" || name == "whiteboard" || name == "notes" || name == "3d";
if (name != "classic" && (location.pathname.indexOf("classic") > 0 || !unbundled)) {
name = "classic#" + name;
}
history.pushState({}, "GeoGebra", "/" + name);
}
return false;
}
window.onload = function () {
insertScript();
perspective(false, "picker");
};
</script>
</body>
</html>