Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Using target="_blank" on all external links #345

Closed
unrealapex opened this issue Jul 29, 2021 · 0 comments · Fixed by #426
Closed

Feature request: Using target="_blank" on all external links #345

unrealapex opened this issue Jul 29, 2021 · 0 comments · Fixed by #426

Comments

@unrealapex
Copy link
Contributor

unrealapex commented Jul 29, 2021

Is your feature request related to a problem? Please describe.

It's very frustrating to have the code you linted and started to fix vanish in thin air when you click a link because it doesn't open in a new tab.

Describe the solution you'd like

My suggestion is using target="_blank" on all external links on JSLint or at least just on the linting page. See When to use target=”_blank” for a more in depth guide and reasoning.

Describe alternatives you've considered

An alternative would be just Ctrl/Cmd clicking every line, but that is tedious.
One other option is adding a unsaved changes dialog:

window.addEventListener("beforeunload", function (e) {
    var confirmationMessage = 'It looks like you have been editing something. '
                            + 'If you leave before saving, your changes will be lost.';

    (e || window.event).returnValue = confirmationMessage; //Gecko + IE
    return confirmationMessage; //Gecko + Webkit, Safari, Chrome etc.
});

code for unsaved warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant