Back to front pageView on Hacker News (opens in a new tab)Show HN: I made CSS Pro, a re-imagined Devtools for web design (opens in a new tab)csspro.com505 pointsby guivr (on Hacker News)3 years agocsspro.com (opens in a new tab)CSS Pro - Instantly edit CSS visually. Any website. No setup.Try your design ideas in seconds with a universal visual CSS editor that generates code for you. Say hello to speed, joy, and stunning designs in just a few clicks with CSS Pro's browser extension.Comments (288) 84 threadsShow all commentsShowing thread 5 of 84[-]TekMol3 years ago1 reply#This could also be a bookmarklet. That would make it more secure as bookmarklets only have access to the page you use them on.Looking at the code, you can indeed run it as a bookmarklet. I went to https://www.example.com and typed this in the browser console: s1=document.createElement('script'); s1.src='https://code.jquery.com/jquery-3.7.0.slim.min.js'; document.head.appendChild(s1); s2=document.createElement('script'); s2.onload=()=>window.cssProReady(); s2.src='https://csspro.com/demo-build/mainnewnew.js'; document.head.appendChild(s2); Boom! The tool is running.So prefixing that line with "javascript:" and putting it into a bookmark would let you use it on any site you wish, simply by clicking the bookmark. Without having to install an extension.Would be a good alternative the author could offer imho.[-]evanreichard3 years ago1 reply#Any site that has a half decent Content Security Policy would prevent this. (You can try on HN, GitHub, etc and it fails)However it may work as a UserScript depending on the UserScript engine.graftak3 years ago#Sure but the main proposition for this tool is for it to be used during local development where CSP is often/always omitted.
Show HN: I made CSS Pro, a re-imagined Devtools for web design (opens in a new tab)csspro.com505 pointsby guivr (on Hacker News)3 years ago
TekMol3 years ago1 reply#This could also be a bookmarklet. That would make it more secure as bookmarklets only have access to the page you use them on.Looking at the code, you can indeed run it as a bookmarklet. I went to https://www.example.com and typed this in the browser console: s1=document.createElement('script'); s1.src='https://code.jquery.com/jquery-3.7.0.slim.min.js'; document.head.appendChild(s1); s2=document.createElement('script'); s2.onload=()=>window.cssProReady(); s2.src='https://csspro.com/demo-build/mainnewnew.js'; document.head.appendChild(s2); Boom! The tool is running.So prefixing that line with "javascript:" and putting it into a bookmark would let you use it on any site you wish, simply by clicking the bookmark. Without having to install an extension.Would be a good alternative the author could offer imho.
evanreichard3 years ago1 reply#Any site that has a half decent Content Security Policy would prevent this. (You can try on HN, GitHub, etc and it fails)However it may work as a UserScript depending on the UserScript engine.
graftak3 years ago#Sure but the main proposition for this tool is for it to be used during local development where CSP is often/always omitted.
Comments (288) 84 threads
Show all comments
Showing thread 5 of 84
Looking at the code, you can indeed run it as a bookmarklet. I went to https://www.example.com and typed this in the browser console:
Boom! The tool is running.So prefixing that line with "javascript:" and putting it into a bookmark would let you use it on any site you wish, simply by clicking the bookmark. Without having to install an extension.
Would be a good alternative the author could offer imho.
However it may work as a UserScript depending on the UserScript engine.