0

I was looking for a way that my custom extenison runs a site defined function and returns its value for my later use in the extensions content script.

This is a very handy solution that I found and it executes the site defined function:

location.href="javascript:siteFunction(); void 0";

source: How to call functions in the original page(tab) in Chrome Extensions

But this only executes sites function and thats it, the function that I need returns the value I need later in my code. How can I get that value to be remembered for that later use?

Edit: For example, that site function returns a boolean value, and in my code I have an if that checks which of those is it, and then it runs the code needed.

Community
  • 1
  • 1
Luka Čelebić
  • 1,083
  • 11
  • 21

0 Answers0