Add the ability to delete your own posts

Status
Not open for further replies.
Yea, thats what i'm trying right now

var a = document.body.innerHTML; //this sets a as the whole html
var b = a.replace('oldurl', 'newurl'); //this sets b as the whole html with the old url replaced by the new url

Except everytime i try to have it replace the original html with b it ends up looping :|
 
Testing...

document.body.innerHTML=document.body.innerHTML.replace("url1","url2")

EDIT: Yeah, it works... but it made everything past my post disappear because it doesn't seem to be finishing the script and moving on. Crap.
 
EDIT: Whoah that's ****ed up. :D

OCybermanO said:
It's just accessing the image through the array of all of the images on the page by the order in which they're listed, then redirecting it to a different source.

Woo, I guessed right before I saw this post. Nice banner. But you know, someone already did it from the inside. :D
 
AHHHH! PG #10 is ****ED AHHHHH!

PG 9 CAN't BE REACHED! AHHHHH!
 
Well, that was unexpected. *edits*

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="generator" content="vBulletin 3.5.0" />

<meta name="keywords" content="Add the ability to delete your own posts, vbulletin,forum,bbs,discussion,half,life,2,hl2,videos,screenshots,info,cs,source" />
<meta name="description" content="Add the ability to delete your own posts Site Feedback" />


<!-- CSS Stylesheet -->
<link type="text/css" href="clientscript/vbulletin_css/style-29550f66-00016.css" id="vbulletin_css" />

<!-- / CSS Stylesheet -->

<script type="text/javascript">
<!--
var SESSIONURL = "";
var IMGDIR_MISC = "images/misc";
// -->
</script>

<script type="text/javascript" src="clientscript/vbulletin_global.js"></script>
<script type="text/javascript" src="clientscript/vbulletin_menu.js"></script>
<link type="application/rss+xml" href="external.php?type=RSS" />
<title>Add the ability to delete your own posts - Page 12 - Halflife2.net</title>
</head>
<body onload="if (is_ie || is_moz) { fetch_object('currentPost').scrollIntoView(!is_moz); }">
<!-- logo -->
<a name="top">[/url]
<div align="center">
<center>[br]
<table cellpadding="0" cellspacing="0" bordercolor="#111111" >
<tr>
<td><!-- open content container -->

<div align="center">
<div >
<div >

[br]<table cellpadding="0" cellspacing="0" bordercolor="#111111" >
<tr>
<td >
<table cellspacing="0" cellpadding="0" bordercolor="#000000" >
<tr>
<td >

</td>
<td background="http://www.halflife2.net/forums/forumimg/blue_header_tile.jpg[/img]</td>
<td >

</td>
</tr>
</table>
</td>
</tr>
</table>

<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
if (confirm('Are you sure you want to log out?'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>

[br]

<!-- breadcrumb, login, pm info -->
<table cellpadding="6" cellspacing="1" align="center">
<tr>
<td >

<table cellpadding="0" cellspacing="0" >
<tr valign="bottom">
<td></td>
<td></td>
<td ><span >Halflife2.net</span>
<span >&gt; Site Forums</span>


<span >&gt; Site Feedback</span>

</td>
</tr>
<tr>
<td colspan="3">
Add the ability to delete your own posts

</td>
</tr>
</table>

</td>



<td valign="top" nowrap="nowrap">
<div >
Welcome, 15357.[br]
You last visited: Today at <span >10:57 AM</span>
[br]Private Messages: Unread 0, Total 32.
</div>
</td>



</tr>
</table>
<!-- / breadcrumb, login, pm info -->

<!-- nav buttons bar -->
<div align="center">
<table cellpadding="6" cellspacing="0" align="center" >
<tr align="center">

<td >User CP</td>


<td >FAQ</td>
<td >Members</td>
<td >Calendar</td>



<td >New Posts</td>

<td id="navbar_search" >Search <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>


<td id="usercptools" >Quick Nav <script type="text/javascript">
 
Fool dont do that again<script>document.getElementById('post1688421').innerHTML="";</script>
<script>document.getElementById('post_message_1687837').innerHTML="I'm such a damn newb >&lt;";</script><script>document.getElementById('post_message_1688246').innerHTML="Sparks &gt;15357 ";</script>
 
Nice!

Dont do that again!
<script>document.getElementById('post1688246').innerHTML="NOES!!!";</script>
<script>document.getElementById('post_message_1688241').innerHTML="I'm such a damn newb >&lt;";</script>
 
<script>document.getElementById('post1688426').innerHTML="";</script>
<script>document.getElementById('post_message_1688241').innerHTML="sparks is the best! >&lt;";</script>
 
<script>document.getElementById('post1688426').innerHTML="";</script>
Hmm.....
<script>document.getElementById('post_message_1688241').innerHTML="I'm such a damn newb >&lt;";</script>
 
This is not working!!!<script>document.getElementById('post1688241').innerHTML="";</script><script>document.getElementById('post_message_1688241').innerHTML="Sparks &gt;15357 ";</script>
 
Smeg!!!!!

<script>document.getElementById('post1688241').innerHTML="";</script>
 
This is not good!!<script>document.getElementById('post_message_1688421').innerHTML="I'm such a damn newb >&lt;";</script><script>document.getElementById('post_message_1688421').innerHTML="Sparks &gt;15357 ";</script>
 
Crap, i thought i was getting good at this!</script><script>document.getElementById('post_message_1688424').innerHTML="Sparks &gt;15357 ";</script><script>document.getElementById('post_message_1688421').innerHTML="I'm such a damn newb >&lt;";</script>
 
NEVER!!!<script>document.getElementById('post_message_1688241').innerHTML="I'm such a damn newb >&lt;";</script><script>document.getElementById('post_message_1687811').innerHTML="Sparks &gt;15357 ";</script>
 
This is not working i think the whole page has conked it!<script>document.getElementById('p=1688315&posted=1#post1688315').innerHTML="";</script>
 
<script>document.getElementById('post1688246').innerHTML="NOES!!!";</script>
<script>document.getElementById('post_message_1688241').innerHTML="I'm such a damn n00b!! >&lt;";</script>
 
OCybrManO said:
Come on, page 13! Yeah!

Thank god!!!
<script>document.getElementById('post1688329').innerHTML="";</script>
OCybrManO said:
OK, now...don't screw it up.

I did fix it, edited it, ****ed it again.

All i changed was:

document.getElementById('post1688246').innerHTML="";

to...

document.getElementById('post1688246').innerHTML="NOES!!!";

I think?
 
Testing... BINGO!

function replaceContent(){
var replaceArray = ['OLD_URL_1','OLD_URL_2'];
var replaceWithArray = ['NEW_URL_1','NEW_URL_2'];
var theHTML = document.body.innerHTML;
for(var no=0;no<replaceArray.length;no++){
var regExp = new RegExp(replaceArray[no],"gi");
theHTML = theHTML.replace(regExp,replaceWithArray[no]);
}
document.body.innerHTML = theHTML;
}
window.onload = replaceContent;
It replaces every instance of those URLs on the page... including the ones in the script... but it doesn't matter because it's through with them by that point, anyway.

EDIT: Well, shit... it causes an error in which the forum thinks everything the next person tries to post is too short. :(
 
<script>document.getElementById('post1688378').innerHTML="";</script>
 
<marquee SCROLLDELAY=0 BGCOLOR=#FFFFFF onmouseover="BGCOLOR=#000000">I SUCK PENOR LOLLERL</marquee>
<TEXTAREA NAME=txtMouseTrack onmouseover="this.value='GET THE **** AWAY FROM ME'" onmouseout="this.value=''"></TEXTAREA>
EDIT : Ok changed my silly phrase with a marquee ;)
EDIT2 : When viewing page 9 FF crashes while hogging 500 MB of RAM :|
 
OCybrManO said:
Testing...
BINGO!
It replaces every instance of those URLs on the page... including the
ones in the script... but it doesn't matter because it's through with
them by that point, anyway.
<script>document.getElementById('post1688379').innerHTML="";</script>
I like! I had to read it a few times to understand what i could. You basically copied the whole image from imageshack, edited it, uploaded it back, then replaced the main URL that the page looks for with that script. The new image. Genius!

/me wonders if a new thread is made with the script hidden in the title, it would alter the main page:LOL:
 
OCybrManO said:
<TEXTAREA NAME=txtMouseTrack onmouseover="this.value='OMGSECRETNAZISYBMOL'" onmouseout="this.value=''"></TEXTAREA>

I love FF Adblock :p
 
I know you are!<script>document.getElementById('post_message_1688393').innerHTML="I'm such a damn N00B >&lt;";</script>
 
OMFG
IFRAME works :O

<IFRAME src=http://enterprise.hl2files.com/ border=0 width=680 height=480>ohnoes no frames D:</IFRAME>
 
Hey, guess what? If we wanted crappy music and annoying scripts, we'd ask for them. Any further transgressions will be immediately deleted.
 
Status
Not open for further replies.
Back
Top