Introducing Digg Dialogg!
Check out the first Digg Dialogg with Nancy Pelosi. More guests to be announced soon!
CRAZY cool javascript : Edit whatever you want on ANY page : Images, Text.
javascript.com — This is cool! GO to any web page, clear the address bar, and paste this: "javascript:document.body.contentEditable='true'; document.designMode='on'; void 0" (without the quotes) and hit enter. Feel free to edit whatever you want on the page!
- 2465 diggs
- digg it
- mrfreeziexp, on 10/12/2007, -5/+34Finally! I can exact my revenge on youtube. Bwaha!
- treyd, on 10/12/2007, -5/+229treyd is stupid.
EDIT: Quit screwing with my comment guys!- Johnokiely, on 10/10/2007, -2/+0HOW DO THEY SAVE THEIR CHANGES?!?! like commenst and stuff? do you have to9 own the page?
- brendanc, on 10/12/2007, -31/+26please digg down stupidppl....
- InsaneMachine, on 10/12/2007, -7/+68and please block stupidppl, that way his account will be banned
- dominasian, on 10/12/2007, -53/+2this is CRAZY cool
edit:stop screwing with my comment guys - Rabbethan, on 10/12/2007, -13/+6Hehe, I made you call yourself an ***** in your comment...fun.
- pwill, on 10/12/2007, -16/+2http://www.smoothweb.net/digg.png
Heh. - TNHitokiri, on 10/12/2007, -4/+76http://img224.imageshack.us/img224/815/picture33xi.png
discrete but handy! - PimpinOnWelfare, on 10/12/2007, -1/+9Is it just me or when you click directly on the comments link to this story on the frontpage you get an error but when you tab it, its fine.
- geekitechture, on 10/12/2007, -15/+5This came at a nice time...I needed to vent my spleen at Google. What better way?
http://img260.imageshack.us/img260/9031/googlesucks0an.jpg - dreamlayers, on 10/12/2007, -0/+9The problem with the image rotation code seems to be that it doesn't give units. Here is a changed version which works on all sites in Firefox 2.0. Note that it doesn't affect background images, including background images in tables, so not all images move.
javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0); - markdr123, on 10/12/2007, -0/+8Woo, a swarm of flying red and green hands!
- treyd, on 10/12/2007, -5/+229treyd is stupid.
- saikhan, on 10/12/2007, -1/+69I wish I had this when I was in high school... I would never have to worry about online report cards again. Now that I'm in college, the only person I’d be fooling would be myself.
- TommySalami, on 10/12/2007, -15/+3aaah, time to cash in
my parents give me money for getting a's on tests
hahahahahah *makes cash register noises*- krebcycle, on 01/09/2008, -0/+1spoiled little biatch
- McZiggz, on 10/12/2007, -2/+36Between this & the Mac's control+option+command+8 (color invert) i could have convinced SO many kids i was a hacker in high school
- pkulak, on 10/12/2007, -7/+5Hmmm.... I always just saved the page and monkied with the HTML.
- saikhan, on 10/12/2007, -0/+7^But didn't it always print out on the bottom as 'C:Documents and Settings_____My Documents' or wherever you saved it?
This is way more efficient becuase my parents would have caught that in a snap.
- TommySalami, on 10/12/2007, -15/+3aaah, time to cash in
- Phipman, on 10/12/2007, -1/+5Nice! I love stuff like this...
Time to mess with teh internet!- NtroP, on 10/12/2007, -0/+2This is going to be VERY useful for deleting those distracting adds that jump and flash at you while you're trying to read something. Yeah, I know: Firefox, ad-block, flashgot... etc. but I'm beta testing Safari 3 and I don't have that option for it.
- dak1486, on 10/12/2007, -0/+5lots of fun. can confuse people walking by :)
- rejctchoir, on 10/12/2007, -10/+0this one is done. don''t even bother
- crimson117, on 10/12/2007, -3/+13Sweet! of course... you're only editing the local copy downloaded to your computer... but that's still freaking sweet!
- Agret, on 10/12/2007, -0/+15no you're not, you're just editing the version displayed in your browser. your local cache won't be modified.
- Cglass, on 10/12/2007, -12/+1hahhahaha pwned
- over900, on 10/12/2007, -11/+2what exactly does it do?
- Amall, on 10/12/2007, -1/+9yay I've been waiting for a firefox extension to do something like this forever... I've always wanted to clean things up before printing them and I used to have to use notepad!
- fillup07, on 10/12/2007, -0/+6FireBug lets you edit html and css inline. So does Web Developer.
- freddo, on 10/12/2007, -0/+3You might also want to have a look at http://karmatics.com/aardvark/
It's really handy to delete stuff before printing. - kaizouman, on 10/12/2007, -0/+1You may try this out : http://www.kaizou.org
- arrenlex, on 10/12/2007, -1/+6Finally! A way to edit Wikipedia that wasn't pulled out of someone's ass!
- snlildude87, on 10/12/2007, -1/+2Opera does something similar to this...although this one is way cooler.
- max1574, on 10/12/2007, -1/+17now it's time to go ***** with peoples myspace pages and e-mail them a print screen!! : )
- consonance, on 10/12/2007, -1/+17Javascript + Apple.com + Photoshop = The next new iPod?
- Spazkake, on 10/12/2007, -1/+11For some reason after doing this on digg I get some error like, can't find the link at /res/[xp connect etc... when clicking random links. Help?
- EtherealPurple, on 10/12/2007, -0/+4Yeah, the same thing happened to me, but then I restarted my browser (Firefox, naturally), and it just went back to normal.
- nystud162, on 10/12/2007, -2/+1me to
- 7of7, on 10/12/2007, -0/+4Just restart Firefox.
- teh_toaster, on 10/12/2007, -0/+4In Firefox just close the tab you originally ran the js on.
- DardanAeneas, on 10/12/2007, -0/+1Same problem. Reloading didn't fix it. Entering digg.com in the address bar didn't fix it. Closing the tab and making a new one did fix it. You can also make a bookmark(let) of this. Just create a new bookmark with
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
as the location. - DardanAeneas, on 10/12/2007, -3/+1Same problem. Reloading didn't fix it. Entering digg.com in the address bar didn't fix it. Closing the tab did fix it.
You can also make a bookmark(let) of this. Just create a new bookmark with
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
as the location. - DardanAeneas, on 10/12/2007, -0/+2Sorry about the double post. Also, change the bookmarklet properties and make the keyword 'edit' Then, whenever you type edit into the address bar, it runs.
- kickarse, on 10/12/2007, -0/+15This'll be great for those online NDAs or Agreement forms...
- Sil369, on 10/12/2007, -7/+1This is awesome for removing ads from sites when reading other digg articles. Opera has a block content feature, but this could be better!
- nzknzknzk, on 10/12/2007, -0/+20Well that or, you know, using Adblock?
- V3X3D, on 10/12/2007, -21/+4I just hacked digg.com with javascript. I attached a screenshot for you lot to see :D http://img252.imageshack.us/my.php?image=hackeddigg2wl.gif im 13333333337
oh btw I expect 29666 diggs- BadassCheese, on 10/12/2007, -2/+16Why block your bookmarks? Do you have that many porn links?
- blueigloo, on 10/12/2007, -2/+10What no Adblock? This makes you very not leet sir.
- Bigbro69, on 10/12/2007, -2/+221. Why gif?
2. Why block your bookmarks?
3. No adblock?
4. Lol nub. - V3X3D, on 10/12/2007, -9/+31. seemed most suitable ? Besides I didnt use mspaint.
2. I love secrets
3. the first 2 icons on the far left are bookmarks to adsense and adwords so that should answer
4. fill it in.. - zephc, on 10/12/2007, -1/+24Bwahaha http://i10.tinypic.com/2nitnae.png
- appleswitch, on 10/12/2007, -3/+1729666? Why stop there?
http://www.imgdumb.com/images/847711diggs.png - appleswitch, on 10/12/2007, -13/+229666? Why stop there?
http://www.imgdumb.com/images/847711diggs.png
- Sil369, on 10/12/2007, -4/+7Btw, for Opera users, paste the command, then drag the address bar icon to your interface to create a button shortcut for this command. :)
- pornel, on 10/12/2007, -0/+3If you want non-visual editing, you can View Source in Opera 9, change the code, click Apply changes button, and voila!
- herrshuster, on 10/12/2007, -0/+2soo..uh...how do you turn design mode OFF...beside refreshing
- enog, on 10/12/2007, -1/+5javascript:document.body.contentEditable='true'; document.designMode='off'; void 0
- pittpat, on 10/12/2007, -0/+2*****....I'm going to have too much fin with this!
- PRlME, on 10/12/2007, -10/+1dig me down cause if you think this code is cool you missed it the last 2 years its been out and duped 1million times on here
stop posting dumb played out crap - caniglia22, on 10/12/2007, -0/+1is there a way to save the page you edited? is this a possible prank to play on my friends or is this for my amusement while on the internet?
- geekitechture, on 10/12/2007, -0/+2Just save as .html.
- azurepalm, on 10/12/2007, -10/+5Apple iPhone spoof
http://img412.imageshack.us/img412/4514/iphonespoof1mb.jpg - kyhx, on 10/12/2007, -2/+7haha im drunk woooo.,, js rules
- NMVK, on 10/12/2007, -1/+7whitehouse.gov *grin*
- technicalabuse, on 10/12/2007, -0/+3This just reminds me how much I appreciate Firefox + the Web Developer toolbar plugin
http://chrispederick.com/work/webdeveloper/ - geekitechture, on 10/12/2007, -0/+6Don't forget you can edit your OWN website with it too, save the changes as .html and/or .css, and also edit articles online if you don't feel like opening a text editor and previewing every time you think of changes you could make (you still have to save changes into Notepad or an online text editor and republish, but the javascript lets you fool around with changes when you don't feel like "committing").
- PsycoMonkey, on 10/12/2007, -0/+5im probably gonna get dugg down but...n00b question. How do I save my changes?
EDIT: -_- next time I should refresh the page after having it open for a few minutes- geekitechture, on 10/12/2007, -1/+5It's been answered several times. For the absolute noobs, click "File," then click "Save," or "Save As," and type a name for the page that ends in a .html extension.
For example:
hackedgoogle.html
Use "Save HTML" instead if your browser has that option. Type a name for it and the .html extension will be added automatically.
- geekitechture, on 10/12/2007, -1/+5It's been answered several times. For the absolute noobs, click "File," then click "Save," or "Save As," and type a name for the page that ends in a .html extension.
- mwdcodeninja, on 10/12/2007, -0/+3ok, honestly tho, their might be a serious application for this. If you fetch your newly edited content, then you could use ajax to save that off to the server and you have a quick and dirty CMS system.
Except for not having any HTML insertion capabilities... this could be a great little hack.- smellinator, on 10/12/2007, -1/+2CMS System? You're not the guy who uses his PIN Number at the ATM Machine, are you?
- DeFex, on 10/12/2007, -8/+2if you wrote a program to prevent "fake articles" like this one from ever appearing. you might make some serious dough.
- geekitechture, on 10/12/2007, -0/+7"Fake articles?"
Let's see: real website with real javascript and real results. What constitutes *real* if this is fake?
Now if someone could write a program to prevent *you* from appearing they could really make a fortune. - utcursch, on 10/12/2007, -0/+33Strictly for those who are interested in how it works:
contentEditable is an IE5.5+ block level attribute that allows editing HTML in the browser:
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/contenteditable.asp
The attribute led to a flamewar at Mozilla, when somebody filed a "But it works in IE!" bug. Some people said that contentEditable was not a W3C standard and there was no need to implement it. Others argued that if Mozilla wants to a viable alternative, it needs to support a number of Microsoft features. Here is the bugzilla entry:
https://bugzilla.mozilla.org/show_bug.cgi?id=97284
Opera and Firefox don't use contentEditable. They use a related attribute called designMode
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/designmode.asp
Mozilla 1.3b+
http://www.mozilla.org/editor/ie2midas.html
Opera 9.0TP1+:
http://operawiki.info/TextAreaEditor
Safari 1.3 introduced contentEditable:
http://weblogs.mozillazine.org/hyatt/archives/2005_04.html#007962
Here is a w3.org discussion
http://lists.w3.org/Archives/Public/www-html/2001Dec/0064.html - kpax, on 10/12/2007, -0/+2I am surprised that inspite of being this easy, there's no extension for IE that can reliably block ads. I am sure some developer somwhere can work out an extension to use this and block those freakin' ads.
- geekitechture, on 10/12/2007, -0/+1You can edit your hosts file to block ads in the meantime (knowing IE, it'll be 10 years before they come up with a better solution than that).
For a list of sites to add, you could download this, (be warned it's one of the largest hosts file on the Web, at over 500 KB, and slowed down my computer, so I'm not using it right now):
http://everythingisnt.com/hosts.html
What it does is add bothersome ad servers and spam sites to your hosts file so you don't have to type in the name of every site you want blocked (but you can add more later by browsing to c:winntsystem32driversetchosts or c:windowssystem32driversetchosts, and typing the name of the site and 127.0.0.1 next to that).
If you like the idea you can do a web search for "hosts file" and download one you think is a manageable size. It was the best way to block everything before IE7.
It's also neat if you have an addiction to any site, say even digg.com. I used it once to block my own access but that lasted for just a week...couldn't stay away much longer than that. - Mipmap, on 10/12/2007, -0/+1"If you like the idea you can do a web search for "hosts file" and download one you think is a manageable size. It was the best way to block everything before IE7."
Errr... you better be damn sure you know what is in that hosts file, lest that host file you download redirects your favorite banking site to the Russian mafia.
- geekitechture, on 10/12/2007, -0/+1You can edit your hosts file to block ads in the meantime (knowing IE, it'll be 10 years before they come up with a better solution than that).
- sbrown, on 10/12/2007, -6/+5http://i16.tinypic.com/40k8rhk.jpg
- stuntman021, on 10/12/2007, -2/+0Sweet. Dugg.
- kazuhima, on 10/12/2007, -0/+8time to get myself a $50 ipod using price matching..
jussa kidding! - DwightSchruter, on 10/12/2007, -9/+4We tried working with CRAZY cool javascript
An employee suggested to me that we use CRAZY cool javascript on a few machines here as an evaluation. I was skeptical at first but he explained the benefits of using it for our employee's day-to-day scripting. So I decided to let him install CRAZY cool javascript onto 5 machines to see how the users got on. Besides, our IT manager had been using it on his system and it seemed to work fine, why not try it on the client machines?
Once he'd got the machines up and running with CRAZY cool javascript we let the users try it out. It all seemed fine to start with: CRAZY cool javascript was a pretty good replacement for javascript and the users could still do their work as normal.
Alas it did not stay that way. After a few days, I had lost count of the number of complaints received from users who could find things they were used to or tasks they could not perform that they previously could with javascript scripting. The final straw came when one employee lost several hours work when CRAZY cool javascript suddenly had an error reading from our intranet file server and corrupted his project.
Needless to say, Sun Java offered no support whatsoever. I made the employee uninstall CRAZY cool javascript from the machines and lets just say he's not with us anymore.- PandaParts, on 10/12/2007, -0/+2You've just been Schruted.
- Moopy, on 10/12/2007, -0/+1This is great, I needed this yesterday when I couldn't easily copy pasta a list that I wanted to edit. If you change a bookmark url to this, you can turn it on at any time. Only problem is, that tab is stuck in edit mode.
- yahoofrom, on 10/12/2007, -0/+1Can we save the modified copy too?
- mokilok, on 10/12/2007, -0/+1IT is a very cool script ..
VERY USEFUL FOR PRINTING DOCUMENTS . YOU CAN REMOVE TROUBLESOME ADs. :-)- matija, on 10/12/2007, -0/+4now if we could also turn off annoying CAPS!
- timvb, on 10/12/2007, -0/+0Or, of course, you could just use Firefox with Adblock Plus
- fresh27, on 10/12/2007, -0/+0Turning it off for me doesn't work on Opera 9.1 on OS X for me.
I used this: "javascript:document.body.contentEditable='true'; document.designMode='off'; void 0"
but it doesn't do anything. I can still edit ***** and I can't click links. - benjholla, on 10/12/2007, -1/+1hmmmm now all I have to do is find the javascript code for saving it to the webpage.....then muhahahahaha!
- shoust, on 10/12/2007, -0/+0@fresh27, opera supports both, thats why. Meaning one is still turned on.
@all try this code instead. Turns it on/off in one operation.
javascript:if(document.body.contentEditable){if(document.body.contentEditable=='false'){document.body.contentEditable='true';}else{document.body.contentEditable='false';}}else{if(document.designMode=='on'){document.designMode='off';}else{document.designMode='on';}}void 0;- wynd, on 10/12/2007, -0/+0Doesn't turn it off for me in Firefox 2.
- shoust, on 10/12/2007, -0/+0I don't think the edit mode can be turned off in firefox, opera and ie turn off fine with it though.
- parkermauney, on 10/17/2007, -1/+0how do you do it?
- parkermauney, on 10/17/2007, -1/+0imcool
- parkermauney, on 10/17/2007, -1/+0nm that's cool as SHIITE
- parkermauney, on 10/17/2007, -1/+0http://i1.tinypic.com/4bp0p4m.jpg
digg1 - hiscity, on 10/12/2007, -0/+1Very very good! Works well in firefox 2.
Best of all I can chop of the bottom part that's always too long to print on one page!
It's a little klunky, but it can be used to clean up a google map. Nice after doing an firefox fullmap extension.
Thanks se1zure !! - Moiirak, on 10/12/2007, -2/+0I'm happy this is client side.
You can also create your own pop up boxes by typing
javascript:alert("your text here")
in the url bar. - timvb, on 10/12/2007, -0/+1Yay, another thing to add to the "smallest" - programs list - a WYSIWYG editor in one line of code*
* web browser w/ javascript suppport required - dtfinch, on 10/12/2007, -0/+3I've added it to my bookmarks toolbar, and it didn't mind that it was a javascript: url. One click editing, without it showing up in the address bar. :)
-
Show 51 - 71 of 71 discussions

Digg is coming to a city (and computer) near you! Check out all the details on our