Skip to content
Advertisement

Tag: google-chrome-extension

How can I get selected text in pdf in Javascript?

I’m writing a Chrome Extention to manipulate pdf file so I want to get selected text in the pdf. How can I do that. Some thing like that: Answer You can use the internal undocumented commands of the built-in PDF viewer. Here’s an example of a content script: This example assumes you send a message from the popup or background

Ensure `click` event is seen by the content script

I’m writing an extension for Chrome that listen and capture the click events made by the user. This is the way I’m capturing the event It works good in many cases, but there’re other cases where click event never get triggered, instead there’re one or more focusout events that get triggered. I understad that focusout event may be shooted when

what is the purpose of chrome-extension inject.js

Hello I have a react project which is working full and functional but when I look into network form console I find an unexpected script called chrome-extension://gppongmhjkpfnbhagpmjfkannfbllamg/js/inject.js which is not associated with my project. Is that a virus or an extension ?? In my chrome://extensions/ there is nothing called inject. Can anyone tell me what is this? This script loading

page_action click does not work while browser_action click works in Chrome Extension?

I want to make a simple browser extension like Font Face Ninja which toggles UI when page_action or browser_action is clicked. The following code using browser_action works – background.js manifest.json While the following code using page_action does not work – background.js manifest.json According to MDN docs, Page actions are like browser actions, except that they are associated with particular web

Chrome extension getSelection not working

I am trying to create a chrome extension which only consist of a button. When this button is clicked, it should make an alert box which contains the highlighted textarea on a page. I can’t get it to work. I can make it alert a hardcoded string, but not make it alert some highlighted text / selected textarea on a

How to get YouTube URL in background?

For my school project, I need to extract Video URL from Youtube from a Chrome extension. It means I should play a video on Youtube and I need the URL of that video displayed in my chrome extension body. How should I get this video URL using Javascript? Answer window.location.href if you are on the page playing a video.

Advertisement