These are chat archives for FreeCodeCamp/HelpJavaScript

28th
Feb 2018
AbrisM
@AbrisM
Feb 28 02:57
Does anyone know the DNS for Amazon? I've looked everywhere but its been listed as private?
Just looking for their IP
Gulsvi
@gulsvi
Feb 28 03:09
@AbrisM Amazon does not offer a public DNS like OpenDNS or GoogleDNS
LydaTech
@lydatech
Feb 28 03:12
@gulsvi Amazon Route 53 but its not a free service
AbrisM
@AbrisM
Feb 28 03:52
I found the IP
Christopher McCormack
@cmccormack
Feb 28 03:55
@AbrisM if you ever need it, I made this tool a while back for work... https://codepen.io/cmccormack/pen/PKpXrO
AbrisM
@AbrisM
Feb 28 04:33
@cmccormack Thanks, what I got is amazon starts with a 54. xxx.xxx.xxx address
CamperBot
@camperbot
Feb 28 04:33
abrism sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1350 | @cmccormack |http://www.freecodecamp.org/cmccormack
AbrisM
@AbrisM
Feb 28 04:34
Also, can anyone explain why a boolean value in Java is not 0 or 1 unlike C++?
https://www.homeandlearn.co.uk/java/boolean_values.html I've looked at several sources and it looks like the boolean in java is treated seperately, so its not like an int in C++
Kinda dumb, because if x==y then it could be 1==1
Claudio Restifo
@Marmiz
Feb 28 04:45

@AbrisM but int and bool are two different data type in Cpp as well.

than a boolean can be casted to an int, but I assume the same holds true for java as well.

Quantomistro3178
@Quantomistro3178
Feb 28 07:12
function findLongestWord(str) {
  var arr = str.split(" ");
  return arr.reduce(function(acc, current) {
    if (current.length > acc.length) {return current;} else {return;}
  });
}

findLongestWord("The quick brown fox jumped over the lazy dog");
TypeError: Cannot read property 'length' of undefined
abraham anak agung
@padunk
Feb 28 07:15
@Quantomistro3178 your else is undefined and remember you need to return the length
ramesh
@rameshkrr
Feb 28 07:17
Can some on help me with kncokout js in magento 2
Quantomistro3178
@Quantomistro3178
Feb 28 07:26
@padunk Yeah but why can't it read the length property?
abraham anak agung
@padunk
Feb 28 07:26
@Quantomistro3178 it can, but what if your if condition goes false? it will go undefined, so your acc is undefined for the next iteration
Quantomistro3178
@Quantomistro3178
Feb 28 07:28
@padunk ah, got it
thanks
function findLongestWord(str) {
  var arr = str.split(" ");
  return arr.reduce(function(acc, current) {
    if (current.length > acc.length) {return current.length;} else {return acc.length;}
  });
}

findLongestWord("The quick brown fox jumped over the lazy dog");
still shows the same error
@padunk
abraham anak agung
@padunk
Feb 28 07:31
@Quantomistro3178 do you know how reduce work? if you return the length, the acc become a number. and your next iteration is comparing the number length and the string length
number don't have length
your first function is close, just return acc on the else statement and you got to work a little more to get it done
Quantomistro3178
@Quantomistro3178
Feb 28 07:33
@padunk ok, i'll try. thanks
CamperBot
@camperbot
Feb 28 07:33
:cookie: 459 | @padunk |http://www.freecodecamp.org/padunk
quantomistro3178 sends brownie points to @padunk :sparkles: :thumbsup: :sparkles:
Sweet Coding :)
@SweetCodingInc
Feb 28 07:33
@Quantomistro3178 Yes.. what @padunk said.
the thing you return from reduce becomes acc for the next iteration
so if you return a number, .length won't work on it
Quantomistro3178
@Quantomistro3178
Feb 28 07:34
@SweetCodingInc Yeah, I got it to work. just added .length after .reduce
and changed acc.length to just acc
Sweet Coding :)
@SweetCodingInc
Feb 28 07:35
@Quantomistro3178 Also, you could chain the .split and .reduce
abraham anak agung
@padunk
Feb 28 07:36
@Quantomistro3178 yeah, just chain it all and arrow function and ternary, you got one liner :smile:
Quantomistro3178
@Quantomistro3178
Feb 28 07:36
@SweetCodingInc Really? I was trying to improve my previous solution
and trying to practice reduce.
@padunk I've never used those....guess I'll go try that now.
Sweet Coding :)
@SweetCodingInc
Feb 28 07:37
function findLongestWord(str) {
  return str.split(' ')
    .reduce( (acc, current) => acc.length > current.length? acc : current);
}

findLongestWord("The quick brown fox jumped over the lazy dog");
Quantomistro3178
@Quantomistro3178
Feb 28 07:38
where do I add esversion:6 to make it work?
abraham anak agung
@padunk
Feb 28 07:38
@SweetCodingInc you forget .length at the end
@Quantomistro3178 just run it, i think i will work
Sweet Coding :)
@SweetCodingInc
Feb 28 07:40
@padunk I see.. Not sure about the challenge.. I just demonstrated chaining and ternary
Quantomistro3178
@Quantomistro3178
Feb 28 07:40
could you explain the acc : current part?
Sweet Coding :)
@SweetCodingInc
Feb 28 07:41
@Quantomistro3178 it's same as
return acc.length > current.length? acc : current);

// OR

if(acc.length > current.length){
  return acc;
} else {
  return current;
}
Quantomistro3178
@Quantomistro3178
Feb 28 07:42
So the first one is the value to return if the condition is true, and second one if it's false?
abraham anak agung
@padunk
Feb 28 07:43
yup
Quantomistro3178
@Quantomistro3178
Feb 28 07:44
@SweetCodingInc @padunk Thanks!
CamperBot
@camperbot
Feb 28 07:44
quantomistro3178 sends brownie points to @sweetcodinginc and @padunk :sparkles: :thumbsup: :sparkles:
api offline
:cookie: 321 | @sweetcodinginc |http://www.freecodecamp.org/sweetcodinginc
sabahatullah
@sabahatullah
Feb 28 08:55
challenge task, who can centrally align the second red bar with first red bar. right now its shifted little bit more towards left. The middle of second red bar should always be in the middle of the first redbar even when the width of bars are different
Fabien SHAN
@X140hu4
Feb 28 09:57
@sabahatullah pos1 - float gives you the size of the top red element. Then align pos2 on that
Johnny
@JohnnyBizzel
Feb 28 10:13
@sabahatullah I've done this using CSS grid: https://codepen.io/JohnnyBizzel/pen/NyeMYj
Adel
@AdelMahjoub
Feb 28 10:13
This works but not advised. @sabahatullah

/**
   * 
   * @param {HTMLElement} element 
   */
  HTMLElement.prototype.alignIn = function(element) {
    let width = this.getBoundingClientRect().width;
    let relativeX = element.getBoundingClientRect().left;
    this.style.position = 'absolute';
    this.style.left = ~~(relativeX + width / 2) + 'px';
  }

  const first = document.querySelector('#first');
  const second = document.querySelector('#second');

  second.alignIn(first);
sabahatullah
@sabahatullah
Feb 28 10:37
@JohnnyBizzel but you added the parent and some extra divs. it needs to be done through javascript/css only (sorry should have mentioned that :P)
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 28 10:54
hey all, I get an error Unexpected string in JSON at position 6575. what is this position referring to?
Adel
@AdelMahjoub
Feb 28 10:56
@ahmadabdolsaheb maybe a trailing comma
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 28 10:57
could be but I don't know where 6575 is. it cannot be the line nubmer
@AdelMahjoub
alpox
@alpox
Feb 28 10:58
@ahmadabdolsaheb If its not the linenumber its the column number (Horizontally)
Adel
@AdelMahjoub
Feb 28 10:58
@ahmadabdolsaheb it is not the line number, most of the time the json object is not correctly formatted
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 28 11:00
the thing is the document is 1600 lines, if i don't know where it is referring to it will take me hours to find the bug. @AdelMahjoub @alpox
alpox
@alpox
Feb 28 11:01
@ahmadabdolsaheb Is it created by hand?
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 28 11:02
yeah
Adel
@AdelMahjoub
Feb 28 11:02
@ahmadabdolsaheb yes, I got exactly the same error and the line number was always 6676, tho it was never referring to a line number, only solution is the help of your ide
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 28 11:02
@alpox
alpox
@alpox
Feb 28 11:02
@ahmadabdolsaheb I believe its the 6575th character :D
Adel
@AdelMahjoub
Feb 28 11:03
@ahmadabdolsaheb if the text editor don't show where the error is, if it is a formatting error, try to install an extension
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 28 11:04
@alpox @AdelMahjoub both great ideas. thanks
CamperBot
@camperbot
Feb 28 11:04
ahmadabdolsaheb sends brownie points to @alpox and @adelmahjoub :sparkles: :thumbsup: :sparkles:
:star2: 1564 | @alpox |http://www.freecodecamp.org/alpox
:cookie: 658 | @adelmahjoub |http://www.freecodecamp.org/adelmahjoub
Ken Haduch
@khaduch
Feb 28 14:40
@ahmadabdolsaheb - I don't know if this will help, but if you can take your JSON file and use some of the tools at https://codebeautify.org/jsonviewer, they have a "Validate" option - maybe that would give you some help?
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 28 14:49
thanks I validated my json and got a 1000 missed commas. @khaduch
CamperBot
@camperbot
Feb 28 14:49
ahmadabdolsaheb sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3762 | @khaduch |http://www.freecodecamp.org/khaduch
Ken Haduch
@khaduch
Feb 28 15:02
@ahmadabdolsaheb - I'm curious if you used the codebeautify.org site, or did you fix it beforehand? Just wanted to know if it was a useful tool...
Ahmad Abdolsaheb
@ahmadabdolsaheb
Feb 28 15:04
I fixed it before but it was a similar tool
JLuboff
@JLuboff
Feb 28 16:24
Thats a lot of missing commas..
Chris
@ConnectCodes
Feb 28 16:42
Hi guys, I am stuck on Symmetric Difference challenge : Create a function that takes two or more arrays and returns an array of the symmetric difference (△ or ⊕) of the provided arrays. I nested a reduce inside a reduce in order to access elements inside [1, 2, 5] and [2, 3, 5] adn use indexOf !== -1 to make sure values are unique before I send them to accumulator. My code simply flattens the arrays which is not useful.Any thoughts?
https://codepen.io/Codeconnect/pen/BmdELq?editors=0011
Christopher McCormack
@cmccormack
Feb 28 16:47
@ConnectCodes throw more console.logs into your code, see what it looks like at each step and determine where you have a conflict with your logic
JLuboff
@JLuboff
Feb 28 16:52
@cmccormack :wave:
Christopher McCormack
@cmccormack
Feb 28 16:52
@JLuboff yo
JLuboff
@JLuboff
Feb 28 16:52
What up
Christopher McCormack
@cmccormack
Feb 28 16:54
about to start debugging why my stupid webpack config is not creating my css file from my scss file
@JLuboff you?
JLuboff
@JLuboff
Feb 28 16:57
@cmccormack Fixing an error on my C# app reported by an user and testing out chalk for coloring my console.log messages in node
Christopher McCormack
@cmccormack
Feb 28 17:00
@JLuboff chalk is fun :)
JLuboff
@JLuboff
Feb 28 17:00
@cmccormack You approve then?
Christopher McCormack
@cmccormack
Feb 28 17:01
Sure why not - webpack and other tools use it why not @JLuboff
JLuboff
@JLuboff
Feb 28 17:01
Dunno.. I'm just dealing with a lot of console messages and need some color to decipher lol
Christopher McCormack
@cmccormack
Feb 28 17:04
Is it in a terminal or the browser?
JLuboff
@JLuboff
Feb 28 17:04
terminal
Christopher McCormack
@cmccormack
Feb 28 17:06
Any webpack pros in the room right now that may want to help me with an issue?
JLuboff
@JLuboff
Feb 28 17:08
chalk :heart:
Christopher McCormack
@cmccormack
Feb 28 17:10
I bet :)
JLuboff
@JLuboff
Feb 28 17:10
I currently have 34 console.log messages...so this will make things a little easier to decipher in my console window lol
Christopher McCormack
@cmccormack
Feb 28 17:12
Is this from user usage?
if so, you should consider a logging server
Super easy to setup
JLuboff
@JLuboff
Feb 28 17:14
Sorry, should be more specific, I have 34 console.log through my routes pages currently for my own logging purposes. Not going to be leaving most of them
It's more so that I can watch for errors as I continue
Each log isn't spitting out
Most of them are for errors which as long as I'm doing my job right...don't occur lol
Christopher McCormack
@cmccormack
Feb 28 17:16
Yeah I guess you can pick off log statements one by one as you improve the codebase
Pieter Stokkink
@forkerino
Feb 28 17:16
@cmccormack how does the relevant part of webpack config look?
Christopher McCormack
@cmccormack
Feb 28 17:17
@forkerino I think I figured out a major part of my issue - my entry was pointing to my App.jsx file instead of my index.js file, which contained the import for my css file which is my main issue right now
Basically my build is not spitting out the styles/styles.css to the public dir
JLuboff
@JLuboff
Feb 28 17:18
@cmccormack Thats the plan, remove them later (at least my connection closed messages). I'm debating if I throw an error or log errors though. Thinking log errors since I'm using pm2 for deployment which I can go check the logs periodically
@forkerino :wave:
Pieter Stokkink
@forkerino
Feb 28 17:19
:wave:
JLuboff
@JLuboff
Feb 28 17:20
Whats up?
Christopher McCormack
@cmccormack
Feb 28 17:21
@forkerino if you're interested the config is here and you can clone it if you like - https://github.com/cmccormack/aws-ip-ranges/blob/master/webpack.config.js
Pieter Stokkink
@forkerino
Feb 28 17:22
having a look
Christopher McCormack
@cmccormack
Feb 28 17:22
I feel like an idiot because I've done this a dozen times with no issue but now it won't create the styles folder in my build dir
Pieter Stokkink
@forkerino
Feb 28 17:23
@JLuboff I have a presentation at work tomorrow about Clean Software Architecture for the dev team. Fun!
JLuboff
@JLuboff
Feb 28 17:24
@forkerino Awesome! Sounds like the job has been a perfect fit for you
Pieter Stokkink
@forkerino
Feb 28 17:28
Yeah, it's still cool. Lot's of opportunity to learn.
@cmccormack cloning the repo to see what's up now
Christopher McCormack
@cmccormack
Feb 28 17:28
@forkerino thanks man
CamperBot
@camperbot
Feb 28 17:28
cmccormack sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:star2: 2984 | @forkerino |http://www.freecodecamp.org/forkerino
Pieter Stokkink
@forkerino
Feb 28 17:31
@cmccormack It embeds the css in the app.bundle.js
probably because you use it with import
Christopher McCormack
@cmccormack
Feb 28 17:31
extract text webpack plugin is supposed to get around that though
Pieter Stokkink
@forkerino
Feb 28 17:31
No webpack expert myself
Christopher McCormack
@cmccormack
Feb 28 17:32
but yeah... now that my entry is correct there must be something wrong with that plugin. At least it's got the styles now!
Onome Sotu
@onomesotu
Feb 28 17:37
Hey guys, does anyone know if there is a method to convert binary to unicode characters?
for example String.fromCharCode(65); returns A
Is there a method that takes binary instead of decimal?
Pieter Stokkink
@forkerino
Feb 28 17:39
@cmccormack I have no idea why it would do it like that. We have a separate entry for scss (i.e. we don't import it) and it correctly builds in the right path. Otherwise our code is the same.
Christopher McCormack
@cmccormack
Feb 28 17:39
if you don't import it how does webpack know about it?
is it in your entry?
Pieter Stokkink
@forkerino
Feb 28 17:40
yes
Christopher McCormack
@cmccormack
Feb 28 17:43
ah ok
well dang, I'll try adding to my entry for now but I really wish I knew how to debug why it's not being built like it has for all my other projects using a similar config
Thanks again @forkerino
CamperBot
@camperbot
Feb 28 17:44
cmccormack sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
api offline
Christopher McCormack
@cmccormack
Feb 28 17:44
probably something stupid
@onomesotu String.fromCharCode does take binary
@onomesotu
> 0b1000001
65
> String.fromCharCode(0b1000001)
'A'
JLuboff
@JLuboff
Feb 28 17:49
Are you talking to an invisible person (or did they delete there comment)
Christopher McCormack
@cmccormack
Feb 28 17:49
haha I see a comment :point_up: February 28, 2018 10:37 AM
unless Gitter borked
JLuboff
@JLuboff
Feb 28 17:50
Ohhh haha it blended in
Christopher McCormack
@cmccormack
Feb 28 17:53

@forkerino I figured it out! I'm an idiot is the problem, I refactored my dev/prod flags and forgot to actually map the properties properly:

const { prod=false, dev=false } = env

should have been

const { production: prod=false, development: dev=false } = env

/doh

@JLuboff haha yeah I barely saw it myself
JLuboff
@JLuboff
Feb 28 17:56
Oh man, chalk makes things so much nicer haha
Pieter Stokkink
@forkerino
Feb 28 17:57
@cmccormack :clap:
Nazar
@IsaakNazar
Feb 28 17:58
@cmccormack I've changed const to var, and added items = [] and everything works perfect as I wanted. But do you think is it a good decision to change const to var?
var items = JSON.parse(localStorage.getItem('items')) || [];

function clearAll(){
    while (itemsList.firstChild){
      itemsList.removeChild(itemsList.firstChild);
    }
    items = [];
    localStorage.removeItem('items');
  }
JLuboff
@JLuboff
Feb 28 18:00
@IsaakNazar Not sure the issue before, but once you set a const you can't reassign it,so that would have caused an error before if you were tryingto change it inside your function
Christopher McCormack
@cmccormack
Feb 28 18:01
@IsaakNazar you can use let instead if you wanted, but you're not required to keep everything as a const. However, if you want to use const everywhere you will need to step back and consider how your code is arranged
Slomon80
@Slomon80
Feb 28 18:01
Pk
Christopher McCormack
@cmccormack
Feb 28 18:02
@IsaakNazar you could even keep it as a const and just remove all items using a loop, or set the length property to 0 if you wanted
@IsaakNazar is this a React app? I can't remember
Nazar
@IsaakNazar
Feb 28 18:03
@cmccormack I've never used let , But I think I should
@cmccormack no, its just challenge from youtube tutorials
@cmccormack and thank you , I rechanged back again to const and like you said made items.length = 0 and everyting works perfectly, thx again :+1:
CamperBot
@camperbot
Feb 28 18:05
isaaknazar sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1352 | @cmccormack |http://www.freecodecamp.org/cmccormack
Christopher McCormack
@cmccormack
Feb 28 18:05
@IsaakNazar :thumbsup:
Do note that the values will still be in your array, but common methods of Array won't try to access them because of the length
and you'll be overriding them as needed
Nazar
@IsaakNazar
Feb 28 18:06
ok, I hope its a smart decision :smile:
Christopher McCormack
@cmccormack
Feb 28 18:06
if it works it's probably fine
Nazar
@IsaakNazar
Feb 28 18:17
@cmccormack
so when I using const I cant reassing it , but I can change its properties, right?
Christopher McCormack
@cmccormack
Feb 28 18:18
@IsaakNazar correct
Nazar
@IsaakNazar
Feb 28 18:18
ok @cmccormack cool, :+1:
Christopher McCormack
@cmccormack
Feb 28 18:18
@IsaakNazar objects/arrays are references in memory so you can change the internals
Onome Sotu
@onomesotu
Feb 28 19:35
The last intermediate javascript exercise for me is the steamroller
I need to flatten out all the nested arrays..
function steamrollArray(arr) {
  return arr.reduce((a, b) => a.concat(b), []);
}
Markus Kiili
@Masd925
Feb 28 19:36
@onomesotu The easiest way is to use recursion.
Onome Sotu
@onomesotu
Feb 28 19:36
This does not work because concat does not recursively join nested array
@Masd925 ah.. I was thinking that
Markus Kiili
@Masd925
Feb 28 19:37
@onomesotu You can try using steamrollArray to flatten the inner arrays.
Onome Sotu
@onomesotu
Feb 28 19:37
ok.. thanks i will try it out
Markus Kiili
@Masd925
Feb 28 19:37
@onomesotu There are also non-recursive ways that work with any nesting depth, but they are more tricky.
Onome Sotu
@onomesotu
Feb 28 19:39
yeah, I say array.prototype.flatten but you have to tell it the depth which I think will be another long winding code
I will try recursion now
Gulsvi
@gulsvi
Feb 28 19:44

@gulsvi Amazon Route 53 but its not a free service

@lydatech Route 53 is not a public DNS service - paid for or not

It's authoritative DNS, helping domain owners publish DNS records - not something that end users access to resolve named addresses into IP Addresses
LydaTech
@lydatech
Feb 28 19:47
@gulsvi Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. It is designed to give developers and businesses an extremely reliable and cost effective way to route end users to Internet applications by translating names like www.example.com into the numeric IP addresses
Gulsvi
@gulsvi
Feb 28 19:48
Right. it is not a public DNS Service
Authoritative vs. Recursive DNS
Uggh, you just copy/pasted that from here: https://aws.amazon.com/route53/
LydaTech
@lydatech
Feb 28 19:51
@gulsvi Correct. That says it all
Adel
@AdelMahjoub
Feb 28 20:26
there is a game development books bundle 3 of them using javascript , not too old should be still relevant
Christopher McCormack
@cmccormack
Feb 28 20:41
@AdelMahjoub They have such great deals on books I'll probably never get through the bundles I've already purchased :)
Adel
@AdelMahjoub
Feb 28 20:43
@cmccormack :laughing: happens to me too, always buying books but only get through of a couple of them
Tiago Correia
@tiagocorreiaalmeida
Feb 28 20:49
hey guys
a quick question, imagine you are building a admin platform, that only has an user, how would the first user be created? a direct insert into the db or there's better pratices?
Christopher McCormack
@cmccormack
Feb 28 20:55
@tiagocorreiaalmeida Good question, not sure
I imagine you would want to have a super admin
Tiago Correia
@tiagocorreiaalmeida
Feb 28 20:55
yeah this one came around my head this afternoon and im almost going to bed and still's here :D
there's gonna be a single account for now
Christopher McCormack
@cmccormack
Feb 28 20:56
Probably something like a super admin that's manually created, which is the only one that can make a new admin, while other admins can promote standard users to admins if given the rights to do so
Tiago Correia
@tiagocorreiaalmeida
Feb 28 20:57
and how would you create the super admin? a insert into the db?
Christopher McCormack
@cmccormack
Feb 28 20:58
hmm maybe have the user details in your .env file and when the app loads if that account doesn't exist, create it. That way it will run through your validators and all that as well
Again, never done this, just thinking out loud :)
Tiago Correia
@tiagocorreiaalmeida
Feb 28 20:59
could also be an idea when the server start's running check if there's an user if not create it?
Pieter Stokkink
@forkerino
Feb 28 20:59
I guess usually you bootstrap the app with some setup process (try installing wordpress somewhere and see how it is done: they ask to provide some info for the admin), but creating a default user and asking first thing to change the password would be a good thing.
Adel
@AdelMahjoub
Feb 28 21:01
@tiagocorreiaalmeida if there is roles in the db, register a regular user then manually change to admin role, there is always an admin with super powers
Tiago Correia
@tiagocorreiaalmeida
Feb 28 21:02
nah its going to be a solo user so I think the idea from @cmccormack and @forkerino will make it not quite sure if still the best option but its a good one
Adel
@AdelMahjoub
Feb 28 21:02
@tiagocorreiaalmeida but as @forkerino suggested, wordpress installation is a good example
Abdulah Hamzic
@hamzicabdulah
Feb 28 21:14
Hey, guys. Does anyone know of a way to see what JS code runs upon file upload on a specific webpage in Chrome? For example, I'd like to see which global JS variables exactly get changed and to what values immediately when I upload an image on this page https://www.redbubble.com/portfolio/images/new?ref=account-nav-dropdown
LydaTech
@lydatech
Feb 28 21:35
@tiagocorreiaalmeida I can give you more detailed info on the process. PM me
@hamzicabdulah you sure its javascript you want to track and not server side?
Abdulah Hamzic
@hamzicabdulah
Feb 28 21:54
Yeah, I just want to know which functions are getting called on the front end @lydatech
As far as server side, I just need to know which requests are being sent, but tht's easy
in this case, I want to know which functions are called when I upload a file, so that I can call them manually
Abdulah Hamzic
@hamzicabdulah
Feb 28 21:59
do you have any ideas @lydatech
Gulsvi
@gulsvi
Feb 28 22:09
@hamzicabdulah In Chrome's debugger, click Sources, in the right-hand sidebar you'll see "Event Listener Breakpoints". Go to Mouse -> Click. When you click on the upload button, you'll see what code is run.
It's likely minified code, but may give you an idea of what's going on
JLuboff
@JLuboff
Feb 28 22:18
Nothing like doing a presentation on your project only for parts of it to not work :(
Gulsvi
@gulsvi
Feb 28 22:20
Some of the best projects have been presented that way!
JLuboff
@JLuboff
Feb 28 22:21
Stupid case sensitivity got me :(
Brad
@bradtaniguchi
Feb 28 22:21
I think all my projects are presented that way :P
Classic presentation gone wrong
JLuboff
@JLuboff
Feb 28 22:22
"That must be why we aren't shipping Windows 98 yet" :joy:
Gulsvi
@gulsvi
Feb 28 22:22
LOL
LydaTech
@lydatech
Feb 28 22:26
@hamzicabdulah yes you can watch what is happening in dev tools
Adel
@AdelMahjoub
Feb 28 22:32
@hamzicabdulah
“Is the dark side stronger?” Luke asks.
“No, no, no,” Yoda assures him. “Quicker, easier, more seductive.”