micro-website-api icon indicating copy to clipboard operation
micro-website-api copied to clipboard

Result preview

Open suntong opened this issue 7 years ago • 4 comments

please add a "Result preview" output -- currently the CSS selectors' result is output in a text box, which is less intuitive if we want to quickly judge if our selection is correct or not.

If adding another, e.g., <span>, and displace the CSS selectors' result there, right as the HTML, that would be perfect.

Thanks for consideration.

suntong avatar Mar 17 '18 19:03 suntong

Hi Michael, have you looked into this yet? It should be a very easy fix. thx @evenchange4.

suntong avatar Mar 24 '18 20:03 suntong

Note to myself,

to remove all scripts except JSON-LD,

      const scripts = doc.querySelectorAll('script:not([type="application/ld+json"])');
      scripts.forEach(s => s.parentNode.removeChild(s));

to remove all import tags

      const imports = doc.querySelectorAll('link[rel=import]');
      imports.forEach(i => i.parentNode.removeChild(i));

suntong avatar Mar 25 '18 20:03 suntong

Thanks for the feedback. I do not have much time work on this feature. A PR will be great. :)

evenchange4 avatar Mar 26 '18 01:03 evenchange4

Oh, thanks for your reply. Actually I was planning to follow up with the question if PR is welcome when I initially asked the question, but having read your code for almost the whole day, I realized that your code, or the react-scripts maybe, or whatever framework your code is based on, is beyond me. I'm not a Javascript/Nodejs/Reactjs developer, but I thought it'd not be too difficult. Now I know it isn't the case. I know the change would be minimum, but having read your code for the whole day (including react-scripts & JSX etc), I haven't found a correct spot yet. So, all in all, I wanted to, but ..., don't hold your breath. :-)

suntong avatar Mar 26 '18 03:03 suntong