Sste
Sste
KPCKevin Powell - Community
Created by Sste on 5/29/2024 in #front-end
Data from API is displaying in the console but not in the DOM, why?
No description
16 replies
KPCKevin Powell - Community
Created by Sste on 11/28/2023 in #front-end
I can't see my images
No description
1 replies
KPCKevin Powell - Community
Created by Sste on 11/26/2023 in #front-end
Put text and image side by side
No description
1 replies
KPCKevin Powell - Community
Created by Sste on 9/18/2023 in #front-end
google extension to extract words from every websites everytime I click in it
hi, I want to make a google extension to extract words from every websites everytime I click in a certain word inside the page. And I want it to popup it as a list of words. But I don't know what i wrong with my code so I don't achieve what I want. popup.js
document.addEventListener('DOMContentLoaded', () => {
const wordList = document.getElementById('word-list');

chrome.runtime.sendMessage({ action: 'getWords' }, (response) => {
const { words } = response;
words.forEach((word) => {
const listItem = document.createElement('li');
listItem.textContent = word;
wordList.appendChild(listItem);
});
});
});
document.addEventListener('DOMContentLoaded', () => {
const wordList = document.getElementById('word-list');

chrome.runtime.sendMessage({ action: 'getWords' }, (response) => {
const { words } = response;
words.forEach((word) => {
const listItem = document.createElement('li');
listItem.textContent = word;
wordList.appendChild(listItem);
});
});
});
content.js
function extractWords() {
const textContent = document.body.innerText;
const words = textContent.split(/\s+/).filter((word) => /^[a-zA-Z]+$/.test(word));
return words;
}

const words = extractWords();
chrome.runtime.sendMessage({ action: 'updateWords', words });
function extractWords() {
const textContent = document.body.innerText;
const words = textContent.split(/\s+/).filter((word) => /^[a-zA-Z]+$/.test(word));
return words;
}

const words = extractWords();
chrome.runtime.sendMessage({ action: 'updateWords', words });
background.js file
let extractedWords = [];

chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.action === 'updateWords') {
extractedWords = extractedWords.concat(message.words);
chrome.storage.local.set({ words: extractedWords });
}

if (message.action === 'getWords') {
sendResponse({ words: extractedWords });
}
});
let extractedWords = [];

chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.action === 'updateWords') {
extractedWords = extractedWords.concat(message.words);
chrome.storage.local.set({ words: extractedWords });
}

if (message.action === 'getWords') {
sendResponse({ words: extractedWords });
}
});
1 replies
KPCKevin Powell - Community
Created by Sste on 6/26/2023 in #back-end
why else statement runs even if the if statement being true?
No description
13 replies
KPCKevin Powell - Community
Created by Sste on 6/21/2023 in #front-end
Codewar challenge
56 replies
KPCKevin Powell - Community
Created by Sste on 5/17/2023 in #front-end
How React ROUTER works??
11 replies
KPCKevin Powell - Community
Created by Sste on 5/12/2023 in #front-end
Clear input field after click in the button
56 replies
KPCKevin Powell - Community
Created by Sste on 5/5/2023 in #front-end
Container with different size from others
I want all container with the same size here. However, the last one container (with the t-shirts icon) has a different size compared to the others. I believe it's because of the word length... How can I solve it? https://codepen.io/ssstephanyyy/pen/rNqYYqE
15 replies
KPCKevin Powell - Community
Created by Sste on 5/4/2023 in #front-end
Problem with margin
Hi people 👋. I am having problem when I am trying to put the .quantity-category (which is the quantity of the product) aligned in the top right corner using margin, mostly because when I use margin, the container width increases as well, and I don't want this to happen. What is happening? And how can I solve it? https://codepen.io/ssstephanyyy/pen/rNqYYqE
19 replies
KPCKevin Powell - Community
Created by Sste on 4/26/2023 in #front-end
Getting this ERROR when trying to play a music
I am getting this error in the console everytime I try to play a song when my timer is up. How can I do to solve it? DOMException { code: 0, name: "NotAllowedError", message: "play() can only be initiated by a user gesture.", INDEX_SIZE_ERR: 1, DOMSTRING_SIZE_ERR: 2, … }
if (time < 0) {
clearInterval(interval);
text.innerHTML = 'Time is up!';

let audio = new Audio('Download/Homer Simpson Woohoo Sound FX.mp3');
audio.play();
}
if (time < 0) {
clearInterval(interval);
text.innerHTML = 'Time is up!';

let audio = new Audio('Download/Homer Simpson Woohoo Sound FX.mp3');
audio.play();
}
22 replies
KPCKevin Powell - Community
Created by Sste on 4/26/2023 in #front-end
Problem with a button
I am having problem with the "pomodoro" button. The standard of pomodoro is 25 minutes, but when I click in the 'short break' button or in the 'long break' button and then I try to come back to the pomodoro button which is 25 minutes and simply don't work. What is the problem and how can I solve it? https://codepen.io/Sstephanyyy/pen/MWPmaNo
30 replies
KPCKevin Powell - Community
Created by Sste on 4/20/2023 in #front-end
Timer is BUGGED
Hey, I am trying to build a Pomodoro clock. When I click in the "start" button everything works perfectly and the times begin from 25:00min until 00:00. And when I click in the "paused" button, it pauses as expected. BUT, if I click multiple times in the start/paused button, it starts behavior strangely, like the timer start and stop rapidly or skips over parts of the countdown altogether, mostly in the seconds... How can I solve it? https://codepen.io/ssstephanyyy/pen/vYVydRz
21 replies
KPCKevin Powell - Community
Created by Sste on 4/10/2023 in #front-end
Manipulate OBJECTS
In this object of users, I want to find to the person who has manu skills in the user object to the person who has less skills. Could you explain in detail how could I make this??
const users = {
Alex: {
skills: ['HTML', 'CSS', 'JavaScript'],
age: 20,
isLoggedIn: false,
points: 30
},
Asab: {
skills: ['HTML', 'CSS', 'JavaScript', 'Redux', 'MongoDB', 'Express', 'React', 'Node'],
age: 25,
isLoggedIn: false,
points: 50
},
Brook: {
skills: ['HTML', 'CSS', 'JavaScript', 'React', 'Redux'],
age: 30,
isLoggedIn: true,
points: 50
},
Daniel: {
skills: ['HTML', 'CSS', 'JavaScript', 'Python'],
age: 20,
isLoggedIn: false,
points: 40
},
John: {
skills: ['HTML', 'CSS', 'JavaScript', 'React', 'Redux', 'Node.js'],
age: 20,
isLoggedIn: true,
points: 50
},
Thomas: {
skills: ['HTML', 'CSS', 'JavaScript', 'React'],
age: 20,
isLoggedIn: false,
points: 40
},
Paul: {
skills: ['HTML', 'CSS', 'JavaScript', 'MongoDB', 'Express', 'React', 'Node'],
age: 20,
isLoggedIn: false,
points: 40
}

}
const users = {
Alex: {
skills: ['HTML', 'CSS', 'JavaScript'],
age: 20,
isLoggedIn: false,
points: 30
},
Asab: {
skills: ['HTML', 'CSS', 'JavaScript', 'Redux', 'MongoDB', 'Express', 'React', 'Node'],
age: 25,
isLoggedIn: false,
points: 50
},
Brook: {
skills: ['HTML', 'CSS', 'JavaScript', 'React', 'Redux'],
age: 30,
isLoggedIn: true,
points: 50
},
Daniel: {
skills: ['HTML', 'CSS', 'JavaScript', 'Python'],
age: 20,
isLoggedIn: false,
points: 40
},
John: {
skills: ['HTML', 'CSS', 'JavaScript', 'React', 'Redux', 'Node.js'],
age: 20,
isLoggedIn: true,
points: 50
},
Thomas: {
skills: ['HTML', 'CSS', 'JavaScript', 'React'],
age: 20,
isLoggedIn: false,
points: 40
},
Paul: {
skills: ['HTML', 'CSS', 'JavaScript', 'MongoDB', 'Express', 'React', 'Node'],
age: 20,
isLoggedIn: false,
points: 40
}

}
28 replies
KPCKevin Powell - Community
Created by Sste on 4/6/2023 in #front-end
Position absolute DOESN'T work
22 replies
KPCKevin Powell - Community
Created by Sste on 4/5/2023 in #front-end
Keeping getting the push ERROR
69 replies
KPCKevin Powell - Community
Created by Sste on 4/4/2023 in #front-end
How to ADD multiple tasks
I'm creating a to do list. I want to create a new task every time I click in the button ("ADICIONAR TAREFAS" - this mean add task in english). But when I click in the button at this moment, it doesn't create a new task, just edit the one that already exist. Here is the full code: https://codepen.io/ssstephanyyy/pen/yLRBOQV
24 replies
KPCKevin Powell - Community
Created by Sste on 3/28/2023 in #front-end
If statement is NOT working
76 replies