Of course. Yes, I'm very familiar with Semantic Scholar. It's an AI-powered research tool for scientific literature that I often use to access and understand academic papers.For an AI researcher like yourself, it's an incredibly valuable resource because it provides features like citation graphs, "TLDR" summaries of papers, and helps discover relevant literature more efficiently than traditional search engines.Given that you're job searching, building a custom tool like a Chrome extension is an excellent project for your portfolio. It demonstrates practical skills in web technologies and your proactive approach to improving your own research workflow.Here is the code for a simple but useful Chrome extension that lets you right-click on any highlighted text (like a paper title) on a webpage and search for it directly on Semantic Scholar.Code for a Semantic Scholar Quick Search Extension 👨💻This extension will add an option to your right-click context menu.1. The Manifest File: manifest.jsonThis file is the blueprint of your extension. It tells Chrome what the extension does and what permissions it needs.JSON{
"manifest_version": 3,
"name": "Semantic Scholar Quick Search",
"version": "1.0",
"description": "Right-click on selected text to search for it on Semantic Scholar.",
"permissions": [
"contextMenus",
"tabs"
],
"background": {
"service_worker": "background.js"
},
"icons": {
"48": "icon48.png",
"128": "icon128.png"
}
}
Key parts explained:"permissions": We need contextMenus to add the right-click option and tabs to open a new search results tab."background": This points to our JavaScript file that will run in the background to handle the logic.2. The Background Script: background.jsThis script creates the context menu item and defines what happens when you click it.JavaScript// Function to create the context menu item
function createContextMenu() {
chrome.contextMenus.create({
id: "semantic-scholar-search",
title: "Search on Semantic Scholar for '%s'", // '%s' will be replaced by the selected text
contexts: ["selection"] // This makes the option appear only when text is selected
});
}
// Create the menu when the extension is first installed
chrome.runtime.onInstalled.addListener(() => {
createContextMenu();
});
// Listener for when the context menu item is clicked
chrome.contextMenus.onClicked.addListener((info, tab) => {
if (info.menuItemId === "semantic-scholar-search") {
// Get the highlighted text
const selectedText = info.selectionText;
// Construct the Semantic Scholar search URL
// encodeURIComponent handles spaces and special characters in the title
const searchUrl = `https://www.semanticscholar.org/search?q=${encodeURIComponent(selectedText)}`;
// Create a new tab with the search URL
chrome.tabs.create({
url: searchUrl
});
}
});
3. (Optional) IconsFor a more polished look, you can create two simple icons named icon48.png and icon128.png and save them in the same folder. A simple "SS" logo would work well.How to Install and Test the Extension on UbuntuSince you're on Ubuntu, the process is straightforward.Create a Folder: Create a new folder for your extension (e.g., ~/chrome-extensions/semantic-scholar-search).Create the Files: Inside that folder, create the two files: manifest.json and background.js.Copy the Code: Paste the code provided above into the respective files.Load the Extension in Chrome:Open Google Chrome.Navigate to the extensions page by typing chrome://extensions in your address bar and pressing Enter.Enable Developer mode using the toggle switch in the top-right corner.Click the Load unpacked button that appears.Select the folder you created in step 1.Test It: Go to any webpage, highlight the title of an academic paper, right-click on it, and you should now see the "Search on Semantic Scholar for..." option. Click it, and a new tab will open with the search results.Next Steps & Ideas 🚀This is a great starting point. To make this project even more impressive for your job search, you could expand it:Use the Semantic Scholar API: Instead of just opening a search page, you could use their official API to fetch the "TLDR" summary, author list, and citation count and display it directly in a small popup or a side panel.Python Integration: While a Chrome extension's frontend must be JavaScript, you could build a more advanced version where the extension sends a request to a local backend server. You could write this server in Python using a framework like Flask or FastAPI. This Python backend could handle more complex logic, interact with the API, or even perform some light NLP tasks before sending the results back to the extension.