Simple Machine Codes
November 23, 2009, 12:05:16 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Affiliates Code Index Staff List Calendar Members Login Register  

Double Click Post to Edit


Pages: [1]   Go Down
  Print  
Author Topic: Double Click Post to Edit  (Read 341 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,664



View Profile WWW
« on: July 19, 2008, 01:43:25 pm »

Footers:
Code:
<script>
if(location.href.match(/topic,/i)){
//Created by Agent Moose (smcodes.smfforfree3.com)
var _i = document.getElementsByTagName("img");
for(_s=0;_s<_i.length;_s++){
if(_i[_s].id.match(/modify_button/i)){
if(_i[_s].previousSibling.previousSibling.id.match(/msg_/i)) _x = _i[_s].previousSibling.previousSibling; else _x = _i[_s].previousSibling;
_x.ondblclick = _i[_s].onclick;
_i[_s].style.display = "none";
};};};
</script>
All it does is remove the image that you would usually click on the quick edit the post.  Then, all you have to do is double click the accuall post to quick edit it.

enjoy Smiley
« Last Edit: July 20, 2008, 08:33:58 pm by Agent Moose » Report Spam   Logged

CodeLover
100 Club Member

Offline Offline

Gender: Male
Posts: 331


View Profile
« Reply #1 on: July 19, 2008, 02:59:05 pm »

Whoa moose, this is awesome. Looking at the code, I never knew it would be that simple. Is it ok if I edit the script to still show the modify button just in case some people think that the button dissapeared?

EDIT: Oh, by the way, this only works if you have images for buttons turned on.

EDIT2: Err, doesn't work for me...
« Last Edit: July 19, 2008, 03:56:14 pm by CodeLover » Report Spam   Logged

Don't get mad at me if I'm acting immature - I'm only 10 Grin


Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,664



View Profile WWW
« Reply #2 on: July 19, 2008, 06:43:08 pm »

I relised that this code doesn't wanna work in IE, but I am working on that Wink

and yes, you can edit it so that it chows the image Smiley
Report Spam   Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2006, Simple Machines LLC
ServerBeach Coupon