How to programmatically open a chrome extension popup window from background.html

It is impossible to get the extension window to open without a user clicking on it… However, you can get the extension popup page to open in a new tab as follows: 1) Set your background page in your manifest file… “background_page”: “background.html”, This is where you will run the code to see whether the … Read more

How can I redirect after OAUTH2 with SameSite=Strict and still get my cookies?

I don’t think that this can be done for security reasons. SameSite=Strict means that if user has been redirected or just clicked on link to your site (from other host), cookie shouldn’t be send. And redirecting is like ‘chaining’ requests. So if your server redirects to another and this server redirects back immediately with 3xx … Read more

Google Drive Offline Document File Location

It turns out the offline documents are stored in the HTML5 FileSystem. The Chrome FileSystem storage is located here on my Windows 7 machine: C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\File System I added a number of large images to a document with the Chrome “Offline Docs” enabled and was able to see the FileSystem storage directory grow appropriately. I … Read more

Chrome Extension: how to capture selected text and send to a web service

You can do this by using Extensions Messaging. Basically, your “background page” will send the request to your service. For example, lets say you have a “popup” and once you click on it, it will do a “Google search” which is your service. content_script.js In your content script, we need to listen for a request … Read more

Passing message from background.js to popup.js

Popup doesn’t have tab id so you will get the error. You can use chrome.runtime.sendMessage and chrome.runtime.onMessage.addListener in that case. So in background.js chrome.runtime.sendMessage({ msg: “something_completed”, data: { subject: “Loading”, content: “Just completed!” } }); And in popup.js chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.msg === “something_completed”) { // To do something console.log(request.data.subject) console.log(request.data.content) } … Read more

Is it possible to see the data of a post request in Firefox or Chrome?

You could just use the Chrome Developer Tools, if you only need to track requests. Activate them with Ctrl+Shift+I and select the Network tab. This works also when Chrome talks HTTPS with another server (and unless you have the HTTPS private key you cannot use Wireshark to sniff that traffic). (I copied this answer from … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)