I have notes that have multiple links to web pages and I would like to open all the links in a note at the same time.
Things I have tried
I have tried to select all the links and right click but it doesn’t open any options with something like “Open all”.
Right now, opening multiple links from obsidian is time consuming since every time I open a single link it redirects me to the web page without not even giving the option to stay on the note.
Same thing but open URL’s within Obsidian in Surfing browser tabs (will only work on PC):
style: primary
label: Search
actions:
- type: inlineJS
code: |-
let title = this.context.metadata.frontmatter.Title;
let urls = [
`https://www.google.com/search?q=${encodeURIComponent("site:arxiv.org " + title)}`,
`https://www.dblp.org/search?q=${encodeURIComponent(title)}`,
`https://scholar.google.com/scholar?q=${encodeURIComponent(title)}`,
`https://www.semanticscholar.org/search?q=${encodeURIComponent(title)}`,
`https://www.google.com/search?q=${encodeURIComponent("site:openreview.net " + title)}`,
`https://www.google.com/search?q=${encodeURIComponent(title)}`,
];
urls.forEach(url => {
const surfingView = app.workspace.getLeavesOfType("surfing-view").find(item => item.view);
if (surfingView) {
// Create a new tab for each URL
surfingView.view.webviewEl.executeJavaScript(`
window.open("${url}", "_blank");
`, true);
} else {
new Notice("Surfing view not found. Open at least one Surfing tab to make it work.");
}
});
Currently needs at least one Surfing tab to be open to work…