From 0a1f3acc7f40c89396eff6fdd1df0b642228aaa2 Mon Sep 17 00:00:00 2001 From: Takashi Tamura Date: Tue, 9 Oct 2018 15:18:12 +0900 Subject: [PATCH] refactoring --- mathjax/mj.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mathjax/mj.js b/mathjax/mj.js index 936fead80..d89a45ba5 100644 --- a/mathjax/mj.js +++ b/mathjax/mj.js @@ -56,9 +56,8 @@ const svgAsyncToPngDataUrl = function (svgdataurl) { ctx.fillStyle = "rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + ")"; ctx.fillRect(0, 0, canvas.width, canvas.height); ctx.drawImage(img, 0, 0); - const ret = canvas.toDataURL("image/png"); img.src = ""; - return ret; + return canvas.toDataURL("image/png"); }); } @@ -85,8 +84,6 @@ const setMathInDiv = function (divid, tmpid) { const setVSCodeForegroundColor = function(tex) { const rgb = getVSCodeEditorForegound(); - console.log("hoge: " + rgb[0]); - console.log(`${rgb[0]},${rgb[1]},${rgb[2]}`); return tex.replace(/^(\$|\\\(|\\begin{.*?})/, '$1\\color[RGB]{' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + '}'); }