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

Add plugin: Hotlink Protection Image Downloader #5104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lovelyjuice
Copy link

I am submitting a new Community Plugin

Repo URL

Link to my plugin:
https://github.com/lovelyjuice/hotlink-protection-image-downloader

Release Checklist

  • I have tested the plugin on
    • Windows
    • macOS
    • Linux
    • Android (if applicable)
    • iOS (if applicable)
  • My GitHub release contains all required files (as individual files, not just in the source.zip / source.tar.gz)
    • main.js
    • manifest.json
    • styles.css (optional)
  • GitHub release name matches the exact version number specified in my manifest.json (Note: Use the exact version number, don't include a prefix v)
  • The id in my manifest.json matches the id in the community-plugins.json file.
  • My README.md describes the plugin's purpose and provides clear usage instructions.
  • I have read the developer policies at https://docs.obsidian.md/Developer+policies, and have assessed my plugins's adherence to these policies.
  • I have read the tips in https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines and have self-reviewed my plugin to avoid these common pitfalls.
  • I have added a license in the LICENSE file.
  • My project respects and is compatible with the original license of any code from other plugins that I'm using.
    I have given proper attribution to these other projects in my README.md.

Copy link

github-actions bot commented Jan 9, 2025

Hello!

I found the following issues in your plugin submission

Errors:

❌ Plugin name mismatch, the name in this PR (Hotlink Protection Image Downloade) is not the same as the one in your repo (Hotlink Protection Image Downloader). If you just changed your plugin name, remember to change it in the manifest.json in your repo and your latest GitHub release.


Warnings:

⚠️ Avoid including sentences like This is a plugin that does in your description


This check was done automatically. Do NOT open a new PR for re-validation. Instead, to trigger this check again, make a change to your PR and wait a few minutes, or close and re-open it.

Copy link

github-actions bot commented Jan 9, 2025

Hello!

I found the following issues in your plugin submission

Warnings:

⚠️ Avoid including sentences like This is a plugin that does in your description


This check was done automatically. Do NOT open a new PR for re-validation. Instead, to trigger this check again, make a change to your PR and wait a few minutes, or close and re-open it.

@ObsidianReviewBot
Copy link
Collaborator

ObsidianReviewBot commented Jan 10, 2025

Thank you for your submission, an automated scan of your plugin code's revealed the following issues:

Required

(Skipped)


Do NOT open a new PR for re-validation.
Once you have pushed all of the required changes to your repo, the bot will update the labels on this PR within 6 hours.
If you think some of the required changes are incorrect, please comment with /skip and the reason why you think the results are incorrect.

@ObsidianReviewBot ObsidianReviewBot added Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made Ready for review and removed Ready for review Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made labels Jan 10, 2025
@ObsidianReviewBot ObsidianReviewBot removed their assignment Jan 10, 2025
@ObsidianReviewBot
Copy link
Collaborator

Changes requested by bot have been made, ready for additional review by human.

@lovelyjuice
Copy link
Author

/skip This is just a small plugin with 300 lines of code and does not need to be packaged using npm.

@github-actions github-actions bot added the Skipped code scan Code scanning skipped because submission is not in TS/author believes result is wrong label Jan 10, 2025
@joethei joethei added Changes requested Minor changes requested PR can be merged after some final changes have been requested and removed Ready for review Skipped code scan Code scanning skipped because submission is not in TS/author believes result is wrong labels Jan 24, 2025
@lovelyjuice lovelyjuice closed this Feb 5, 2025
@lovelyjuice
Copy link
Author

lovelyjuice commented Feb 5, 2025

Hello, I have modified part of the code as required to comply with the specifications, but I believe the following two places do not need to be changed.

  1. input.style.margin = "0.6em"; This code has been tested by me and is effective. If this CSS is not added, the input box and the confirm button will be stuck together.
  2. getAvailablePathForAttachment() will always return a path relative to the vault directory. For example, for the note /father/test.md, its attachment path is /father/assets/xxx.jpg. However, sometimes I need to open this md file with other editors, in which case the link needs to be set to assets/xxx.jpg, otherwise other editors will not be able to find the image.

@ObsidianReviewBot ObsidianReviewBot added Ready for review Changes made and removed Changes requested Minor changes requested PR can be merged after some final changes have been requested labels Feb 5, 2025
@ObsidianReviewBot
Copy link
Collaborator

Thank you for your submission, an automated scan of your plugin code's revealed the following issues:

Required

[1]:Please remove the main.js file from the repo and add it to your .gitignore. Compiled release files shouldn't get mixed with source code in your commits and should go to the releases files instead.


Do NOT open a new PR for re-validation.
Once you have pushed all of the required changes to your repo, the bot will update the labels on this PR within 6 hours.
If you think some of the required changes are incorrect, please comment with /skip and the reason why you think the results are incorrect.

@ObsidianReviewBot ObsidianReviewBot added Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made Ready for review and removed Ready for review Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made labels Feb 6, 2025
@ObsidianReviewBot ObsidianReviewBot removed their assignment Feb 6, 2025
@ObsidianReviewBot
Copy link
Collaborator

Changes requested by bot have been made, ready for additional review by human.

@joethei
Copy link
Collaborator

joethei commented Feb 17, 2025

getAvailablePathForAttachment() will always return a path relative to the vault directory. For example, for the note /father/test.md, its attachment path is /father/assets/xxx.jpg. However, sometimes I need to open this md file with other editors, in which case the link needs to be set to assets/xxx.jpg, otherwise other editors will not be able to find the image.

Yes, and that is the reason why I am asking you to use that function, use the value returned by that function and do some processing afterwards if required, but don't use the raw settings value, that can lead to some weird edge case bugs, because you don't handle all of the possible settings values.

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

Successfully merging this pull request may close these issues.

3 participants