News for hackers. Stuff that matters.
Re:Only 90s web developers remember this (2014) by Ozzie_osman on Sunday November 21, 2021 @12:51PM (#29298150)
The awesome thing about that period was how we learned. You'd be on a web page, see something funky (positioning, rounded corners, etc) and be like "how the heck did they do that?".

Then you do the ol' "View Source" and now that technique is in your toolkit. In fact you'd prob head right over to your geocities site and try it out right away.

Re:Only 90s web developers remember this (2014) by theK on Sunday November 21, 2021 @01:06PM (#29298271)
Yeah this was awesome time and it did teach you more than just the trick, navigating unknown codebases, extracting the meaningful parts of a non trivial piece in f code…

I really think the web community lost something with the transition to compiled uglified js and css…. Sure google will show you to some code if you manage to put what you are looking for into words but that isn’t always easy. Pitty that there is no standardised solution to publish the source along with the Minimized script nowadays.

Re:Only 90s web developers remember this (2014) by 3np on Sunday November 21, 2021 @11:02PM (#29302577)
There is. Source Maps.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/So...

Can’t tell if you’re sarcastic or not, assuming not all comment readers will be aware either way.

Re:Only 90s web developers remember this (2014) by theK on Tuesday November 30, 2021 @05:41PM (#29398377)
Just for the record, source maps are awesome and (unfortunately) typically disabled on production. The original remark was criticism towards this practice.
Re:Only 90s web developers remember this (2014) by hajile on Monday November 22, 2021 @10:32AM (#29307414)
Very few sites ship source maps to production.
Re:Only 90s web developers remember this (2014) by nunez on Sunday November 21, 2021 @03:52PM (#29299597)
This is the thing I miss the most. View-Source was the source of truth. No JavaScript filling in empty <div>s bullshit, No minifying, no uglifying.
Re:Only 90s web developers remember this (2014) by laurent123456 on Monday November 22, 2021 @04:30AM (#29304523)
For CSS and HTML it's still easy and even easier to do so by right clicking and selecting "Inspect element" (something we didn't have back then). I often do that to understand how a page is setup and I don't see what's so hard about it it.

For JS it's a different story of course but it was never that easy to begin with since the code that affects an element can be anywhere.

Re:Only 90s web developers remember this (2014) by goshx on Monday November 22, 2021 @12:22AM (#29303048)
Yes, and I hated who came up with the tableless websites lol
Re:Only 90s web developers remember this (2014) by dehrmann on Sunday November 21, 2021 @01:14PM (#29298337)
With developer tools, this has only gotten easier.
Re:Only 90s web developers remember this (2014) by jspash on Sunday November 21, 2021 @01:25PM (#29298441)
Except now it just shows

<html> <script src="obfuscated.javscript-pack.chunk-12384123.chunkittychunk-packweb.der.huhwhat?{this?:this-v3.2123-notcompatiblewithv3.2122}.js"> <div id="modern-web-app-goez-here"></div> </html>

Good luck with that!

Re:Only 90s web developers remember this (2014) by ornornor on Sunday November 21, 2021 @03:46PM (#29299545)
I’ve struggled for ever with modern pages to find out what even listeners are attached to particular html elements. Is that even possible to find out? Say you’re on a webpage, and when you click a button a bunch of JS happens. Except it’s all minifies uglified. But the browser must know what JS will run when clicking that button. How do I make it show me what that code/function is without trawling through the JS code and hunting for a CSS selector or ID?
Re:Only 90s web developers remember this (2014) by davidsojevic on Sunday November 21, 2021 @05:35PM (#29300460)
In Chrome you can get the event listeners for a given element by selecting/highlighting it in the Elements tab, then jumping across to the Console tab, you use:

  getEventListeners($0)
getEventListeners is a Chrome console/devtools only function and $0 is a console placeholder variable for the currently selected element.

It's definitely not the nicest way to find things and you often end up running into the minified/uglified madness when delving deeper, but sometimes it helps do the trick.

Re:Only 90s web developers remember this (2014) by jraph on Sunday November 21, 2021 @04:12PM (#29299785)
At least Firefox makes it easy to show which listeners are on which elements in the Web Developers tools. <old schmuck>The thing that looks like Firebug anyway.</old schmuck>

That you'll be able to actually read the code is another completely different story.

Re:Only 90s web developers remember this (2014) by vntok on Sunday November 21, 2021 @02:11PM (#29298828)
What developer tools doesn't show you the generated html? Are you using a major web browser?
Re:Only 90s web developers remember this (2014) by Oddskar on Sunday November 21, 2021 @03:23PM (#29299367)
Just seeing the generated HTML is trying to figure out the blueprint of the building by looking at the facade.

Sure there's source map files, but most of the time you'll fine those aren't distributed together with the minified bundles.

Re:Only 90s web developers remember this (2014) by p2p_astroturf on Sunday November 21, 2021 @12:52PM (#29298157)
AKA the web was always a bunch of cargo cult, NIH about the most basic computer programming tasks, etc.