Simple HP Blockers

DataMine
by DataMine · 4 posts
9 years ago in General
Posted 9 years ago · Author
These code snippets will allow you to prevent people who are not logged in from viewing your homepage.

Note: These are not 100% effective, anyone with a javascript blocker can view your page and anyone who uses the "view source" menu option can see your homepage code (Granted they would need to go run that code through an html tester to see anything unless they just want raw data).


This code will hide all of your panels on the screen but leave everything else visible
[code=javascript file=Untitled.txt]
if(window.IMVU.data.customerID == 0)
{
$("div[id*='_panel']" ).hide();
}[/code]

This code will delete your panels from your homepage (don't worry they aren't gone forever, you just have to refresh the page)
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("div[id*='_panel']" ).remove();
}[/code]

This code will erase everything inside the body of your homepage leaving nothing but the IMVU header
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("body" ).remove();
}[/code]

This code will erase the entire page
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
$("html" ).remove();
}[/code]

This code will force your visitor to load another webpage instead of your homepage. It can also be combined with the other codes above for extra security.
[code=javascript file=Untitled.txt]if(window.IMVU.data.customerID == 0)
{
document.location.href = "http://google.com";
}[/code]
Posted 9 years ago
LOL!! DON VON...TOO FUNNY -GIGGLES-
Posted 9 years ago
hey dont forget document.write :) You could rewrite your webpage to someone who isnt logged in.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT