Important! To make this work you'll need to create a special bookmarklet, sourcing pinmarklet.js from this page. Your bookmarklet URL must be:
javascript:void((function(d){d.addEventListener('securitypolicyviolation',function(r){alert('ContentSecurityPolicyError!');});e=d.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('debug','true');e.setAttribute('src','//kentbrew.neocities.org/p/xorg/pinmarklet.js?r='+(Math.random()*99999999));d.body.appendChild(e);}(document)));
If you don't know how to create a bookmarklet, see https://gist.github.com/kentbrew/142cb69124223a5d0f3b3fd7fc2c6bd0
You might be able to drag this right into your bookmark folder: XorgSave
Here's the production version in case you want to test: Pin It
When you run your bookmarklet you may see a header asking you to install the browser extension. Please ignore this. Instead, right-click on each thumbnail, inspect, and look for crossorigin="anonymous"
in the img
tag.
This image comes from s3.amazonaws.com and will cause an error when rendered with crossorigin:anonymous
:
If you see it in the grid when you run your test bookmarklet, we are successfully removing the crossorigin
attribute when it errors.
This image comes from our domain and should render fine with crossorigin:anonymous
:
Feel free to try the bookmarklet elsewhere; it should work on most pages that don't have a content security policy forbidding external resources. (If it does, you'll see a CSPError pop-up. This is normal and expected.) Hint: Google Image Search has a content security policy blocking external resources, so you will see the error there.