jQuery External Link Checker
How to use:
- Include the script on your page. (The script is located in /dist/jquery_external_link_checker.js)
- Initiate the plugin:
$('a').checkExternalLinks(); // This will add .js-external-link class to all external links and .js-internal-link to all internal links
Using with options:
// This is how you can change classes that are added to links $('a').checkExternalLinks({ externalLinkClass: "custom-external-class", internalLinkClass: "custom-internal-class" });
List of options:
Option name | Accepted values | Description |
externalLinkClass | String | This options overrides the default "js-external-link" class on external links |
internalLinkClass | String | This options overrides the default "js-internal-link" class on internal links |
Development Workflow:
gulp watch
- to watch and regenerate /dist/jquery_external_link_checker.js gulp build
- to build /dist/jquery_external_link_checker.js and jquery_external_link_checker.min.js
Todo:
- Fix the
gulp scripts-min
task because it doesn't work on gulp watch
- Add documentation in /documentation
- Add Unit tests
- Add CommonJS documentation and tests
- Add AMD documentation and tests
- Add Gulp task documentation
- Add the date of generation of the script at the top of the javascript file
- Add the package version from package.json to the top of the javascript file
- Implement js statistics (such as size and gzipped size)