tshaddix / webext-redux-examples Goto Github PK
View Code? Open in Web Editor NEWExamples using webext-redux from SoCal ReactJS meetup.
License: MIT License
Examples using webext-redux from SoCal ReactJS meetup.
License: MIT License
I based my project off of this boilerplate, but was stuck for several hours due to the packages in package.json being quite old. They should be updated, and the code should be updated to go along with it.
I'll probably work on this myself in the next few days if I have time.
I am working with the clicker-key example and i want to figure out how to inject a script that reads the youtube player current time and sends it per message to my redux store.
Im trying so many things but i somehow have issues injecting scripts into the body of the page.
The only way it seems to work is like this:
const script = document.createElement('script');
script.type = "text/javascript";
script.text = "const player = document.getElementById('movie_player'); console.log(player.getCurrentTime());";
document.body.insertBefore(script, document.body.childNodes[0]);
Every other approach, either gives me an "getCurrentTime() is not a function", or "is not a valid DOM element", or issues with importing the React module.
Any suggestions for a proper solution to get the curretn youtube player time on a click event with sendMessage from the popup interface?
Would help me a lot, been batteling myelf with this problem for days.
Thanks a lot
how do i properly communicate from popup to content?
Guys, how can I debug extension in browser? I would like to have access to source code from chrome console, is it possible?
It appears that every time I pop the popup.html or when the content-script runs for the first time in a tab, the function :
const mapStateToProps = (state) => {
return {
count: state.count
};
};
executes 2 times. The first time, the props ( 'count' in this example) passes as undefined to the render function
render() {
console.log(this.props.count);
return (
<div>
Count: {this.props.count}
</div>
);
}
, and the second time it passes the normal value stored in the state.
Any idea what causes this issue?
After I download the project. installed all the dependencies and run the project it shows babel-register not loading error. still it runs but I can't use spread operator. wherever I use spread operator application crashes. I need help please.
This is more a question than an issue, I would like to know what would be the development setup for these examples, I tried using boiler plates like this but it's all too convoluted for my use case.
Ideas?.
Thanks
I'm getting this following error:
Failed to load external module @babel/register
Requiring external module babel-register
fs.js:27
const { Math, Object } = primordials;
^
ReferenceError: primordials is not defined
at fs.js:27:26
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.