View Single Post
Old 2004-06-09, 10:21 AM   #1
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Question Help in deleting no right mouse click code from 10k of pages on server

I've got over 10k in pages, 7 gigs total with images, that has no right mouse click code that I need to delete.

I have a few server scripts that will do search and replace on a server but they only work with one line of code at a time and if there is spaces in the file names and directories which seems to break the script and any of the pages and directories have spaces in the names. :(

I do already have a tar file downloaded so I may just have to do this locally and then re-upload everything but damn it is 7 gigs.

This is the code,
<script language="JavaScript1.2">
if (window.Event)
document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;

return false;
}

function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}

}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
document.onmouseup = norightclick;
//-->
</script>
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote