Plugin: Search on Internet v0.3.0

Adds the option to search selected text on external websites, like Google and Wikipedia. You can add your own websites! They’ll open in iframes by default.

It also adds the search options to the file context menu to search based on the title of a note:

You can also right-click on an internal link to perform a search on that link:

Settings

By default, the plugin comes with searches on Google and Wikipedia.
You can add your own websites to search on in the settings.

For each website, fill in the following three fields:

  • Name: The name of the search. This will be displayed in the search bar and the context menu.
  • URL: The URL to open. {{title}} will be replaced by the current notes title. This is used as the ‘query’.
  • Tags (optional): A list of tags for notes to display the search option on.
    In the example screenshot, this is used to only add the IMDB search on notes tagged with #actor, #movie or #director (in Dutch!)

It’s recommended to assign the command: “Search on Internet: Perform search” to a hotkey:

Credits

Settings code is mainly taken from the Templater plugin by SilentVoid13

Modal code is inspired by the Citation plugin

5 Likes

This is cool. I used to search for this thing. Later found a AHK Script that does it for me in or out of obsidian using a shortcut defined me me.

I glad that you bring the plugin out :slight_smile:

At popular request, Search on Internet is now updated to allow searching based on selected text! You can assign it to a hotkey for quick searching

1 Like

Useful, instantly changed it from Google and wikipedia (cause they suck) to DDG and added Merriam-Webster dictionary will add Britannica too

3 Likes

Thanks! That’s what customizable is for. Google and Wikipedia are mostly provided as examples, anyways :slight_smile: (I do wonder why you think Wikipedia sucks though!)

Tried your plug-in really like it works very well.
And about why I don’t like Wikipedia:

Wikipedia is quite biased politically (the co-founder, Larry Sanger denounced Wikipedia because of that) and for general info it’s only good for surface level information. Anything more in depth will be misrepresented in some way, so it’s better to do your own research on the topics.

For political/cultural events a lot of their sourcing relies on basic opinion pieces or for the mostly partisan spun news that tends to misrepresent events or might even push propaganda. Wiki for the most part uses those sources as evidence for their political entries even non-political entries as well. On top of that most Wiki articles are heavily opinionated based and there is enough info to suggest it’s politically biased, not centrist or non-partisan at all.

If you want analysis, facts or primary sourcing Wikipedia is the worst website to read, (unless you will go to each wiki source yourself reading those and skipping the entire wiki article as well as other sources you found yourself)

But even if you disagree with what I said above, Wikipedia themselves admits that they are not a reliable source to look at or quote from.

To celebrate Obsidian allowing all iframes, here’s a new update for Search on Internet :partying_face:

  • Open searches in iframes
  • Right-click and search text

1 Like

There is a google popup that I think is a signin form but it never loads and block search results. Is there a way to get rid of this?

Indeed, this is a Google cookie wall, I think. For some reason, I don’t have it… I think I managed to remove it by logging in to Google Calendar. If this is a common issue I’ll have to change the default search engine.

1 Like

Hi @Emile,
I don’t know why and how, but it seems that I’ve just lost the ability to see the context menu for external links … I was using it extensively so it must have happened today or very recently otherwise I would have noticed it before.
Maybe due to another plugin update, I don’t know.
Anyone else with this issue?
image

I get this error in the console:

Hi. This has been happening since a recent update of Obsidian. They’ve changed how to interact with the editor. I have to look into how to fix this, but it might not be possible currently.

1 Like

All right, thanks for replying :slight_smile: