Commit e3c8cbe6 authored by wang's avatar wang

9999

parent c7b2f6be
This source diff could not be displayed because it is too large. You can view the blob instead.
let fonts = [ let fonts = [{"font": "50px sans-serif", "text": "0-_{w."}, {
{"font":"50px sans-serif","text":"0-_{w."},{"font":"50px serif","text":"0-_{w."},{"font":"50px 'Andale Mono', sans-serif","text":"0-_{w."},{"font":"50px 'Andale Mono', serif","text":"0-_{w."},{"font":"50px 'Arial Narrow', sans-serif","text":"0-_{w."},{"font":"50px 'Arial Narrow', serif","text":"0-_{w."},{"font":"50px 'Arial Unicode MS', sans-serif","text":"0-_{w."},{"font":"50px 'Arial Unicode MS', serif","text":"0-_{w."},{"font":"50px 'Batang', sans-serif","text":"0-_{w."},{"font":"50px 'Batang', serif","text":"0-_{w."},{"font":"50px 'Bell MT', sans-serif","text":"0-_{w."},{"font":"50px 'Bell MT', serif","text":"0-_{w."},{"font":"50px 'Brush Script', sans-serif","text":"0-_{w."},{"font":"50px 'Brush Script', serif","text":"0-_{w."},{"font":"50px 'Brush Script MT', sans-serif","text":"0-_{w."},{"font":"50px 'Brush Script MT', serif","text":"0-_{w."},{"font":"50px 'Calibri', sans-serif","text":"0-_{w."},{"font":"50px 'Charter', sans-serif","text":"0-_{w."},{"font":"50px 'Charter', serif","text":"0-_{w."},{"font":"50px 'Courier', sans-serif","text":"0-_{w."},{"font":"50px 'Courier New', sans-serif","text":"0-_{w."},{"font":"50px 'Curlz MT', sans-serif","text":"0-_{w."},{"font":"50px 'Curlz MT', serif","text":"0-_{w."},{"font":"50px 'DejaVu Sans', sans-serif","text":"0-_{w."},{"font":"50px 'DejaVu Sans', serif","text":"0-_{w."},{"font":"50px 'DejaVu Sans Mono', sans-serif","text":"0-_{w."},{"font":"50px 'DejaVu Serif Condensed', sans-serif","text":"0-_{w."},{"font":"50px 'DejaVu Serif Condensed', serif","text":"0-_{w."},{"font":"50px 'Droid Sans', sans-serif","text":"0-_{w."},{"font":"50px 'Droid Sans', serif","text":"0-_{w."},{"font":"50px 'Droid Sans Fallback', sans-serif","text":"0-_{w."},{"font":"50px 'Droid Sans Fallback', serif","text":"0-_{w."},{"font":"50px 'Droid Serif', sans-serif","text":"0-_{w."},{"font":"50px 'Droid Serif', serif","text":"0-_{w."},{"font":"50px 'Forte', sans-serif","text":"0-_{w."},{"font":"50px 'Forte', serif","text":"0-_{w."},{"font":"50px 'Futura', sans-serif","text":"0-_{w."},{"font":"50px 'Futura', serif","text":"0-_{w."},{"font":"50px 'Geneva', sans-serif","text":"0-_{w."},{"font":"50px 'Geneva', serif","text":"0-_{w."},{"font":"50px 'Hei', sans-serif","text":"0-_{w."},{"font":"50px 'Hei', serif","text":"0-_{w."},{"font":"50px 'Leelawadee', sans-serif","text":"0-_{w."},{"font":"50px 'Leelawadee', serif","text":"0-_{w."},{"font":"50px 'Levenim MT', sans-serif","text":"0-_{w."},{"font":"50px 'Levenim MT', serif","text":"0-_{w."},{"font":"50px 'Liberation Sans', sans-serif","text":"0-_{w."},{"font":"50px 'Liberation Sans', serif","text":"0-_{w."},{"font":"50px 'Liberation Sans Narrow', sans-serif","text":"0-_{w."},{"font":"50px 'Liberation Sans Narrow', serif","text":"0-_{w."},{"font":"50px 'Marlett', sans-serif","text":"0-_{w."},{"font":"50px 'Meiryo UI', sans-serif","text":"0-_{w."},{"font":"50px 'Meiryo UI', serif","text":"0-_{w."},{"font":"50px 'Microsoft Uighur', sans-serif","text":"0-_{w."},{"font":"50px 'Microsoft Uighur', serif","text":"0-_{w."},{"font":"50px 'Microsoft YaHei UI', sans-serif","text":"0-_{w."},{"font":"50px 'MS Mincho', sans-serif","text":"0-_{w."},{"font":"50px 'MS Mincho', serif","text":"0-_{w."},{"font":"50px 'MS UI Gothic', sans-serif","text":"0-_{w."},{"font":"50px 'NanumGothic', sans-serif","text":"0-_{w."},{"font":"50px 'NanumGothic', serif","text":"0-_{w."},{"font":"50px 'Nirmala UI', sans-serif","text":"0-_{w."},{"font":"50px 'Palatino', sans-serif","text":"0-_{w."},{"font":"50px 'Palatino', serif","text":"0-_{w."},{"font":"50px 'Papyrus', sans-serif","text":"0-_{w."},{"font":"50px 'Papyrus', serif","text":"0-_{w."},{"font":"50px 'PMingLiU', sans-serif","text":"0-_{w."},{"font":"50px 'PMingLiU', serif","text":"0-_{w."},{"font":"50px 'PT Serif', sans-serif","text":"0-_{w."},{"font":"50px 'PT Serif', serif","text":"0-_{w."},{"font":"50px 'SimHei', sans-serif","text":"0-_{w."},{"font":"50px 'STIXVariants', sans-serif","text":"0-_{w."},{"font":"50px 'STIXVariants', serif","text":"0-_{w."},{"font":"50px 'STSong', sans-serif","text":"0-_{w."},{"font":"50px 'STSong', serif","text":"0-_{w."},{"font":"50px 'Traditional Arabic', sans-serif","text":"0-_{w."},{"font":"50px 'Traditional Arabic', serif","text":"0-_{w."},{"font":"50px 'Urdu Typesetting', sans-serif","text":"0-_{w."},{"font":"50px 'Urdu Typesetting', serif","text":"0-_{w."},{"font":"50px 'Verdana', sans-serif","text":"0-_{w."},{"font":"50px 'Wingdings', sans-serif","text":"0-_{w."},{"font":"50px 'Wingdings 3', sans-serif","text":"0-_{w."},{"font":"50px 'Wingdings 3', serif","text":"0-_{w."},{"font":"50px 'Helkevtrica', sans-serif","text":"0-_{w."},{"font":"50px 'Helkevtrica', serif","text":"0-_{w."},
{"font": "50px sans-serif", "text": "0-_{w."}, {
"font": "50px serif", "font": "50px serif",
"text": "0-_{w." "text": "0-_{w."
}, {"font": "50px 'Andale Mono', sans-serif", "text": "0-_{w."}, { }, {"font": "50px 'Andale Mono', sans-serif", "text": "0-_{w."}, {
...@@ -118,7 +115,224 @@ let fonts = [ ...@@ -118,7 +115,224 @@ let fonts = [
}, {"font": "50px 'Helkevtrica', sans-serif", "text": "0-_{w."}, { }, {"font": "50px 'Helkevtrica', sans-serif", "text": "0-_{w."}, {
"font": "50px 'Helkevtrica', serif", "font": "50px 'Helkevtrica', serif",
"text": "0-_{w." "text": "0-_{w."
}, {"font": "1000px sans-serif", "text": "₹"}, {"font": "1000px sans-serif", "text": "▁"}, {
"font": "1000px sans-serif",
"text": "₺"
}, {"font": "1000px sans-serif", "text": "ꜽ"}, {"font": "1000px sans-serif", "text": "�"}, {
"font": "1000px sans-serif",
"text": "₸"
}, {"font": "1000px sans-serif", "text": "׆"}, {"font": "1000px sans-serif", "text": "ẞ"}, {
"font": "1000px sans-serif",
"text": "ॿ"
}, {"font": "1000px sans-serif", "text": ""}, {"font": "1000px sans-serif", "text": "᳚"}, {
"font": "1000px sans-serif",
"text": "៝"
}, {"font": "1000px sans-serif", "text": "⎮"}, {"font": "1000px sans-serif", "text": "ം"}, {
"font": "1000px sans-serif",
"text": "ஂ"
}, {"font": "1000px sans-serif", "text": "ᅚ"}, {"font": "1000px sans-serif", "text": "␥"}, {
"font": "1000px sans-serif",
"text": "〮"
}, {"font": "1000px sans-serif", "text": "꠰"}, {"font": "1000px sans-serif", "text": "⬆"}, {
"font": "1000px sans-serif",
"text": "⇤"
}, {"font": "1000px sans-serif", "text": "₽"}, {"font": "1000px sans-serif", "text": "ⱻ"}, {
"font": "1000px sans-serif",
"text": "₰"
}, {"font": "1000px sans-serif", "text": "ﯮ"}, {"font": "1000px sans-serif", "text": ""}, {
"font": "1000px sans-serif",
"text": "￿"
}, {"font": "1000px sans-serif", "text": ""}, {"font": "1000px sans-serif", "text": "Ⴀ"}, {
"font": "1000px sans-serif",
"text": "𝞐"
}, {"font": "1000px sans-serif", "text": "܀"}, {"font": "1000px sans-serif", "text": "ᥐ"}, {
"font": "1000px sans-serif",
"text": "ゕ"
}, {"font": "1000px sans-serif", "text": "匭"}, {
"font": "1000px sans-serif",
"text": "؜"
}, {"font": "1000px sans-serif", "text": "⃣"}, {"font": "1000px sans-serif", "text": ""}, {
"font": "1000px sans-serif",
"text": "Ș"
}, {"font": "1000px sans-serif", "text": "֏"}, {"font": "1000px sans-serif", "text": "ࣤ"}, {
"font": "1000px sans-serif",
"text": "঳"
}, {"font": "1000px sans-serif", "text": "᱐"}, {"font": "1000px sans-serif", "text": "☙"}, {
"font": "1000px serif",
"text": "₹"
}, {"font": "1000px serif", "text": "▁"}, {"font": "1000px serif", "text": "₺"}, {
"font": "1000px serif",
"text": "ꜽ"
}, {"font": "1000px serif", "text": "�"}, {"font": "1000px serif", "text": "₸"}, {
"font": "1000px serif",
"text": "׆"
}, {"font": "1000px serif", "text": "ẞ"}, {"font": "1000px serif", "text": "ॿ"}, {
"font": "1000px serif",
"text": ""
}, {"font": "1000px serif", "text": "᳚"}, {"font": "1000px serif", "text": "៝"}, {
"font": "1000px serif",
"text": "⎮"
}, {"font": "1000px serif", "text": "ം"}, {"font": "1000px serif", "text": "ஂ"}, {
"font": "1000px serif",
"text": "ᅚ"
}, {"font": "1000px serif", "text": "␥"}, {"font": "1000px serif", "text": "〮"}, {
"font": "1000px serif",
"text": "꠰"
}, {"font": "1000px serif", "text": "⬆"}, {"font": "1000px serif", "text": "⇤"}, {
"font": "1000px serif",
"text": "₽"
}, {"font": "1000px serif", "text": "ⱻ"}, {"font": "1000px serif", "text": "₰"}, {
"font": "1000px serif",
"text": "ﯮ"
}, {"font": "1000px serif", "text": ""}, {"font": "1000px serif", "text": "￿"}, {
"font": "1000px serif",
"text": ""
}, {"font": "1000px serif", "text": "Ⴀ"}, {"font": "1000px serif", "text": "𝞐"}, {
"font": "1000px serif",
"text": "܀"
}, {"font": "1000px serif", "text": "ᥐ"}, {"font": "1000px serif", "text": "ゕ"}, {
"font": "1000px serif",
"text": "匭"
}, {"font": "1000px serif", "text": "؜"}, {"font": "1000px serif", "text": "⃣"}, {
"font": "1000px serif",
"text": ""
}, {"font": "1000px serif", "text": "Ș"}, {"font": "1000px serif", "text": "֏"}, {
"font": "1000px serif",
"text": "ࣤ"
}, {"font": "1000px serif", "text": "঳"}, {"font": "1000px serif", "text": "᱐"}, {
"font": "1000px serif",
"text": "☙"
}, {"font": "1000px monospace", "text": "₹"}, {"font": "1000px monospace", "text": "▁"}, {
"font": "1000px monospace",
"text": "₺"
}, {"font": "1000px monospace", "text": "ꜽ"}, {"font": "1000px monospace", "text": "�"}, {
"font": "1000px monospace",
"text": "₸"
}, {"font": "1000px monospace", "text": "׆"}, {"font": "1000px monospace", "text": "ẞ"}, {
"font": "1000px monospace",
"text": "ॿ"
}, {"font": "1000px monospace", "text": ""}, {"font": "1000px monospace", "text": "᳚"}, {
"font": "1000px monospace",
"text": "៝"
}, {"font": "1000px monospace", "text": "⎮"}, {"font": "1000px monospace", "text": "ം"}, {
"font": "1000px monospace",
"text": "ஂ"
}, {"font": "1000px monospace", "text": "ᅚ"}, {"font": "1000px monospace", "text": "␥"}, {
"font": "1000px monospace",
"text": "〮"
}, {"font": "1000px monospace", "text": "꠰"}, {"font": "1000px monospace", "text": "⬆"}, {
"font": "1000px monospace",
"text": "⇤"
}, {"font": "1000px monospace", "text": "₽"}, {"font": "1000px monospace", "text": "ⱻ"}, {
"font": "1000px monospace",
"text": "₰"
}, {"font": "1000px monospace", "text": "ﯮ"}, {"font": "1000px monospace", "text": ""}, {
"font": "1000px monospace",
"text": "￿"
}, {"font": "1000px monospace", "text": ""}, {"font": "1000px monospace", "text": "Ⴀ"}, {
"font": "1000px monospace",
"text": "𝞐"
}, {"font": "1000px monospace", "text": "܀"}, {"font": "1000px monospace", "text": "ᥐ"}, {
"font": "1000px monospace",
"text": "ゕ"
}, {"font": "1000px monospace", "text": "匭"}, {"font": "1000px monospace", "text": "؜"}, {
"font": "1000px monospace",
"text": "⃣"
}, {"font": "1000px monospace", "text": ""}, {"font": "1000px monospace", "text": "Ș"}, {
"font": "1000px monospace",
"text": "֏"
}, {"font": "1000px monospace", "text": "ࣤ"}, {"font": "1000px monospace", "text": "঳"}, {
"font": "1000px monospace",
"text": "᱐"
}, {"font": "1000px monospace", "text": "☙"}, {"font": "1000px cursive", "text": "₹"}, {
"font": "1000px cursive",
"text": "▁"
}, {"font": "1000px cursive", "text": "₺"}, {"font": "1000px cursive", "text": "ꜽ"}, {
"font": "1000px cursive",
"text": "�"
}, {"font": "1000px cursive", "text": "₸"}, {"font": "1000px cursive", "text": "׆"}, {
"font": "1000px cursive",
"text": "ẞ"
}, {"font": "1000px cursive", "text": "ॿ"}, {"font": "1000px cursive", "text": ""}, {
"font": "1000px cursive",
"text": "᳚"
}, {"font": "1000px cursive", "text": "៝"}, {"font": "1000px cursive", "text": "⎮"}, {
"font": "1000px cursive",
"text": "ം"
}, {"font": "1000px cursive", "text": "ஂ"}, {"font": "1000px cursive", "text": "ᅚ"}, {
"font": "1000px cursive",
"text": "␥"
}, {"font": "1000px cursive", "text": "〮"}, {"font": "1000px cursive", "text": "꠰"}, {
"font": "1000px cursive",
"text": "⬆"
}, {"font": "1000px cursive", "text": "⇤"}, {"font": "1000px cursive", "text": "₽"}, {
"font": "1000px cursive",
"text": "ⱻ"
}, {"font": "1000px cursive", "text": "₰"}, {"font": "1000px cursive", "text": "ﯮ"}, {
"font": "1000px cursive",
"text": ""
}, {"font": "1000px cursive", "text": "￿"}, {"font": "1000px cursive", "text": ""}, {
"font": "1000px cursive",
"text": "Ⴀ"
}, {"font": "1000px cursive", "text": "𝞐"}, {"font": "1000px cursive", "text": "܀"}, {
"font": "1000px cursive",
"text": "ᥐ"
}, {"font": "1000px cursive", "text": "ゕ"}, {"font": "1000px cursive", "text": "匭"}, {
"font": "1000px cursive",
"text": "؜"
}, {"font": "1000px cursive", "text": "⃣"}, {"font": "1000px cursive", "text": ""}, {
"font": "1000px cursive",
"text": "Ș"
}, {"font": "1000px cursive", "text": "֏"}, {"font": "1000px cursive", "text": "ࣤ"}, {
"font": "1000px cursive",
"text": "঳"
}, {"font": "1000px cursive", "text": "᱐"}, {"font": "1000px cursive", "text": "☙"}, {
"font": "1000px fantasy",
"text": "₹"
}, {"font": "1000px fantasy", "text": "▁"}, {"font": "1000px fantasy", "text": "₺"}, {
"font": "1000px fantasy",
"text": "ꜽ"
}, {"font": "1000px fantasy", "text": "�"}, {"font": "1000px fantasy", "text": "₸"}, {
"font": "1000px fantasy",
"text": "׆"
}, {"font": "1000px fantasy", "text": "ẞ"}, {"font": "1000px fantasy", "text": "ॿ"}, {
"font": "1000px fantasy",
"text": ""
}, {"font": "1000px fantasy", "text": "᳚"}, {"font": "1000px fantasy", "text": "៝"}, {
"font": "1000px fantasy",
"text": "⎮"
}, {"font": "1000px fantasy", "text": "ം"}, {"font": "1000px fantasy", "text": "ஂ"}, {
"font": "1000px fantasy",
"text": "ᅚ"
}, {"font": "1000px fantasy", "text": "␥"}, {"font": "1000px fantasy", "text": "〮"}, {
"font": "1000px fantasy",
"text": "꠰"
}, {"font": "1000px fantasy", "text": "⬆"}, {"font": "1000px fantasy", "text": "⇤"}, {
"font": "1000px fantasy",
"text": "₽"
}, {"font": "1000px fantasy", "text": "ⱻ"}, {"font": "1000px fantasy", "text": "₰"}, {
"font": "1000px fantasy",
"text": "ﯮ"
}, {"font": "1000px fantasy", "text": ""}, {"font": "1000px fantasy", "text": "￿"}, {
"font": "1000px fantasy",
"text": ""
}, {"font": "1000px fantasy", "text": "Ⴀ"}, {"font": "1000px fantasy", "text": "𝞐"}, {
"font": "1000px fantasy",
"text": "܀"
}, {"font": "1000px fantasy", "text": "ᥐ"}, {"font": "1000px fantasy", "text": "ゕ"}, {
"font": "1000px fantasy",
"text": "匭"
}, {"font": "1000px fantasy", "text": "؜"}, {"font": "1000px fantasy", "text": "⃣"}, {
"font": "1000px fantasy",
"text": ""
}, {"font": "1000px fantasy", "text": "Ș"}, {"font": "1000px fantasy", "text": "֏"}, {
"font": "1000px fantasy",
"text": "ࣤ"
}, {"font": "1000px fantasy", "text": "঳"}, {"font": "1000px fantasy", "text": "᱐"}, {
"font": "1000px fantasy",
"text": "☙"
}] }]
let fontsRes = {} let fontsRes = {}
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d') var ctx = canvas.getContext('2d')
...@@ -126,7 +340,7 @@ ctx.textBaseline = 'top'; ...@@ -126,7 +340,7 @@ ctx.textBaseline = 'top';
for (let i = 0; i < fonts.length; i++) { for (let i = 0; i < fonts.length; i++) {
ctx.font = fonts[i].font; ctx.font = fonts[i].font;
let met = ctx.measureText(fonts[i].text) let met = ctx.measureText(fonts[i].text)
if (!fontsRes[fonts[i]]) { if (!fontsRes[fonts[i].font]) {
fontsRes[fonts[i].font] = {} fontsRes[fonts[i].font] = {}
} }
fontsRes[fonts[i].font][fonts[i].text] = { fontsRes[fonts[i].font][fonts[i].text] = {
...@@ -135,55 +349,55 @@ for (let i = 0; i < fonts.length; i++) { ...@@ -135,55 +349,55 @@ for (let i = 0; i < fonts.length; i++) {
actualBoundingBoxLeft: met.actualBoundingBoxLeft, actualBoundingBoxLeft: met.actualBoundingBoxLeft,
actualBoundingBoxRight: met.actualBoundingBoxRight, actualBoundingBoxRight: met.actualBoundingBoxRight,
fontBoundingBoxAscent: met.fontBoundingBoxAscent, fontBoundingBoxAscent: met.fontBoundingBoxAscent,
actualBoundingBoxDescent: met.actualBoundingBoxDescent,
} }
} }
let imgsRes = {}; let imgsRes = {};
let sss = [ let sss = [
{ {
"font": "94px sans-serif", "font": "94px sans-serif",
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["😎", -1, 96], "fillText": ["😎", -1, 96],
"imageData": [18, 90, 1, 1] "imageData": [18, 90, 1, 1]
}, { }, {
"font": "94px sans-serif", "font": "94px sans-serif",
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["6️⃣", -1, 96], "fillText": ["6️⃣", -1, 96],
"imageData": [38, 77, 1, 1] "imageData": [38, 77, 1, 1]
}, { }, {
"font": "94px sans-serif", "font": "94px sans-serif",
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["🍼", -1, 96], "fillText": ["🍼", -1, 96],
"imageData": [48, 28, 1, 1] "imageData": [48, 28, 1, 1]
}, { }, {
"font": "94px sans-serif", "font": "94px sans-serif",
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["🏴󠁧󠁢󠁥󠁮󠁧󠁿", -1, 96], "fillText": ["🏴󠁧󠁢󠁥󠁮󠁧󠁿", -1, 96],
"imageData": [94, 23, 1, 1] "imageData": [94, 23, 1, 1]
}, { }, {
"font": "94px sans-serif", "font": "94px sans-serif",
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["📊", -1, 96], "fillText": ["📊", -1, 96],
"imageData": [26, 46, 1, 1] "imageData": [26, 46, 1, 1]
}, { }, {
"font": "94px sans-serif", "font": "94px sans-serif",
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["🏴󠁧󠁢󠁥󠁮󠁧󠁿", -1, 96], "fillText": ["🏴󠁧󠁢󠁥󠁮󠁧󠁿", -1, 96],
"imageData": [47, 23, 1, 1] "imageData": [47, 23, 1, 1]
}, { }, {
"font": "94px sans-serif", "font": "94px sans-serif",
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["㊗️", -1, 96], "fillText": ["㊗️", -1, 96],
"imageData": [37, 17, 1, 1] "imageData": [37, 17, 1, 1]
}, { }, {
"font": "94px sans-serif", "font": "94px sans-serif",
"fillStyle": "#000000", "fillStyle": "#000000",
"fillText": ["⛎", -1, 96], "fillText": ["⛎", -1, 96],
"imageData": [62, 28, 1, 1] "imageData": [62, 28, 1, 1]
} }
] ]
let imgRes = {}; let imgRes = {};
...@@ -247,7 +461,6 @@ for (let i = 0; i < glARgs.length; i++) { ...@@ -247,7 +461,6 @@ for (let i = 0; i < glARgs.length; i++) {
console.log(glArgs) console.log(glArgs)
let navigatorParams = { let navigatorParams = {
appName: navigator.appName, appName: navigator.appName,
appVersion: navigator.appVersion, appVersion: navigator.appVersion,
...@@ -304,10 +517,10 @@ function getObj(r) { ...@@ -304,10 +517,10 @@ function getObj(r) {
for (let i = 0; i < plugins.length; i++) { for (let i = 0; i < plugins.length; i++) {
let p = plugins.item(i); let p = plugins.item(i);
let pi = {} let pi = {}
let keys = ['0','1', 'application/pdf', 'text/pdf', 'description', 'filename', 'length', 'name']; let keys = ['0', '1', 'application/pdf', 'text/pdf', 'description', 'filename', 'length', 'name'];
for (const key of keys) { for (const key of keys) {
let r = p[key]; let r = p[key];
if (typeof r === 'object'){ if (typeof r === 'object') {
r = getObj(r) r = getObj(r)
r.enabledPlugin = []; r.enabledPlugin = [];
} }
...@@ -325,6 +538,7 @@ function getDataUrl() { ...@@ -325,6 +538,7 @@ function getDataUrl() {
return canvas.toDataURL("image/png"); return canvas.toDataURL("image/png");
} }
function getDataUrl2() { function getDataUrl2() {
var canvas = document.createElement('canvas'); var canvas = document.createElement('canvas');
let ctx = canvas.getContext('2d'); let ctx = canvas.getContext('2d');
...@@ -338,15 +552,50 @@ function getDataUrl2() { ...@@ -338,15 +552,50 @@ function getDataUrl2() {
ctx.fillStyle = 'rgba(22, 22, 22, 0.08636862211354912)' ctx.fillStyle = 'rgba(22, 22, 22, 0.08636862211354912)'
ctx.fillText('Hel$&?6%){mZ+#@👺', 105, 105) ctx.fillText('Hel$&?6%){mZ+#@👺', 105, 105)
return { return {
data: ctx.getImageData(0, 0, 5, 5).data+'', data: ctx.getImageData(0, 0, 5, 5).data + '',
url:canvas.toDataURL() url: canvas.toDataURL()
} }
} }
function canplay() { function canplay() {
let videos = {"audio/aac; codecs=\"flac\"": "", "audio/flac": "probably", "audio/mpeg; codecs=\"mp3\"": "probably", "audio/mpeg; codecs=\"vp9\"": "", "audio/webm; codecs=\"vp8\"": "", "audio/webz": "", "audio/x-m4a; codecs=\"mp3\"": "", "audio/x-m4a; codecs=\"vp8, mp4a.40\"": "", "audio/x-m4a; codecs=\"vp9, mp4a.40.2\"": "", "video/mp4": "maybe", "video/mp4; codecs=\"ac-3\"": "", "video/mp4; codecs=\"avc1.42011E\"": "", "video/mp4; codecs=\"avc1.42E009\"": "maybe", "video/mp4; codecs=\"avc1.42E034\"": "probably", "video/mp4; codecs=\"avc1.42F01E\"": "probably", "video/mp4; codecs=\"avc1.4D001E\"": "probably", "video/mp4; codecs=\"avc3.42001E\"": "probably", "video/mp4; codecs=\"avc3.42E01E, mp4a.40.29\"": "probably", "video/mp4; codecs=\"flac\"": "probably", "video/mp4; codecs=\"hev1\"": "", "video/mp4; codecs=\"hvc1x\"": "", "video/mp4; codecs=\"lavc1337\"": "", "video/mp4; codecs=\"mp4a.40.02\"": "probably", "video/mp4; codecs=\"mp4a.40.5\"": "probably", "video/mp4; codecs=\"mp4a.67\"": "probably", "video/mp4; codecs=\"opus\"": "probably", "video/ogg; codecs=\"flac\"": "probably", "video/ogg; codecs=\"opus\"": "probably", "video/ogg; codecs=\"vp8\"": "probably", "video/webm": "maybe", "video/webm; codecs=\"av01.0.04M.08\"": "probably", "video/webm; codecs=\"vp09.02.10.08\"": "probably", "video/x-dv": "", "video/x-m4v; codecs=\"avc1.42AC23\"": "maybe"}; let videos = {
"audio/aac; codecs=\"flac\"": "",
"audio/flac": "probably",
"audio/mpeg; codecs=\"mp3\"": "probably",
"audio/mpeg; codecs=\"vp9\"": "",
"audio/webm; codecs=\"vp8\"": "",
"audio/webz": "",
"audio/x-m4a; codecs=\"mp3\"": "",
"audio/x-m4a; codecs=\"vp8, mp4a.40\"": "",
"audio/x-m4a; codecs=\"vp9, mp4a.40.2\"": "",
"video/mp4": "maybe",
"video/mp4; codecs=\"ac-3\"": "",
"video/mp4; codecs=\"avc1.42011E\"": "",
"video/mp4; codecs=\"avc1.42E009\"": "maybe",
"video/mp4; codecs=\"avc1.42E034\"": "probably",
"video/mp4; codecs=\"avc1.42F01E\"": "probably",
"video/mp4; codecs=\"avc1.4D001E\"": "probably",
"video/mp4; codecs=\"avc3.42001E\"": "probably",
"video/mp4; codecs=\"avc3.42E01E, mp4a.40.29\"": "probably",
"video/mp4; codecs=\"flac\"": "probably",
"video/mp4; codecs=\"hev1\"": "",
"video/mp4; codecs=\"hvc1x\"": "",
"video/mp4; codecs=\"lavc1337\"": "",
"video/mp4; codecs=\"mp4a.40.02\"": "probably",
"video/mp4; codecs=\"mp4a.40.5\"": "probably",
"video/mp4; codecs=\"mp4a.67\"": "probably",
"video/mp4; codecs=\"opus\"": "probably",
"video/ogg; codecs=\"flac\"": "probably",
"video/ogg; codecs=\"opus\"": "probably",
"video/ogg; codecs=\"vp8\"": "probably",
"video/webm": "maybe",
"video/webm; codecs=\"av01.0.04M.08\"": "probably",
"video/webm; codecs=\"vp09.02.10.08\"": "probably",
"video/x-dv": "",
"video/x-m4v; codecs=\"avc1.42AC23\"": "maybe"
};
var v = document.createElement('video'); var v = document.createElement('video');
for (let i = 0; i < videos.length; i++) { for (let i = 0; i < videos.length; i++) {
videos[i] = v.canPlayType(videos[i]); videos[i] = v.canPlayType(videos[i]);
...@@ -356,10 +605,10 @@ function canplay() { ...@@ -356,10 +605,10 @@ function canplay() {
let result = { let result = {
windowParams: windowParams, windowParams: windowParams,
screenParams:screenParams, screenParams: screenParams,
navigatorParams: navigatorParams, navigatorParams: navigatorParams,
plugins: plgs, plugins: plgs,
fontsRes:fontsRes, fontsRes: fontsRes,
imgsRes: imgRes, imgsRes: imgRes,
glRes: glArgs, glRes: glArgs,
jpg: getDataUrl(), jpg: getDataUrl(),
...@@ -368,19 +617,19 @@ let result = { ...@@ -368,19 +617,19 @@ let result = {
} }
fetch("/collect", { fetch("/collect", {
"headers": { "headers": {
"accept": "*/*", "accept": "*/*",
"accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7", "accept-language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
"cache-control": "no-cache", "cache-control": "no-cache",
"pragma": "no-cache", "pragma": "no-cache",
"sec-fetch-dest": "empty", "sec-fetch-dest": "empty",
"sec-fetch-mode": "cors", "sec-fetch-mode": "cors",
"sec-fetch-site": "cross-site" "sec-fetch-site": "cross-site"
}, },
"body": JSON.stringify(result), "body": JSON.stringify(result),
"method": "POST", "method": "POST",
"mode": "cors", "mode": "cors",
"credentials": "omit" "credentials": "omit"
}).then(e=>{ }).then(e => {
console.log(e.text()) console.log(e.text())
}) })
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment