8 ms·
FuckItJS: Runs your javascript code whether your compiler likes it or not.
- meggar 14y agoNice.
- gfosco 14y agoI love a good tongue-in-cheek git repository... Reminded me of: http://html9responsiveboilerstrapjs.com http://html9responsiveboilerstrapjs.com
- michaelbuckbee 14y agoDon't forget to check out the companion Twitter account: https://twitter.com/H9RBSjs https://twitter.com/H9RBSjs
- josscrowcroft 14y agoThat is the funniest thing I've seen all month! "2. How do I install this? Um... are you stupid or something? Just attackclone the grit repo pushmerge, then rubygem the lymphnode js shawarma module – and presto!"
- eragnew 14y ago+1
- Groxx 14y agoThat's awesome! Try running the JS file - clearly, it should be included in every site. And check out the source of the page.
- crazygringo 14y ago> 1. Include jQuery, because everything requires jQuery I love it! :P Great sense of humor.
- ericcholis 14y agoAlso, "Note: This is ALPHA software and may result in irreversible brain damage."
- alkavan 14y agogreat. easy way to fix lazy co-workers code.
- estebank 14y agoFirst thing I thought when I see it: Why!? Second thing: Why not call it OnErrorResumeNext!?
- crazygringo 14y agoAh... bringing back the memories :) I think I'll go add an "Option Explicit" to the top of the file I'm working on, right now, just for fun... Since it's not valid JavaScript, I'm sure FuckItJS will just skip over it.
- DougBTX 14y agoYou mean, write a script which wraps each line in a js file with try catch? Sounds doable.
- modarts 14y agoHow would I go about integrating this as a step into my build process?
- raverbashing 14y agothis is probably like integrating a car crash into your daily commute but you can probably integrate into Jenkins for continuous jury-rigging
- jackcviers3 14y agoThe software license is the best part: "If you are caught in a dire situation wherein you only have enough time to save one person out of a group, and the Author is a member of that group, you must save the Author."
- 51Cards 14y agoBrilliant... This is going in every software license and terms agreement I write from here on out. What a tremendous insurance policy if I perhaps hit on the next Facebook. 1/7th of the planet responsible for saving lil ol' me.
- kozlovsky 14y agoJust keep in mind: widespread adoption of this license can lead to race conditions, when two concurrent authors of simultaneously used products happen to be in the same group
- warmwaffles 14y agoDefine author as the Original Author
- antihero 14y agoThe author of this software takes precedence over all other licenses times infinity plus one!
- TheBiv 14y agoOur QA group is hiring
- masklinn 14y agoI don't know, I really liked the `FuckIt.moreConflict()` method, especially when I read the source and realized he actually tested it and ensured `window.location` would not get overwritten (or you'd navigate away from the page)
- drivingmenuts 14y ago
- themstheones 14y agoI realize that this is a joke, but I can't help but wonder if there is a possible valid use for it. I could imagine needing something that fixed bad js for a crawler that needed JS on a poorly coded site, but I can't think of an occasion where discarded bad code would ever be useful. Maybe if a site deliberately injected bad JS to prevent crawling it would be worthwhile.
- tyler_ball 14y agoI've used this library for loading horrible, third-party javascript: https://github.com/gregersrygg/crapLoader https://github.com/gregersrygg/crapLoader
- JoeCortopassi 14y agoDupe: http://news.ycombinator.com/item?id=4148287 http://news.ycombinator.com/item?id=4148287
- tomkin 14y agoMy apologies. I submitted, but when it has been submitted before it usually just redirects you to the previously submitted one. Not sure why it didn't do this for me this time! EDIT: Seems to be "http" vs. "https".
- samwillis 14y agoNo need to apologise. If something is missed the first time, people see it the second time and it gets voted up to the front page then people want to see it. With the voting system if it truly is a "dupe" it wont get voted up...
- wetmore 14y ago> Through a process known as Eval-Rinse-Reload-And-Repeat ERRAR. I like it.
- emiliobumachar 14y agoIntentional or not, that is Portuguese for "to make a mistake".
- eragnew 14y ago+1 for creative name
- dag11 14y agoI read the source before I read the readme, and was thoroughly mindfucked. I love it.
- cabirum 14y agoFor completeness, it should use WTFPL license. http://en.wikipedia.org/wiki/WTFPL http://en.wikipedia.org/wiki/WTFPL
- blasten 14y ago+1
- nnq 14y ago...but still, what does `FuckIt.moreConflict()` actually do and when would I use it? (I just desperately feel the need to use a function named `moreConflict`... don't ask!)
- samuellevy 14y agoIt overwrites ever property on the 'window' object (except for 'location') with FuckIt.
- md224 14y agoOriginal Author here... for reasons I can't fathom, someone has created a Drupal module: http://drupal.org/project/fuckitjs http://drupal.org/project/fuckitjs
- mey 14y agoWhich contains this gem http://drupal.org/node/1657944 http://drupal.org/node/1657944
- staticshock 14y agoInterestingly, the Bad Judgement module looks like it's a legit check on other non-serious modules: This module provides an explicit dependency for modules whose usage requires bad judgement. Joke modules often require "bad judgement".
- deleted 14y ago[deleted]
- Periodic 14y agoReminds me of Failure-Oblivious Computing [1]. It takes advantage of the fact that in many programs errors have a short error propagation distance as they are often written as a main event loop and as long as you can get to the next iteration of the loop the error won't corrupt state. For example, if your server crashes on one request, it will probably be fine if it just gets invalid data instead, discards it as invalid, and then waits for the next response. I'm not sure if this applies well to JavaScript. We might observe that most JavaScript is a set of disjoint event handlers. If one doesn't work right it probably won't break the rest of the site. I played around with implementing FOP dynamically through DynamoRIO [2] as a class project but only got through a proof of concept and quickly remembered why I hate x86 assembly. 1: http://en.wikipedia.org/wiki/Failure-oblivious_computing http://en.wikipedia.org/wiki/Failure-oblivious_computing 2: https://github.com/periodic/Shady https://github.com/periodic/Shady
- jberryman 14y agoClearly this is the future.
- saraid216 14y agoSo that's where the name comes from. FOC-It.
- aboodman 14y agoThis is exactly what browsers do already. If one event handler has an error, that event is aborted. But the event loops continues, and js will continue to run.
- wsc981 14y agoThat reminds me a bit about a 'feature' of VB (LotusScript?) "on error resume next" :)
- caster_cp 14y ago//@ TODO: give a shit epic comment, in an epic app
- aklofas 14y agoYep, the commits are funny too: https://github.com/mattdiamond/fuckitjs/commit/001b146fc9dc68bce3071774006f50582a603a79 https://github.com/mattdiamond/fuckitjs/commit/001b146fc9dc6...
- pfisch 14y agoI feel terrible for the person who takes a contract job and is handed some code that depends on this. Also I hope it isn't me.
- acuity12 14y agoOne of the best laughs I've had in a while.
- esalman 14y agoPardon me but I don't get any alert when I run the test script.