Skip to content

Commit

Permalink
chore: update broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
techfg committed Dec 27, 2024
1 parent 9f7b748 commit a2a9c01
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 12 deletions.
13 changes: 12 additions & 1 deletion .remarkrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,18 @@ module.exports = {
'remark-validate-links',
// remark-link-no-dead-urls slows down eslint a lot so we disable during standard processing
// and check external urls only when explicitly enabled (e.g., dist build)
process.env.CHECK_LINKS ? 'remark-lint-no-dead-urls' : null,
process.env.CHECK_LINKS
? [
'remark-lint-no-dead-urls',
{
// TODO: jsFiddle sits behind cloudflare which has a human detector
// there may be a way using https://radar.cloudflare.com/ to bypass
// but dead-or-alive library doesn't support. Need to find a solution
// to validate jsfiddle urls.
skipUrlPatterns: [/^https:\/\/(www\.)?jsfiddle\.net\/[^\s]*$/]
}
]
: null,
'remark-frontmatter',
'remark-gfm'
].filter(Boolean)
Expand Down
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ members of the project's leadership.
## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>.
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct/>.

For answers to common questions about this code of conduct, see
<https://www.contributor-covenant.org/faq>.
<https://www.contributor-covenant.org/faq/>.

[homepage]: https://www.contributor-covenant.org
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A bug is a _demonstrable problem_ that is caused by the code in the repository.

Guidelines for bug reports:

1. **Lint your code** - Use [eslint](http://eslint.org/) to ensure your problem isn't caused by a simple error in your own code.
1. **Lint your code** - Use [eslint](https://eslint.org/) to ensure your problem isn't caused by a simple error in your own code.
2. **Use the GitHub issue search** - Check if the issue has already been [reported](https://github.com/jamietre/ImageMapster/issues?q=is%3Aissue+).
3. **Check if the issue has been fixed** - Try to reproduce it using the latest `main` or development branch in the repository.
4. **Isolate the problem** - Create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a [live example](https://jsfiddle.net) using the latest version of ImageMapster and preferrably, the latest version of jQuery/zepto.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ImageMapster activates the areas in HTML image maps so you can highlight and sel

## Documentation

See the [ImageMapster website](https://jamietre.github.io/ImageMapster) for full documentation including [how to get started](https://jamietre.github.io/ImageMapster/overview/getting-started/), [demos](https://jamietre.github.io/ImageMapster/overview/demos/), and [live examples](https://jamietre.github.io/ImageMapster/resources/live-examples/).
See the [ImageMapster website](https://jamietre.github.io/ImageMapster/) for full documentation including [how to get started](https://jamietre.github.io/ImageMapster/overview/getting-started/), [demos](https://jamietre.github.io/ImageMapster/overview/demos/), and [live examples](https://jamietre.github.io/ImageMapster/resources/live-examples/).

## Release Information

Expand Down
2 changes: 1 addition & 1 deletion site/src/content/docs/reference/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The ImageMapster API allows you to control the image maps through code. This can
$('img').mapster(options);
```

All images in the jQuery collection that contain a [usemap](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#usemap`) attribute that references a valid [map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map) element will be bound using the `options` specified.
All images in the jQuery collection that contain a [usemap](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#usemap) attribute that references a valid [map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map) element will be bound using the `options` specified.

For details on the available options, see [Configuration Reference][cr-base].

Expand Down
4 changes: 2 additions & 2 deletions site/src/content/docs/reference/configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Configuration Reference
description: Overview of all the available configuration options.
---

To activate all [image maps](http://en.wikipedia.org/wiki/Image_map) on the page with
To activate all [image maps](https://en.wikipedia.org/wiki/Image_map) on the page with
the default options, after [installing](../overview//getting-started.md#installation), just add the following to your page:

```html
Expand Down Expand Up @@ -906,7 +906,7 @@ When `truthy` (e.g., not null/empty) and [showToolTip](#showtooltip) is `true`,
When specifying a function, the `data` parameter will contain:

- `key`: The [mapKey](#mapkey) of the area associated to the tooltip. If the tooltip was invoked programmatically on an HTMLElement not associated with the map, the value will be `null`.
- `target`: An [HTMLAreaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAreaElement) if tooltip was triggered by mouseover or an array of [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLelement) if the tooltip was programmatically invoked. When programmatically invoked, the array of HTMLElements will contain all HTMLElements associated with the `key` that was specified in [tooltip](./api-reference.md#tooltip) API call.
- `target`: An [HTMLAreaElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAreaElement) if tooltip was triggered by mouseover or an array of [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) if the tooltip was programmatically invoked. When programmatically invoked, the array of HTMLElements will contain all HTMLElements associated with the `key` that was specified in [tooltip](./api-reference.md#tooltip) API call.

[Live Example](https://html-preview.github.io/?url=https://raw.githubusercontent.com/jamietre/ImageMapster/main/examples/tooltips.html)

Expand Down
8 changes: 4 additions & 4 deletions site/src/content/docs/resources/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you're having an issue or are wondering how to accomplish something with Imag
## Is ImageMapster free?

Yes. You can use it in any way you want to, under the terms of the
[MIT license](http://en.wikipedia.org/wiki/MIT_License).
[MIT license](https://en.wikipedia.org/wiki/MIT_License).

## How can I thank you for your work?

Expand Down Expand Up @@ -87,13 +87,13 @@ There are lots of ways to do this.

1. Use an online tool such as [image-map.net](https://www.image-map.net/).
2. Commercial drawing tools like Photoshop have capabilities to create image maps.
3. If you're creating a map for a geographical entity, like states or countries, someone's probably done it already. Google is your friend. Check [Wikipedia Commons](http://commons.wikimedia.org/wiki/Commons:Image_map_resources) for public domain maps, too.
3. If you're creating a map for a geographical entity, like states or countries, someone's probably done it already. Google is your friend. Check [Wikipedia Commons](https://commons.wikimedia.org/wiki/Commons:Image_map_resources) for public domain maps, too.

## How can I scale image maps to a different size?

You can let ImageMapster do it for you with the [scaleMap][cr-scalemap] option. It will automatically adjust the map data when it detects that an image is not being shown in its native size. Most of the time, this is what you'd want, because most of the time an HTML image map would be designed around the native size of an image. If you don't want this behavior for some reason, you can turn set `scaleMap: false` and ImageMapster will not adjust your image map no matter what. Be aware that auto-scaling is different than auto-resizing. If you are using [autoResize][cr-autoresize], you will want to maintain the default value of `true` for `scaleMap`, otherwise your hotspots will not be located in the expected location.

If you just want to use an image at a different size than the image map you happen to have represents, and would rather not have your users download an image at a larger size than you need, then you can transform it to the correct size using the [Image Map Resizer](http://blog.outsharked.com/p/quick-tricks.html) tool. This tool will also let you define a clipping area if you want to create a new image map that represents a cropped area within a map you already have.
If you just want to use an image at a different size than the image map you happen to have represents, and would rather not have your users download an image at a larger size than you need, then you can transform it to the correct size using an image map resizing tool.

## Couldn't I do something like this with CSS3?

Expand All @@ -106,7 +106,7 @@ An image map doesn't really do anything other than let the browser detect when t
You can convert SVG data to an HTML image map without too much trouble. Here are a couple resources:

- [Creating an image map from SVG](https://davidlynch.org/blog/2008/03/creating-an-image-map-from-svg/)
- [Inkscape Map](http://sourceforge.net/projects/inkscapemap/)
- [Inkscape Map](https://sourceforge.net/projects/inkscapemap/)

The actual data and shapes used by SVG and HTML image maps are pretty much identical so it's really a matter of transforming the markup.

Expand Down

0 comments on commit a2a9c01

Please sign in to comment.