aboutsummaryrefslogtreecommitdiffstats
path: root/res/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'res/client.js')
-rw-r--r--res/client.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/res/client.js b/res/client.js
index 7a4dc47..9abfe25 100644
--- a/res/client.js
+++ b/res/client.js
@@ -1483,6 +1483,9 @@ client_Main.prototype = {
break;
case "Disconnected":
break;
+ case "Dump":
+ client_Utils.saveFile("dump.json","application/json",data.dump.data);
+ break;
case "Flashback":
break;
case "GetTime":
@@ -1926,6 +1929,9 @@ client_Main.prototype = {
case "clear":
this.send({ type : "ClearChat"});
return true;
+ case "dump":
+ this.send({ type : "Dump"});
+ return true;
case "fb":case "flashback":
this.send({ type : "Flashback"});
return false;
@@ -2643,6 +2649,21 @@ client_Utils.browseFileUrl = function(onFileLoad,isBinary,revoke) {
window.document.body.appendChild(input);
input.click();
};
+client_Utils.saveFile = function(name,mime,data) {
+ var blob = new Blob([data],{ type : mime});
+ var url = URL.createObjectURL(blob);
+ var a = window.document.createElement("a");
+ a.download = name;
+ a.href = url;
+ a.onclick = function(e) {
+ e.cancelBubble = true;
+ e.stopPropagation();
+ };
+ window.document.body.appendChild(a);
+ a.click();
+ window.document.body.removeChild(a);
+ URL.revokeObjectURL(url);
+};
var client_players_Iframe = function(main,player) {
this.playerEl = window.document.querySelector("#ytapiplayer");
this.main = main;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage