The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 22, 2019, 04:50:15 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Javascript Snippet Chrome Extension  (Read 2147 times)
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« on: May 24, 2014, 12:22:12 PM »

Hey does anyone know of a chrome, or firefox extension that creates a snippet from elements?  I like the SnappySnippet chrome extension but it doesn't grab javascript code.  Anyone know how I can grab the javascript for this site http://m.homedepot.com/? lol thanks,
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: May 25, 2014, 11:32:10 AM »

A little confused ... why can't you write a a wget or curl quick script to grab the site and all the links then the JS? Worst case you could look at the code, see if it calls something else and call it manually yourself.

I you look in the source you can often see where they call it, go to another browser window and just paste that URL and you'll get it as plain text.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #2 on: May 26, 2014, 09:23:30 AM »

Now im confused lol.  I just got this book "A smarter way to code Javascript" so its a beginner your talking to.  I am kinda stuck.  I kinda have the site almost copied lol Here is what i have so far:
http://shopping.sandbox.netsuite.com/s.nl/c.1256124/it.A/id.19091/.f
Logged
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #3 on: May 26, 2014, 09:25:10 AM »

Here is the page im working on making it look like http://m.homedepot.com/p/Miracle-Gro-1-cu-ft-Garden-Soil-for-Flowers-and-Vegetables-73451430/204502222/
Logged
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #4 on: May 26, 2014, 09:26:51 AM »

I like snippysnippet cause it breaks it up into pieces.  I like doing things in baby steps.  Does that make sense?
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #5 on: May 26, 2014, 10:01:12 AM »

Totally makes sense, but not sure that's the best way to learn.

When you say, "beginner" - are you a programmer learning a new language, or new to programming? If you are new to programming in general then that's a pretty hard way to learn to code.

Mu suggestion would be to put the immediate display tricks you're trying to do on hold and grab a book about jQuery to compliment your Javascript work. All the tricks you're trying to do there will be vastly easier with that tool under your belt. Get two actually - a beginners guide and then perhaps a jQuery cookbook or solutions book. They will have lots and lots of example of the various things you're trying to do. I use jQuery extensively now on y client-side stuff and it makes things WAY WAY easier. The learning curve will be just a titch steeper than just Javascript (as a language) - but the learning/execution cycle for actual production tricks will be considerably shorter.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #6 on: May 26, 2014, 11:02:38 AM »

I wouldn't call myself a programmer. I am more of a hacker. I just grab other peoples code and tweak it to look how I want.  What jquery book do you recommend? 

Thanks,
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #7 on: May 26, 2014, 12:26:07 PM »

For instructions and tutorial, I'd look here http://www.amazon.com/JavaScript-jQuery-David-Sawyer-McFarland/dp/1449399029/ref=sr_1_4?s=books&ie=UTF8&qid=1401132005&sr=1-4&keywords=jquery and here http://www.amazon.com/jQuery-Novice-Ninja-Earle-Castledine/dp/0987153013/ref=sr_1_12?s=books&ie=UTF8&qid=1401132005&sr=1-12&keywords=jquery

The first one is going to be slightly better (IMO) for the more experienced, the second one should be for the beginner to reasonable experience. For recipes and pre-built solutions I'd look here:

http://www.amazon.com/jQuery-Cookbook-Solutions-Examples-Developers/dp/0596159773/ref=sr_1_8?s=books&ie=UTF8&qid=1401132005&sr=1-8&keywords=jquery
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #8 on: May 27, 2014, 04:08:48 PM »

Thanks!  I ordered "jQuery: Novice to Ninja". 

Is there any firefox addons/chrome extensions or free desktop/online tools that will take compacted code(.css and/or .js files) that have no spaces and reformat it to something readeable with tabs and/or spaces in between each css class, script var, etc?

Thanks,
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #9 on: May 28, 2014, 12:36:38 AM »

http://jsbeautifier.org/

Should get you where you want to go.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #10 on: June 03, 2014, 07:33:05 AM »

Does anyone know of a site that(http://jsbeautifier.org/) is like that but for CSS?  It would be nice to have that bookmarklet that you can use on any page and grab the css.
   
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #11 on: June 16, 2014, 11:07:15 AM »

http://html.fwpolice.com/css/

Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!