Skip to content

Instantly share code, notes, and snippets.

@ThomasThoren
Last active March 9, 2019 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThomasThoren/81fe3030cb4bc16f3ab8ed82070b6231 to your computer and use it in GitHub Desktop.
Save ThomasThoren/81fe3030cb4bc16f3ab8ed82070b6231 to your computer and use it in GitHub Desktop.
Web browsers

Web browsers

Force downloads to open in the same tab

This makes it easier to copy the cURL request.

Source: http://stackoverflow.com/a/16344250/2574244

[].forEach.call(document.querySelectorAll('a'),
    function(link){
        if(link.attributes.target) {
            link.attributes.target.value = '_self';
        }
    });

window.open = function(url) {
    location.href = url;
};

Disable security precautions in Chrome

"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
    --disable-web-security \
    --allow-file-access-from-files \
    --allow-file-access \
    --user-data-dir "/Users/$USER/Library/Application Support/Google/Chrome/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment