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

FR: eval URI to run arbitrary command #114

Closed
chrisgrieser opened this issue Feb 20, 2023 · 5 comments
Closed

FR: eval URI to run arbitrary command #114

chrisgrieser opened this issue Feb 20, 2023 · 5 comments

Comments

@chrisgrieser
Copy link
Contributor

chrisgrieser commented Feb 20, 2023

there are a lot of small one-liners calling the Obsidian API for which I currently create a templater script, bind it to a command, and then trigger it from outside Obsidian via the Advanced URI plugin.

Example: this.app.workspace.leftSplit.expand(); to show the left sidebar (Obsidian only has a toggle command built-in).

So I was thinking: How about an eval URI scheme which lets you run arbitrary javascript accessing the Obsidian API? This would cover a lot of these use cases and practically make a lot of smaller plugins redundant. (Obviously, add some warning signs that running arbitrary code can be dangerous.)

@Vinzent03
Copy link
Owner

I like the idea. I'm thinking about only allowing this with an additional toggle in the settings and of course adding an additional warning.

@Vinzent03
Copy link
Owner

Available via the new eval parameter!

@chrisgrieser
Copy link
Contributor Author

On time for the 100k Downloads as well! 🥳

@Vinzent03
Copy link
Owner

I didn't even know 🤯! A big part is probably because of your Alfred Workflow, thanks!

@chrisgrieser
Copy link
Contributor Author

It has barely 10k downloads, so at least 90% of downloads is even without the workflow!

joethei pushed a commit to obsidianmd/obsidian-releases that referenced this issue Feb 21, 2023
With the new `eval` URI scheme from the Advanced URI plugin, this plugin's functionality can be achieved in a much more efficient and customizable manner, making this plugin pretty much obsolete: Vinzent03/obsidian-advanced-uri#114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants