mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
chrome plugin: remove unused permission, minor reformatting
This commit is contained in:
parent
22864c88f2
commit
f33a7578d4
|
@ -10,7 +10,7 @@ class DebuggerAgent {
|
||||||
this.port = 0;
|
this.port = 0;
|
||||||
this.disconnectCallbacks = null;
|
this.disconnectCallbacks = null;
|
||||||
|
|
||||||
this.debuggee = { tabId : tab.id };
|
this.debuggee = { tabId: tab.id };
|
||||||
this.port = port;
|
this.port = port;
|
||||||
this.tab = tab;
|
this.tab = tab;
|
||||||
debuggerAgentMap[tab.id] = this;
|
debuggerAgentMap[tab.id] = this;
|
||||||
|
@ -87,9 +87,9 @@ class DebuggerAgent {
|
||||||
chrome.debugger.sendCommand(this.debuggee, message.method, message.params, response => {
|
chrome.debugger.sendCommand(this.debuggee, message.method, message.params, response => {
|
||||||
if (message.id) {
|
if (message.id) {
|
||||||
const responseToServer = {
|
const responseToServer = {
|
||||||
id : message.id,
|
id: message.id,
|
||||||
result : response,
|
result: response,
|
||||||
error : response ? void 0 : chrome.runtime.lastError
|
error: response ? void 0 : chrome.runtime.lastError
|
||||||
};
|
};
|
||||||
this.sendMessage(responseToServer);
|
this.sendMessage(responseToServer);
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ chrome.debugger.onEvent.addListener((source, method, params) => {
|
||||||
if (!agent) {
|
if (!agent) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const message = { method : method, params : params };
|
const message = { method: method, params: params };
|
||||||
if (agent.pendingMessages) {
|
if (agent.pendingMessages) {
|
||||||
agent.pendingMessages.push(message);
|
agent.pendingMessages.push(message);
|
||||||
} else if (agent.connection) {
|
} else if (agent.connection) {
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
"name": "TeaVM debugger agent",
|
"name": "TeaVM debugger agent",
|
||||||
"description": "TeaVM debugger agent, that sends RDP commands over WebSocket",
|
"description": "TeaVM debugger agent, that sends RDP commands over WebSocket",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
|
|
||||||
"permissions" : ["debugger", "activeTab", "tabs", "storage", "scripting"],
|
"permissions": ["debugger", "activeTab", "storage", "scripting"],
|
||||||
|
|
||||||
"action" : {
|
"action" : {
|
||||||
"default_icon": "teavm-16.png",
|
"default_icon": "teavm-16.png",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user