1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 21:00:23 +01:00

Added grouping for keys in object setting.

This commit is contained in:
kkapsner 2018-06-21 00:07:29 +02:00
parent 4f18dc3ab6
commit e9fbb7259e
5 changed files with 36 additions and 0 deletions

View File

@ -17,6 +17,16 @@
"description": "" "description": ""
}, },
"input": {
"message": "Eingabe",
"description": ""
},
"readout": {
"message": "Auslese",
"description": ""
},
"options": { "options": {
"message": "CanvasBlocker Einstellungen", "message": "CanvasBlocker Einstellungen",
"description": "" "description": ""

View File

@ -17,6 +17,16 @@
"description": "" "description": ""
}, },
"input": {
"message": "input",
"description": ""
},
"readout": {
"message": "readout",
"description": ""
},
"options": { "options": {
"message": "CanvasBlocker options", "message": "CanvasBlocker options",
"description": "" "description": ""

View File

@ -63,11 +63,16 @@
name: "apiWhiteList", name: "apiWhiteList",
defaultValue: {}, defaultValue: {},
keys: [ keys: [
{name: "Canvas-API", level: 1},
"getContext", "getContext",
{message: "readout", level: 2},
"toDataURL", "toBlob", "mozGetAsFile", "getImageData", "toDataURL", "toBlob", "mozGetAsFile", "getImageData",
"isPointInPath", "isPointInStroke", "isPointInPath", "isPointInStroke",
{message: "input", level: 2},
"fillText", "strokeText", "fillText", "strokeText",
{name: "webGL", level: 2},
"readPixels", "readPixels",
{name: "Audio-API", leve: 1},
"getFloatFrequencyData", "getByteFrequencyData", "getFloatTimeDomainData", "getByteTimeDomainData", "getFloatFrequencyData", "getByteFrequencyData", "getFloatTimeDomainData", "getByteTimeDomainData",
"getChannelData", "copyFromChannel", "getChannelData", "copyFromChannel",
"getFrequencyResponse" "getFrequencyResponse"

View File

@ -131,6 +131,16 @@
input = document.createElement("table"); input = document.createElement("table");
setting.keys.forEach(function(key){ setting.keys.forEach(function(key){
let row = document.createElement("tr"); let row = document.createElement("tr");
if (typeof key === "object"){
let cell = document.createElement("td");
cell.colSpan = 2;
let h = document.createElement("h" + (2 + (key.level || 1)));
h.textContent = key.message? browser.i18n.getMessage(key.message): key.name;
cell.appendChild(h);
row.appendChild(cell);
input.appendChild(row);
return;
}
let nameCell = document.createElement("td"); let nameCell = document.createElement("td");
nameCell.textContent = key; nameCell.textContent = key;

View File

@ -1,6 +1,7 @@
Version 0.4.6: Version 0.4.6:
changes: changes:
- Changes in the random supply API - Changes in the random supply API
- Added grouping to API white list
new features: new features:
- Can protect Audio API - Can protect Audio API