Author Options:

GreaseMonkey Script for Instructables - Auto-All Steps - Download it Now! Answered

I whipped this up, still needs work, but it works (sorta)...
You can download it here

Now, on the Explore pages, it will automatically take you to All Steps instead of the Intro step when you click on a link.

I'm considering this open-source, so PLEASE post modifications, again I literally spent 2 minutes on this - including debug/testing time.
I know you are saying "duh its open source, its a script! moron" But what I mean is that I am encouraging modifications.

Code below if my server is down
// ==UserScript==// @name           Instructables "All Steps" Fixer// @namespace      https://www.instructables.com/tag/type:instructable/*// @description    Automatically loads All Steps instead of the Intro only// @include        https://www.instructables.com/tag/type:instructable/*// ==/UserScript==//Made by Zachninme//Although this is open-source, always leave the above line intact. Thanks.var allLinks, thisLink;allLinks = document.evaluate(    &apos;//a[@href]&apos;,    document,    null,    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,    null);for (var i = 0; i < allLinks.snapshotLength; i++) {    thisLink = allLinks.snapshotItem(i);    if (thisLink.href.match(/\?/i)) {	} else {    thisLink.href += &apos;?ALLSTEPS&apos;;	}}

(I have zachninme.com registered, but it isn't working right... *sigh*)


Thanks Fungus for making the Instructable, smart!

If you don't quit writing code and generally hacking on the site, I'm going to have to offer you a job!

Well, don't worry, I wouldn't accept, as my JS is very poor. (although I am learning it so I can finally make the switch to Linux, ASP keeps me down)

Sorry if anything I do you consider "hacking", if you feel it is "bad", remove it immediately. I really won't take offense. (So far, I would only consider the HTML thing to be "bad" ) And I don't try to do things like hack the DB or anything, I'm not the kind of guy who would do that, and even if I was, what would I do with it? Look at your unpublished instructables? :P

Again, I'm not great at JS, so I would really like help fixing this line:
if (thisLink.href.match(/\?/i)) {
I would like it to say something along the lines of:
if ((thisLink.href.match(/\?/i)) && (thisLink.href.match("/id/"))) {

But I don't know if that "/id/" is parsed correctly. Again, my JS level right now is "combo-script-kiddie++", although it is getting better :P

I couldn't directly install the script from that link.

I created a new file with the same code and put it here: zachninme's All Steps

This code doesn't work for direct links to Instructables, just those from the directory lists.

For example, clicking on this tasty instructable won't do it.

Changing the included pages to "https://www.instructables.com/*" made it work even if it adds the "?ALLSTEPS" to everything.

Haven't seen a problem with that yet, but it's not ideal.

Well, the way it works is it looks for all links without any URL Postback info. Then it just adds the "?ALLSTEPS". So, technically, if the page isn't looking for it, it will just be ignored, and it won't hurt anybody. There are a couple of links on the explore page that don't have any PostBack, and aren't instructables, yet they handle it just fine. Thanks for mirroring that for me, the reason why you couldn't access is my internet was down, causing my server to disconnect. Should be fine now :-)


11 years ago

This is sweet, as I always want to see all of the steps on one page, but I don't know much about this sort of thing... so what do I do with it, to make it run/work? thanks!


Reply 11 years ago

nevermind, I figured it out.