项目作者: danielnixon

项目描述 :
Restores consistent ctrl+click, shift+click, cmd+click and middle-click behaviour when clicking links.
高级语言: JavaScript
项目地址: git://github.com/danielnixon/link-fixer.git
创建时间: 2018-03-01T10:53:59Z
项目社区:https://github.com/danielnixon/link-fixer

开源协议:MIT License

下载


Firefox users
Firefox downloads
Firefox rating
Chrome users

Build Status
Type Coverage
Known Vulnerabilities

Link Fixer

The default behaviour of ctrl+click, shift+click, cmd+click (on macOS) and middle-click when clicking on links is to open the link in a new tab (or new window in the case of shift).

This behaviour is sometimes broken by careless developers.

This add-on restores the default behaviour, ensuring the modifier keys always cause links to open in a new tab (or window).

Installation

A note on the plain JS

Mozilla’s add-on submission process requires submission of source code. It’s probably an overly strict interpretation of that requirement, but I took it to mean that something like TypeScript (that neverless produces mostly readable, unobfuscated output) would require source code upload and push an add-on into the slow approval lane.

You’ll notice this repo doesn’t have a *.ts file in sight, and yet achieves a very high type coverage score courtesy of JSDoc types.

I took this as an opportunity to see how far I could push this given the no *.ts constraint.