-
Notifications
You must be signed in to change notification settings - Fork 0
/
hack.min.js
1 lines (1 loc) · 957 Bytes
/
hack.min.js
1
(()=>{let e=[];function n(e,n){return"cx-"+e+"-"+n}for(let l=0;l<grid.length;l++)for(let t=0;t<grid[l].length;t++){let i=grid[l][t];if(null!=i){if(null!=i.across&&i.across.is_start_of_word){let i="";for(let e=0;t+e!=grid[l].length&&null!=grid[l][t+e];e++){let r=grid[l][t+e].char,o=n(l,t+e);if(r){let e=document.getElementById(o);e&&(e.getElementsByClassName("cx-a")[0].innerHTML=r)}i+=r}e.push(i)}if(null!=i.down&&i.down.is_start_of_word){let i="";for(let e=0;l+e!=grid.length&&null!=grid[l+e][t];e++){let r=grid[l+e][t].char,o=n(l+e,t);if(r){let e=document.getElementById(o);e&&(e.getElementsByClassName("cx-a")[0].innerHTML=r)}i+=r}e.push(i)}}}let l=`\n <!DOCTYPE html>\n <head>\n <style>\n * {font-family: Arial}\n </style>\n </head>\n <body>\n <h1>Answers</h1>\n <ol>\n ${e.map((e=>"<li>"+e+"</li>")).join("\n")}\n </ol>\n </body>\n `;popup=window.open("about:blank","","width=600 height=400"),popup.document.write(l)})();