Update to 1.2.3

Also clean up some logs
This commit is contained in:
GnoxNahte 2024-10-23 22:46:40 +08:00
parent f8b3bc59dd
commit 2bcd822147
6 changed files with 37 additions and 9 deletions

View file

@ -1,4 +1,28 @@
# Changelog
<!--
Template
## [1.2.x](https://github.com/GnoxNahte/obsidian-auto-embed/tree/1.2.x) (2025-01-21)
**New Features & Improvements:**
- [Feature request X](https://github.com/GnoxNahte/obsidian-auto-embed/issues/X): Add...
- Add...
**Bugs Fixed:**
- Fix [Issue X](https://github.com/GnoxNahte/obsidian-auto-embed/issues/X): Fix...
Things to remember:
- Change version (On Markdown title and markdown link)
- Change date
- Add & remove all features, improvements, bugs
- Try to check all the links link to a valid location
-->
## [1.2.3](https://github.com/GnoxNahte/obsidian-auto-embed/tree/1.2.3) (2024-10-23)
**New Features & Improvements:**
- [Feature request 17](https://github.com/GnoxNahte/obsidian-auto-embed/issues/17): Add support for Instagram.
- Minor changes to README
## [1.2.2](https://github.com/GnoxNahte/obsidian-auto-embed/tree/1.2.2) (2024-09-26)

View file

@ -85,9 +85,10 @@ A brief overview with some steps on how the plugin works. *Not required to use t
4. Some websites like Twitter, Reddit or Imgur, will send a resize message. The plugin uses the info to resize the embed.
## Roadmap
- [ ] Add support for other websites (If you want other websites, [create an issue](https://github.com/GnoxNahte/obsidian-auto-embed/issues) or [submit a Google Form](https://forms.gle/xtuv4FVCKZ2tg9zK9) if u aren't comfortable with GitHub)
- [ ] Add support for other websites
- [ ] Google Maps
- [ ] Google Calendar
- [ ] Mastodon. Since there isn't a good way to check if the url is from Mastodon, have a setting that lets users input their own servers to be embedded as Mastodon.
- [ ] Other websites. [Iframely](https://iframely.com/domains) has a list of websites that can be embedded.
- [ ] Add preview websites when hovering a link and holding `Ctrl` for websites that aren't embedded using the syntax.
- [ ] Add tests
@ -96,7 +97,9 @@ A brief overview with some steps on how the plugin works. *Not required to use t
- [ ] Add images/gifs to show examples
- [ ] Add installation instructions
Submit any features you want here: https://forms.gle/xtuv4FVCKZ2tg9zK9
> [!TIP]
> Submit any features you want using [GitHub Issues](https://github.com/GnoxNahte/obsidian-auto-embed/issues) or [Google Forms](https://forms.gle/xtuv4FVCKZ2tg9zK9) (if u aren't comfortable with GitHub)
> Even if the feature is already listed, just submit it so I'll try to prioritise it.
### Current Limitations & Known Bugs
- General
@ -117,7 +120,7 @@ Please [send any issues](https://github.com/GnoxNahte/obsidian-auto-embed/issues
1. Have you [enabled the plugin](https://help.obsidian.md/Extending+Obsidian/Community+plugins#Enable+a+community+plugin)?
2. Are you following this syntax? `![](link)`<br>
For example: `![](https://example.com)`
3. If it still doesn't work, try contacting me or create an issue.
3. If it still doesn't work, [create a post in Discussions](https://github.com/GnoxNahte/obsidian-auto-embed/discussions/categories/general) so I can help you
## Contact Me
I've just started Obsidian and this is my first plugin.<br>

View file

@ -1,7 +1,7 @@
{
"id": "auto-embed",
"name": "Auto Embed",
"version": "1.2.2",
"version": "1.2.3",
"minAppVersion": "1.5.11",
"description": "Helps to embed links using markdown instead of iframe",
"author": "GnoxNahte",

View file

@ -69,7 +69,7 @@ export class DefaultFallbackEmbed extends EmbedBase {
try {
const response = await requestUrl({url: url, method: "GET"});
console.log(response);
// console.log(response);
if (!response.headers["content-type"].includes("text/html"))
return this.plugin.settings.fallbackDefaultLink;

View file

@ -59,19 +59,19 @@ export class RedditEmbed extends EmbedBase {
data = JSON.parse(e.data);
// console.log("data: " + e.data)
} catch (e) {
console.log("Error parsing reddit message. Error: " + e);
console.error("Error parsing reddit message. Error: " + e);
return;
}
// Only continue if the method is for resizing
if (data.type !== "resize.embed")
{
console.log("Reddit unknown message: " + data.type);
console.warn("Reddit unknown message: " + data.type);
return;
}
const iframes = document.querySelectorAll(".reddit-embed > iframe");
console.log("Size: " + iframes.length);
// console.log("Size: " + iframes.length);
for (let i = 0; i < iframes.length; i++) {
const iframe = iframes[i] as HTMLIFrameElement;
// Check where the message came from

View file

@ -13,5 +13,6 @@
"1.1.3": "1.5.11",
"1.2.0": "1.5.11",
"1.2.1": "1.5.11",
"1.2.2": "1.5.11"
"1.2.2": "1.5.11",
"1.2.3": "1.5.11"
}