« first day (4069 days earlier)      last day (865 days later) » 

user17382064
12:10 AM
I don't understand how to do it.
 
user17382064
12:20 AM
I think I got it.
 
user17382064
  function resetBackground(backgroundSelector) {
    const allBackgrounds = document.querySelectorAll(backgroundSelector);

    function hideBackground(background) {
      background.classList.add("bg1");
    }
    for (const background of allBackgrounds) {
      hideBackground(background);
    }
  }
 
user17382064
12:42 AM
vlaz, or kevin if you are there, how would I convert this forEach to for of?
 
user17382064
  function combinePlayerOptions(opts1 = {}, opts2 = {}) {
    const combined = Object.assign({}, opts1, opts2);
    Object.keys(opts1).forEach(function checkObjects(prop) {
      if (typeof opts1[prop] === "object") {
        combined[prop] = Object.assign({}, opts1[prop], opts2[prop]);
      }
    });
    return combined;
  }
 
user17382064
1:09 AM
This worked:
 
user17382064
  function combinePlayerOptions(opts1 = {}, opts2 = {}) {
    const combined = Object.assign({}, opts1, opts2);
    for (const prop of Object.keys(opts1)) {
      if (typeof opts1[prop] === "object") {
        combined[prop] = Object.assign({}, opts1[prop], opts2[prop]);
      }
    }
    return combined;
  }
 
4:46 AM
Can anyone tell about how tooltips are placed when there is no space left: Like I have made a tooltip(not using title), and when I hover on element it is shown on bottom of it. Now if I scroll up there is no space left at bottom and tooltip must show on top.
As we see in most sites that if no space left direction of tooltip changes
Does they use @media for that purpose or take distance from the end points and check if it is visible or not for each direction left, right, top, bottom. And then change accordingly
 
 
1 hour later…
user17382064
6:00 AM
I’m supposed to place this somewhere: player.cover === cover();
 
user17382064
I don’t think I placed this correctly, or I did, and I’m supposed to do something else.
 
user17382064
  function getWrapper(cover) {

    function isCover(player) {
      player.cover === cover();
    }

    const index = players.findIndex(isCover);
  }
 
user17382064
I need to do a comparison to check if player.cover equals cover.
 
user17382064
Is there someone who can help me with that.
 
user17382064
vlaz, kevin
 
user17382064
6:12 AM
I don't thiink this is right.
 
user17382064
  function getWrapper(cover) {

    function isCover(player) {

      if (player.cover === "cover") {}
    }

    const index = players.findIndex(isCover);
  }
 
user17382064
7:02 AM
all I need to do is to return the comparison from the function.
 
user17382064
How do I do that in here?
 
user17382064
  function getWrapper(cover) {

    function isCover(player) {
     player.cover === cover;
    }

    const index = players.findIndex(isCover);

  }
 
user17382064
What does that mean I need to do?
 
user17382064
7:16 AM
I don't understand how to return the comparison from the function
 
9:17 AM
return player.cover === cover ...
also holy fucking vamp
 
9:40 AM
Hey guys need a small help on JS.
Is there a way to clear the append data without deleting the first element on which the remaining data is being appended?


For ex. $('#_name').append("<hr>" + result['name'].join("<hr>"))

In html :
<th id="_name" colspan="70">Name</th>
Now I want to remove the appended data without removing the "Name" part
 
@senarijit1618 Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
I don't want the whole table column be deleted only want to delete the appended items
 
 
4 hours later…
user17382064
1:38 PM
I don’t understand how to return the comparison from the function.
 
user17382064
Starting from here: jsfiddle.net/r0z746wh
 
user17382064
function findPlayers() {
    const allCovers = document.querySelectorAll(".cover");
    const allWrappers = document.querySelectorAll(".wrap");
    covers.forEach(function addToPlayers(cover, index) {
      players.push({
        "cover": cover,
        "wrapper": allWrappers[index]
      });
    });
  }

  //callback syntax
  function getWrapper(cover) {
    function isCover(player) {
    player.cover === cover
    }

    const index = players.findIndex(isCover);
  }
 
2:27 PM
I have a react component:
const NoResults = ({ initialized: boolean }) => initialized
    ? <div className="no-results">No Results</div>
    : null
and tsc throws:
error TS2304: Cannot find name 'initialized'.

231 const NoResults = ({ initialized: boolean }) => initialized
Does anyone know what I'm missing?
 
2:42 PM
Oh I needed:
interface NoResultsProps {
  initialized: boolean,
}

const NoResults = ({ initialized }: NoResultsProps) => initialized
    ? <div className="no-results">No Results</div>
    : null
 
 
2 hours later…
4:24 PM
@senarijit1618 just give a special class for special needed element(sorry for that just add class to appended element) and than remove all elements related to that class when event take place like button clicked (btn assigned to remove them). If 1 by 1 removal than you can see this question: This is a link to question.
Caution: Linked question has no specific class added to appended element and just to give a start. So a little bit extra work has to be done if wanted 1 by 1 removal else name will also be removed in it
 
 
5 hours later…
9:44 PM
posted on December 06, 2021 by Srinivas Sista

The Stable channel has been updated to 96.0.4664.93 for Windows, Mac and Linux which will roll out over the coming days/weeks. Extended stable channel has also been updated to 96.0.4664.93 for Windows and Mac which will roll out over the coming days/weeks A full list of changes in this build is available in the log. Interested in switching release channels? Find out how here. If you find a new

 

« first day (4069 days earlier)      last day (865 days later) »